@@ -282,7 +282,7 @@ void ep80219_power_off(void)
}
static struct resource iq31244_gpio_res[] = {
- DEFINE_RES_MEM((IOP3XX_PERIPHERAL_VIRT_BASE + 0x07c4), 0x10),
+ DEFINE_RES_MEM((IOP3XX_PERIPHERAL_PHYS_BASE + 0x07c4), 0x10),
};
static void __init iq31244_init_machine(void)
@@ -169,7 +169,7 @@ static struct platform_device iq80321_serial_device = {
};
static struct resource iq80321_gpio_res[] = {
- DEFINE_RES_MEM((IOP3XX_PERIPHERAL_VIRT_BASE + 0x07c4), 0x10),
+ DEFINE_RES_MEM((IOP3XX_PERIPHERAL_PHYS_BASE + 0x07c4), 0x10),
};
static void __init iq80321_init_machine(void)
@@ -123,7 +123,7 @@ static struct platform_device iq80331_flash_device = {
};
static struct resource iq80331_gpio_res[] = {
- DEFINE_RES_MEM((IOP3XX_PERIPHERAL_VIRT_BASE + 0x1780), 0x10),
+ DEFINE_RES_MEM((IOP3XX_PERIPHERAL_PHYS_BASE + 0x1780), 0x10),
};
static void __init iq80331_init_machine(void)
@@ -123,7 +123,7 @@ static struct platform_device iq80332_flash_device = {
};
static struct resource iq80332_gpio_res[] = {
- DEFINE_RES_MEM((IOP3XX_PERIPHERAL_VIRT_BASE + 0x1780), 0x10),
+ DEFINE_RES_MEM((IOP3XX_PERIPHERAL_PHYS_BASE + 0x1780), 0x10),
};
static void __init iq80332_init_machine(void)
@@ -110,7 +110,7 @@ static int iop3xx_gpio_probe(struct platform_device *pdev)
struct resource *res;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = (void *) res->start;
+ base = devm_ioremap_resource(&pdev->dev, res);
return gpiochip_add(&iop3xx_chip);
}
This alters the IOP platforms to pass a physical base for their GPIO blocks and alters the driver to remap it when probing instead of relying on the virtual addresses to be used. Cc: Lennert Buytenhek <kernel@wantstofly.org> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- arch/arm/mach-iop32x/iq31244.c | 2 +- arch/arm/mach-iop32x/iq80321.c | 2 +- arch/arm/mach-iop33x/iq80331.c | 2 +- arch/arm/mach-iop33x/iq80332.c | 2 +- drivers/gpio/gpio-iop.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)