diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-09-09 16:39:51 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-09-20 23:04:50 +0200 |
commit | 7b85b867b99044da93f83851c806d1e324d49ed5 (patch) | |
tree | 22fd6412f7d986b1d3720badd4d5fe60f3fd9a45 /arch/arm/mach-iop32x/gpio-iop32x.h | |
parent | 51a97d829e32b7a1b960d3365e4c2546c9c792aa (diff) |
ARM: plat-iop: instantiate GPIO from platform device
This converts the IOP32x and IOP33x platforms to pass their
base address offset by a resource attached to a platform device
instead of using static offset macros implicitly passed
through <linux/gpio.h> including <mach/gpio.h>. Delete the
local <mach/gpio.h> and <asm/hardware/iop3xx-gpio.h> headers
and remove the selection of NEED_MACH_GPIO_H.
Pass the virtual address as a resource in the platform device
at this point for bisectability, next patch will pass the
physical address as is custom.
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-iop32x/gpio-iop32x.h')
-rw-r--r-- | arch/arm/mach-iop32x/gpio-iop32x.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-iop32x/gpio-iop32x.h b/arch/arm/mach-iop32x/gpio-iop32x.h new file mode 100644 index 000000000000..b8710a63a13e --- /dev/null +++ b/arch/arm/mach-iop32x/gpio-iop32x.h @@ -0,0 +1,10 @@ +static struct resource iop32x_gpio_res[] = { + DEFINE_RES_MEM((IOP3XX_PERIPHERAL_VIRT_BASE + 0x07c4), 0x10), +}; + +static inline void register_iop32x_gpio(void) +{ + platform_device_register_simple("gpio-iop", 0, + iop32x_gpio_res, + ARRAY_SIZE(iop32x_gpio_res)); +} |