aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-06-10 11:11:06 -0400
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-06-24 09:40:40 -0400
commit9a763bfbe45d8d4afe953993907188322a49a4ec (patch)
treeaad5479d993406fa97ba23306e17007c9277bd52 /arch/arm/mach-imx
parent3aad49e138a9690969df52672c454e1d6d01b501 (diff)
ARM: imx: get rid of mxc_gpio_init
This function is defined once for each imx family and so is in the way when compiling a kernel for more than one SoC. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/devices.c22
-rw-r--r--arch/arm/mach-imx/mm-imx21.c3
-rw-r--r--arch/arm/mach-imx/mm-imx27.c3
3 files changed, 14 insertions, 14 deletions
diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c
index a0aeb8a4adc1..e708bfd9aabc 100644
--- a/arch/arm/mach-imx/devices.c
+++ b/arch/arm/mach-imx/devices.c
@@ -454,26 +454,21 @@ DEFINE_IMX_SSI_DEVICE(1, 2, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1);
454 454
455#ifdef CONFIG_MACH_MX21 455#ifdef CONFIG_MACH_MX21
456DEFINE_MXC_GPIO_PORTS(MX21, imx21); 456DEFINE_MXC_GPIO_PORTS(MX21, imx21);
457
458int __init imx21_register_gpios(void)
459{
460 return mxc_gpio_init(imx21_gpio_ports, ARRAY_SIZE(imx21_gpio_ports));
461}
457#endif 462#endif
458 463
459#ifdef CONFIG_MACH_MX27 464#ifdef CONFIG_MACH_MX27
460DEFINE_MXC_GPIO_PORTS(MX27, imx27); 465DEFINE_MXC_GPIO_PORTS(MX27, imx27);
461#endif
462 466
463int __init mxc_register_gpios(void) 467int __init imx27_register_gpios(void)
464{ 468{
465#ifdef CONFIG_MACH_MX21 469 return mxc_gpio_init(imx27_gpio_ports, ARRAY_SIZE(imx27_gpio_ports));
466 if (cpu_is_mx21())
467 return mxc_gpio_init(imx21_gpio_ports, ARRAY_SIZE(imx21_gpio_ports));
468 else
469#endif
470#ifdef CONFIG_MACH_MX27
471 if (cpu_is_mx27())
472 return mxc_gpio_init(imx27_gpio_ports, ARRAY_SIZE(imx27_gpio_ports));
473 else
474#endif
475 return 0;
476} 470}
471#endif
477 472
478#ifdef CONFIG_MACH_MX21 473#ifdef CONFIG_MACH_MX21
479static struct resource mx21_usbhc_resources[] = { 474static struct resource mx21_usbhc_resources[] = {
@@ -500,4 +495,3 @@ struct platform_device mx21_usbhc_device = {
500 .resource = mx21_usbhc_resources, 495 .resource = mx21_usbhc_resources,
501}; 496};
502#endif 497#endif
503
diff --git a/arch/arm/mach-imx/mm-imx21.c b/arch/arm/mach-imx/mm-imx21.c
index 115c21289125..68aa5d2ecdb1 100644
--- a/arch/arm/mach-imx/mm-imx21.c
+++ b/arch/arm/mach-imx/mm-imx21.c
@@ -77,7 +77,10 @@ void __init mx21_map_io(void)
77 iotable_init(imx21_io_desc, ARRAY_SIZE(imx21_io_desc)); 77 iotable_init(imx21_io_desc, ARRAY_SIZE(imx21_io_desc));
78} 78}
79 79
80int imx21_register_gpios(void);
81
80void __init mx21_init_irq(void) 82void __init mx21_init_irq(void)
81{ 83{
84 imx21_register_gpios();
82 mxc_init_irq(MX21_IO_ADDRESS(MX21_AVIC_BASE_ADDR)); 85 mxc_init_irq(MX21_IO_ADDRESS(MX21_AVIC_BASE_ADDR));
83} 86}
diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c
index 89b41749e166..bcedce9c87dd 100644
--- a/arch/arm/mach-imx/mm-imx27.c
+++ b/arch/arm/mach-imx/mm-imx27.c
@@ -77,7 +77,10 @@ void __init mx27_map_io(void)
77 iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc)); 77 iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc));
78} 78}
79 79
80int imx27_register_gpios(void);
81
80void __init mx27_init_irq(void) 82void __init mx27_init_irq(void)
81{ 83{
84 imx27_register_gpios();
82 mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); 85 mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR));
83} 86}