]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
gpio: dw: Fix warnings about casting int to pointer
authorSean Anderson <seanga2@gmail.com>
Mon, 14 Sep 2020 15:01:59 +0000 (11:01 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 8 Oct 2020 15:42:36 +0000 (11:42 -0400)
Change the type of gpio_dwabp_platdata.base from fdt_addr_t to a void
pointer, since we pass it to readl.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/gpio/dwapb_gpio.c

index e5e35181940ce2a41ad6458dea74c7b668e26503..bf324f5239436de640cb4c460866eb2c2002fc20 100644 (file)
@@ -40,7 +40,7 @@ struct gpio_dwapb_platdata {
        const char      *name;
        int             bank;
        int             pins;
-       fdt_addr_t      base;
+       void __iomem    *base;
 };
 
 static int dwapb_gpio_direction_input(struct udevice *dev, unsigned pin)
@@ -176,7 +176,7 @@ static int gpio_dwapb_bind(struct udevice *dev)
                if (!plat)
                        return -ENOMEM;
 
-               plat->base = base;
+               plat->base = (void *)base;
                plat->bank = bank;
                plat->pins = ofnode_read_u32_default(node, "snps,nr-gpios", 0);