[PATCH v4 04/11] rockchip: adc: rockchip-saradc: use dev_read_addr_ptr
Kever Yang
kever.yang at rock-chips.com
Wed Feb 22 09:00:21 CET 2023
On 2023/2/18 23:27, 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 use dev_read_addr_ptr 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 | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/adc/rockchip-saradc.c b/drivers/adc/rockchip-saradc.c
> index 760f8fe6..de9298a2 100644
> --- a/drivers/adc/rockchip-saradc.c
> +++ b/drivers/adc/rockchip-saradc.c
> @@ -145,8 +145,8 @@ 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);
> - if (priv->regs == (struct rockchip_saradc_regs *)FDT_ADDR_T_NONE) {
> + priv->regs = (struct rockchip_saradc_regs *)dev_read_addr_ptr(dev);
> + if (!priv->regs) {
> pr_err("Dev: %s - can't get address!", dev->name);
> return -ENODATA;
> }
> --
> 2.20.1
>
More information about the U-Boot
mailing list