qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/adc/stm32f2xx_adc: Correct memory region size and access


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] hw/adc/stm32f2xx_adc: Correct memory region size and access size
Date: Mon, 25 May 2020 13:09:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 5/25/20 1:08 PM, Philippe Mathieu-Daudé wrote:
> The ADC region size is 256B, split as:
>  - [0x00 - 0x4f] defined
>  - [0x50 - 0xff] reserved
> 
> All registers are 32-bit (thus when the datasheet mentions the
> last defined register is 0x4c, it means its address range is
> 0x4c .. 0x4f.
> 
> This model implementation is also 32-bit. Set MemoryRegionOps
> 'impl' fields.
> 
> See:
>   'RM0033 Reference manual Rev 8', Table 10.13.18 "ADC register map".
> 
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
>  hw/adc/stm32f2xx_adc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/adc/stm32f2xx_adc.c b/hw/adc/stm32f2xx_adc.c
> index 4f9d485ecf..5d834a98f6 100644
> --- a/hw/adc/stm32f2xx_adc.c
> +++ b/hw/adc/stm32f2xx_adc.c
> @@ -278,7 +278,7 @@ static void stm32f2xx_adc_init(Object *obj)
>      sysbus_init_irq(SYS_BUS_DEVICE(obj), &s->irq);
>  
>      memory_region_init_io(&s->mmio, obj, &stm32f2xx_adc_ops, s,
> -                          TYPE_STM32F2XX_ADC, 0xFF);
> +                          TYPE_STM32F2XX_ADC, 0x100);
>      sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio);
>  }
>  

Please ignore this patch, it is incomplete.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]