aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-mx25/Kconfig3
-rw-r--r--arch/arm/mach-mx25/devices-imx25.h4
-rw-r--r--arch/arm/mach-mx25/devices.c39
-rw-r--r--arch/arm/mach-mx25/devices.h2
-rw-r--r--arch/arm/mach-mx25/mach-mx25_3ds.c4
-rw-r--r--arch/arm/plat-mxc/devices/platform-imx-keypad.c14
-rw-r--r--arch/arm/plat-mxc/include/mach/devices-common.h1
7 files changed, 19 insertions, 48 deletions
diff --git a/arch/arm/mach-mx25/Kconfig b/arch/arm/mach-mx25/Kconfig
index 2944bb71b031..e9d445649d4d 100644
--- a/arch/arm/mach-mx25/Kconfig
+++ b/arch/arm/mach-mx25/Kconfig
@@ -4,10 +4,11 @@ comment "MX25 platforms:"
4 4
5config MACH_MX25_3DS 5config MACH_MX25_3DS
6 bool "Support MX25PDK (3DS) Platform" 6 bool "Support MX25PDK (3DS) Platform"
7 select IMX_HAVE_PLATFORM_ESDHC
8 select IMX_HAVE_PLATFORM_IMX_KEYPAD
7 select IMX_HAVE_PLATFORM_IMX_UART 9 select IMX_HAVE_PLATFORM_IMX_UART
8 select IMX_HAVE_PLATFORM_MXC_EHCI 10 select IMX_HAVE_PLATFORM_MXC_EHCI
9 select IMX_HAVE_PLATFORM_MXC_NAND 11 select IMX_HAVE_PLATFORM_MXC_NAND
10 select IMX_HAVE_PLATFORM_ESDHC
11 12
12config MACH_EUKREA_CPUIMX25 13config MACH_EUKREA_CPUIMX25
13 bool "Support Eukrea CPUIMX25 Platform" 14 bool "Support Eukrea CPUIMX25 Platform"
diff --git a/arch/arm/mach-mx25/devices-imx25.h b/arch/arm/mach-mx25/devices-imx25.h
index 448939aac02c..a35123fef39f 100644
--- a/arch/arm/mach-mx25/devices-imx25.h
+++ b/arch/arm/mach-mx25/devices-imx25.h
@@ -30,6 +30,10 @@ extern const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst;
30#define imx25_add_imx_i2c1(pdata) imx25_add_imx_i2c(1, pdata) 30#define imx25_add_imx_i2c1(pdata) imx25_add_imx_i2c(1, pdata)
31#define imx25_add_imx_i2c2(pdata) imx25_add_imx_i2c(2, pdata) 31#define imx25_add_imx_i2c2(pdata) imx25_add_imx_i2c(2, pdata)
32 32
33extern const struct imx_imx_keypad_data imx25_imx_keypad_data __initconst;
34#define imx25_add_imx_keypad(pdata) \
35 imx_add_imx_keypad(&imx25_imx_keypad_data, pdata)
36
33extern const struct imx_imx_ssi_data imx25_imx_ssi_data[] __initconst; 37extern const struct imx_imx_ssi_data imx25_imx_ssi_data[] __initconst;
34#define imx25_add_imx_ssi(id, pdata) \ 38#define imx25_add_imx_ssi(id, pdata) \
35 imx_add_imx_ssi(&imx25_imx_ssi_data[id], pdata) 39 imx_add_imx_ssi(&imx25_imx_ssi_data[id], pdata)
diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c
index 1798be90a382..052adbbb3de6 100644
--- a/arch/arm/mach-mx25/devices.c
+++ b/arch/arm/mach-mx25/devices.c
@@ -22,25 +22,6 @@
22#include <mach/mx25.h> 22#include <mach/mx25.h>
23#include <mach/irqs.h> 23#include <mach/irqs.h>
24 24
25static struct resource mxc_keypad_resources[] = {
26 {
27 .start = 0x43fa8000,
28 .end = 0x43fabfff,
29 .flags = IORESOURCE_MEM,
30 }, {
31 .start = 24,
32 .end = 24,
33 .flags = IORESOURCE_IRQ,
34 }
35};
36
37struct platform_device mxc_keypad_device = {
38 .name = "mxc-keypad",
39 .id = -1,
40 .num_resources = ARRAY_SIZE(mxc_keypad_resources),
41 .resource = mxc_keypad_resources,
42};
43
44static struct resource mx25_rtc_resources[] = { 25static struct resource mx25_rtc_resources[] = {
45 { 26 {
46 .start = MX25_DRYICE_BASE_ADDR, 27 .start = MX25_DRYICE_BASE_ADDR,
@@ -98,26 +79,6 @@ struct platform_device mxc_wdt = {
98 .resource = mxc_wdt_resources, 79 .resource = mxc_wdt_resources,
99}; 80};
100 81
101static struct resource mx25_kpp_resources[] = {
102 {
103 .start = MX25_KPP_BASE_ADDR,
104 .end = MX25_KPP_BASE_ADDR + 0xf,
105 .flags = IORESOURCE_MEM,
106 },
107 {
108 .start = MX25_INT_KPP,
109 .end = MX25_INT_KPP,
110 .flags = IORESOURCE_IRQ,
111 },
112};
113
114struct platform_device mx25_kpp_device = {
115 .name = "imx-keypad",
116 .id = -1,
117 .num_resources = ARRAY_SIZE(mx25_kpp_resources),
118 .resource = mx25_kpp_resources,
119};
120
121static struct resource mx25_csi_resources[] = { 82static struct resource mx25_csi_resources[] = {
122 { 83 {
123 .start = MX25_CSI_BASE_ADDR, 84 .start = MX25_CSI_BASE_ADDR,
diff --git a/arch/arm/mach-mx25/devices.h b/arch/arm/mach-mx25/devices.h
index afc60ddc6a31..dd1fdeddb83b 100644
--- a/arch/arm/mach-mx25/devices.h
+++ b/arch/arm/mach-mx25/devices.h
@@ -1,6 +1,4 @@
1extern struct platform_device mxc_keypad_device;
2extern struct platform_device mx25_rtc_device; 1extern struct platform_device mx25_rtc_device;
3extern struct platform_device mx25_fb_device; 2extern struct platform_device mx25_fb_device;
4extern struct platform_device mxc_wdt; 3extern struct platform_device mxc_wdt;
5extern struct platform_device mx25_kpp_device;
6extern struct platform_device mx25_csi_device; 4extern struct platform_device mx25_csi_device;
diff --git a/arch/arm/mach-mx25/mach-mx25_3ds.c b/arch/arm/mach-mx25/mach-mx25_3ds.c
index 574c41f510df..1d07cfbd8ff6 100644
--- a/arch/arm/mach-mx25/mach-mx25_3ds.c
+++ b/arch/arm/mach-mx25/mach-mx25_3ds.c
@@ -181,7 +181,7 @@ static const uint32_t mx25pdk_keymap[] = {
181 KEY(3, 3, KEY_POWER), 181 KEY(3, 3, KEY_POWER),
182}; 182};
183 183
184static struct matrix_keymap_data mx25pdk_keymap_data = { 184static const struct matrix_keymap_data mx25pdk_keymap_data __initdata = {
185 .keymap = mx25pdk_keymap, 185 .keymap = mx25pdk_keymap,
186 .keymap_size = ARRAY_SIZE(mx25pdk_keymap), 186 .keymap_size = ARRAY_SIZE(mx25pdk_keymap),
187}; 187};
@@ -200,7 +200,7 @@ static void __init mx25pdk_init(void)
200 200
201 mx25pdk_fec_reset(); 201 mx25pdk_fec_reset();
202 imx25_add_fec(&mx25_fec_pdata); 202 imx25_add_fec(&mx25_fec_pdata);
203 mxc_register_device(&mx25_kpp_device, &mx25pdk_keymap_data); 203 imx25_add_imx_keypad(&mx25pdk_keymap_data);
204 204
205 imx25_add_esdhc(0, NULL); 205 imx25_add_esdhc(0, NULL);
206} 206}
diff --git a/arch/arm/plat-mxc/devices/platform-imx-keypad.c b/arch/arm/plat-mxc/devices/platform-imx-keypad.c
index fdfee551a095..5995e819b373 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-keypad.c
+++ b/arch/arm/plat-mxc/devices/platform-imx-keypad.c
@@ -9,20 +9,26 @@
9#include <mach/hardware.h> 9#include <mach/hardware.h>
10#include <mach/devices-common.h> 10#include <mach/devices-common.h>
11 11
12#define imx_imx_keypad_data_entry_single(soc) \ 12#define imx_imx_keypad_data_entry_single(soc, _size) \
13 { \ 13 { \
14 .iobase = soc ## _KPP_BASE_ADDR, \ 14 .iobase = soc ## _KPP_BASE_ADDR, \
15 .iosize = _size, \
15 .irq = soc ## _INT_KPP, \ 16 .irq = soc ## _INT_KPP, \
16 } 17 }
17 18
18#ifdef CONFIG_SOC_IMX21 19#ifdef CONFIG_SOC_IMX21
19const struct imx_imx_keypad_data imx21_imx_keypad_data __initconst = 20const struct imx_imx_keypad_data imx21_imx_keypad_data __initconst =
20 imx_imx_keypad_data_entry_single(MX21); 21 imx_imx_keypad_data_entry_single(MX21, SZ_16);
21#endif /* ifdef CONFIG_SOC_IMX21 */ 22#endif /* ifdef CONFIG_SOC_IMX21 */
22 23
24#ifdef CONFIG_ARCH_MX25
25const struct imx_imx_keypad_data imx25_imx_keypad_data __initconst =
26 imx_imx_keypad_data_entry_single(MX25, SZ_16K);
27#endif
28
23#ifdef CONFIG_SOC_IMX27 29#ifdef CONFIG_SOC_IMX27
24const struct imx_imx_keypad_data imx27_imx_keypad_data __initconst = 30const struct imx_imx_keypad_data imx27_imx_keypad_data __initconst =
25 imx_imx_keypad_data_entry_single(MX27); 31 imx_imx_keypad_data_entry_single(MX27, SZ_16);
26#endif /* ifdef CONFIG_SOC_IMX27 */ 32#endif /* ifdef CONFIG_SOC_IMX27 */
27 33
28struct platform_device *__init imx_add_imx_keypad( 34struct platform_device *__init imx_add_imx_keypad(
@@ -32,7 +38,7 @@ struct platform_device *__init imx_add_imx_keypad(
32 struct resource res[] = { 38 struct resource res[] = {
33 { 39 {
34 .start = data->iobase, 40 .start = data->iobase,
35 .end = data->iobase + SZ_16 - 1, 41 .end = data->iobase + data->iosize - 1,
36 .flags = IORESOURCE_MEM, 42 .flags = IORESOURCE_MEM,
37 }, { 43 }, {
38 .start = data->irq, 44 .start = data->irq,
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h
index 07223b2cf171..8482613e9727 100644
--- a/arch/arm/plat-mxc/include/mach/devices-common.h
+++ b/arch/arm/plat-mxc/include/mach/devices-common.h
@@ -95,6 +95,7 @@ struct platform_device *__init imx_add_imx_i2c(
95#include <linux/input/matrix_keypad.h> 95#include <linux/input/matrix_keypad.h>
96struct imx_imx_keypad_data { 96struct imx_imx_keypad_data {
97 resource_size_t iobase; 97 resource_size_t iobase;
98 resource_size_t iosize;
98 resource_size_t irq; 99 resource_size_t irq;
99}; 100};
100struct platform_device *__init imx_add_imx_keypad( 101struct platform_device *__init imx_add_imx_keypad(