diff options
author | Jason Wang <jason77.wang@gmail.com> | 2010-09-02 03:52:03 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-10-01 03:32:20 -0400 |
commit | 988916e1a9af1994d510138e7201acf7b425fb46 (patch) | |
tree | c30f8878b285d4d1f44ea23fe66e320619ffde24 /arch/arm/mach-mx5 | |
parent | eaa4fd0b4022bd4d2ff0c38b3cc936ee5a441711 (diff) |
ARM: mx5/mx51_3ds: add eCSPI2 support on the imx51_3ds board
Signed-off-by: Jason Wang <jason77.wang@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx5')
-rw-r--r-- | arch/arm/mach-mx5/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-mx51_3ds.c | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index e57caefb1f28..2735314a78e0 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
@@ -18,6 +18,7 @@ config MACH_MX51_BABBAGE | |||
18 | 18 | ||
19 | config MACH_MX51_3DS | 19 | config MACH_MX51_3DS |
20 | bool "Support MX51PDK (3DS)" | 20 | bool "Support MX51PDK (3DS)" |
21 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
21 | select MXC_DEBUG_BOARD | 22 | select MXC_DEBUG_BOARD |
22 | help | 23 | help |
23 | Include support for MX51PDK (3DS) platform. This includes specific | 24 | Include support for MX51PDK (3DS) platform. This includes specific |
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c index f95c2fd94667..c9c41282c996 100644 --- a/arch/arm/mach-mx5/board-mx51_3ds.c +++ b/arch/arm/mach-mx5/board-mx51_3ds.c | |||
@@ -24,9 +24,11 @@ | |||
24 | #include <mach/imx-uart.h> | 24 | #include <mach/imx-uart.h> |
25 | #include <mach/3ds_debugboard.h> | 25 | #include <mach/3ds_debugboard.h> |
26 | 26 | ||
27 | #include "devices-imx51.h" | ||
27 | #include "devices.h" | 28 | #include "devices.h" |
28 | 29 | ||
29 | #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 6) | 30 | #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 6) |
31 | #define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) | ||
30 | 32 | ||
31 | static struct pad_desc mx51_3ds_pads[] = { | 33 | static struct pad_desc mx51_3ds_pads[] = { |
32 | /* UART1 */ | 34 | /* UART1 */ |
@@ -61,6 +63,12 @@ static struct pad_desc mx51_3ds_pads[] = { | |||
61 | MX51_PAD_KEY_COL3__KEY_COL3, | 63 | MX51_PAD_KEY_COL3__KEY_COL3, |
62 | MX51_PAD_KEY_COL4__KEY_COL4, | 64 | MX51_PAD_KEY_COL4__KEY_COL4, |
63 | MX51_PAD_KEY_COL5__KEY_COL5, | 65 | MX51_PAD_KEY_COL5__KEY_COL5, |
66 | |||
67 | /* eCSPI2 */ | ||
68 | MX51_PAD_NANDF_RB2__ECSPI2_SCLK, | ||
69 | MX51_PAD_NANDF_RB3__ECSPI2_MISO, | ||
70 | MX51_PAD_NANDF_D15__ECSPI2_MOSI, | ||
71 | MX51_PAD_NANDF_D12__GPIO_3_28, | ||
64 | }; | 72 | }; |
65 | 73 | ||
66 | /* Serial ports */ | 74 | /* Serial ports */ |
@@ -127,6 +135,16 @@ static inline void mxc_init_keypad(void) | |||
127 | } | 135 | } |
128 | #endif | 136 | #endif |
129 | 137 | ||
138 | static int mx51_3ds_spi2_cs[] = { | ||
139 | MXC_SPI_CS(0), | ||
140 | MX51_3DS_ECSPI2_CS, | ||
141 | }; | ||
142 | |||
143 | static const struct spi_imx_master mx51_3ds_ecspi2_pdata __initconst = { | ||
144 | .chipselect = mx51_3ds_spi2_cs, | ||
145 | .num_chipselect = ARRAY_SIZE(mx51_3ds_spi2_cs), | ||
146 | }; | ||
147 | |||
130 | /* | 148 | /* |
131 | * Board specific initialization. | 149 | * Board specific initialization. |
132 | */ | 150 | */ |
@@ -136,6 +154,8 @@ static void __init mxc_board_init(void) | |||
136 | ARRAY_SIZE(mx51_3ds_pads)); | 154 | ARRAY_SIZE(mx51_3ds_pads)); |
137 | mxc_init_imx_uart(); | 155 | mxc_init_imx_uart(); |
138 | 156 | ||
157 | imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata); | ||
158 | |||
139 | if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | 159 | if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT)) |
140 | printk(KERN_WARNING "Init of the debugboard failed, all " | 160 | printk(KERN_WARNING "Init of the debugboard failed, all " |
141 | "devices on the board are unusable.\n"); | 161 | "devices on the board are unusable.\n"); |