summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp/brownstone.c
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@linaro.org>2013-04-09 18:12:04 +0800
committerHaojian Zhuang <haojian.zhuang@linaro.org>2013-04-11 10:00:05 +0800
commitb8f649f1f531914a30ecb420e7565ee04dccc2ad (patch)
tree42b2bc905fce1c892511ff81a250d7330b33a4ed /arch/arm/mach-mmp/brownstone.c
parent2cab0292285ce3180224c130d2fb1104aee44ff1 (diff)
downloadop-kernel-dev-b8f649f1f531914a30ecb420e7565ee04dccc2ad.zip
op-kernel-dev-b8f649f1f531914a30ecb420e7565ee04dccc2ad.tar.gz
ARM: pxa: move PXA_GPIO_TO_IRQ macro
Since PXA_GPIO_TO_IRQ() & MMP_GPIO_TO_IRQ() macro are depended on arch code, move them from gpio driver to platform driver instead. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-mmp/brownstone.c')
-rw-r--r--arch/arm/mach-mmp/brownstone.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/brownstone.c b/arch/arm/mach-mmp/brownstone.c
index 2358011..ac25544 100644
--- a/arch/arm/mach-mmp/brownstone.c
+++ b/arch/arm/mach-mmp/brownstone.c
@@ -14,6 +14,7 @@
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/io.h>
+#include <linux/gpio-pxa.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/max8649.h>
#include <linux/regulator/fixed.h>
@@ -104,6 +105,10 @@ static unsigned long brownstone_pin_config[] __initdata = {
GPIO89_GPIO,
};
+static struct pxa_gpio_platform_data mmp2_gpio_pdata = {
+ .irq_base = MMP_GPIO_TO_IRQ(0),
+};
+
static struct regulator_consumer_supply max8649_supply[] = {
REGULATOR_SUPPLY("vcc_core", NULL),
};
@@ -202,6 +207,8 @@ static void __init brownstone_init(void)
/* on-chip devices */
mmp2_add_uart(1);
mmp2_add_uart(3);
+ platform_device_add_data(&mmp2_device_gpio, &mmp2_gpio_pdata,
+ sizeof(struct pxa_gpio_platform_data));
platform_device_register(&mmp2_device_gpio);
mmp2_add_twsi(1, NULL, ARRAY_AND_SIZE(brownstone_twsi1_info));
mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */
OpenPOWER on IntegriCloud