[PATCH v2 04/10] rockchip: adc: rockchip-saradc: convert dev_read_addr output to phys_addr_t
Kever Yang
kever.yang at rock-chips.com
Thu Feb 16 08:42:07 CET 2023
On 2023/2/7 22:53, Johan Jonker wrote:
> The fdt_addr_t and phys_addr_t size have been decoupled.
> A 32bit CPU can expext 64-bit data from the device tree parser,
> so convert dev_read_addr output to phys_addr_t in the
> rockchip-saradc.c file.
>
> Signed-off-by: Johan Jonker <jbx6244 at gmail.com>
Reviewed-by: Kever Yang <kever.yang at rock-chips.com>
Thanks,
- Kever
> ---
> drivers/adc/rockchip-saradc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/adc/rockchip-saradc.c b/drivers/adc/rockchip-saradc.c
> index 760f8fe6..1ba7c483 100644
> --- a/drivers/adc/rockchip-saradc.c
> +++ b/drivers/adc/rockchip-saradc.c
> @@ -145,7 +145,7 @@ int rockchip_saradc_of_to_plat(struct udevice *dev)
> struct rockchip_saradc_data *data;
>
> data = (struct rockchip_saradc_data *)dev_get_driver_data(dev);
> - priv->regs = (struct rockchip_saradc_regs *)dev_read_addr(dev);
> + priv->regs = (struct rockchip_saradc_regs *)((phys_addr_t)dev_read_addr(dev));
> if (priv->regs == (struct rockchip_saradc_regs *)FDT_ADDR_T_NONE) {
> pr_err("Dev: %s - can't get address!", dev->name);
> return -ENODATA;
> --
> 2.20.1
>
More information about the U-Boot
mailing list