diff options
author | Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> | 2011-08-27 09:15:58 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-08-27 14:31:41 -0400 |
commit | 600ea5cd76d0db0a4af4557a45d1ac4400fdadf5 (patch) | |
tree | ffef591d9f04b7d1425e6bc948a227772f363bcd /arch/arm/mach-mx5 | |
parent | 91dcc7f437d3e8224dec51f2e0808ba8171309a9 (diff) |
efika: Configure esdhc cd/wp on efika mx/sb
Update sdhc support on efika to make use of the latest mmc fixes.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx5')
-rw-r--r-- | arch/arm/mach-mx5/board-mx51_efikamx.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-mx51_efikasb.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-mx5/mx51_efika.c | 1 |
3 files changed, 26 insertions, 4 deletions
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c index 551daf85ff8c..f292547dcc57 100644 --- a/arch/arm/mach-mx5/board-mx51_efikamx.c +++ b/arch/arm/mach-mx5/board-mx51_efikamx.c | |||
@@ -163,6 +163,11 @@ static const struct gpio_led_platform_data | |||
163 | .num_leds = ARRAY_SIZE(mx51_efikamx_leds), | 163 | .num_leds = ARRAY_SIZE(mx51_efikamx_leds), |
164 | }; | 164 | }; |
165 | 165 | ||
166 | static struct esdhc_platform_data sd_pdata = { | ||
167 | .cd_type = ESDHC_CD_CONTROLLER, | ||
168 | .wp_type = ESDHC_WP_CONTROLLER, | ||
169 | }; | ||
170 | |||
166 | static struct gpio_keys_button mx51_efikamx_powerkey[] = { | 171 | static struct gpio_keys_button mx51_efikamx_powerkey[] = { |
167 | { | 172 | { |
168 | .code = KEY_POWER, | 173 | .code = KEY_POWER, |
@@ -239,9 +244,11 @@ static void __init mx51_efikamx_init(void) | |||
239 | 244 | ||
240 | /* on < 1.2 boards both SD controllers are used */ | 245 | /* on < 1.2 boards both SD controllers are used */ |
241 | if (system_rev < 0x12) { | 246 | if (system_rev < 0x12) { |
242 | imx51_add_sdhci_esdhc_imx(1, NULL); | 247 | imx51_add_sdhci_esdhc_imx(0, NULL); |
248 | imx51_add_sdhci_esdhc_imx(1, &sd_pdata); | ||
243 | mx51_efikamx_leds[2].default_trigger = "mmc1"; | 249 | mx51_efikamx_leds[2].default_trigger = "mmc1"; |
244 | } | 250 | } else |
251 | imx51_add_sdhci_esdhc_imx(0, &sd_pdata); | ||
245 | 252 | ||
246 | gpio_led_register_device(-1, &mx51_efikamx_leds_data); | 253 | gpio_led_register_device(-1, &mx51_efikamx_leds_data); |
247 | imx_add_gpio_keys(&mx51_efikamx_powerkey_data); | 254 | imx_add_gpio_keys(&mx51_efikamx_powerkey_data); |
diff --git a/arch/arm/mach-mx5/board-mx51_efikasb.c b/arch/arm/mach-mx5/board-mx51_efikasb.c index 8a9bca22beb5..e1847ffe9243 100644 --- a/arch/arm/mach-mx5/board-mx51_efikasb.c +++ b/arch/arm/mach-mx5/board-mx51_efikasb.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #define EFIKASB_RFKILL IMX_GPIO_NR(3, 1) | 56 | #define EFIKASB_RFKILL IMX_GPIO_NR(3, 1) |
57 | 57 | ||
58 | #define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE) | 58 | #define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE) |
59 | #define MX51_PAD_SD1_CD IOMUX_PAD(0x47c, 0x0e8, 1, __NA_, 0, MX51_ESDHC_PAD_CTRL) | ||
59 | 60 | ||
60 | static iomux_v3_cfg_t mx51efikasb_pads[] = { | 61 | static iomux_v3_cfg_t mx51efikasb_pads[] = { |
61 | /* USB HOST2 */ | 62 | /* USB HOST2 */ |
@@ -97,6 +98,8 @@ static iomux_v3_cfg_t mx51efikasb_pads[] = { | |||
97 | 98 | ||
98 | /* BT */ | 99 | /* BT */ |
99 | MX51_PAD_EIM_A17__GPIO2_11, | 100 | MX51_PAD_EIM_A17__GPIO2_11, |
101 | |||
102 | MX51_PAD_SD1_CD, | ||
100 | }; | 103 | }; |
101 | 104 | ||
102 | static int initialize_usbh2_port(struct platform_device *pdev) | 105 | static int initialize_usbh2_port(struct platform_device *pdev) |
@@ -182,6 +185,18 @@ static const struct gpio_keys_platform_data mx51_efikasb_keys_data __initconst = | |||
182 | .nbuttons = ARRAY_SIZE(mx51_efikasb_keys), | 185 | .nbuttons = ARRAY_SIZE(mx51_efikasb_keys), |
183 | }; | 186 | }; |
184 | 187 | ||
188 | static struct esdhc_platform_data sd0_pdata = { | ||
189 | #define EFIKASB_SD1_CD IMX_GPIO_NR(2, 27) | ||
190 | .cd_gpio = EFIKASB_SD1_CD, | ||
191 | .cd_type = ESDHC_CD_GPIO, | ||
192 | .wp_type = ESDHC_WP_CONTROLLER, | ||
193 | }; | ||
194 | |||
195 | static struct esdhc_platform_data sd1_pdata = { | ||
196 | .cd_type = ESDHC_CD_CONTROLLER, | ||
197 | .wp_type = ESDHC_WP_CONTROLLER, | ||
198 | }; | ||
199 | |||
185 | static struct regulator *pwgt1, *pwgt2; | 200 | static struct regulator *pwgt1, *pwgt2; |
186 | 201 | ||
187 | static void mx51_efikasb_power_off(void) | 202 | static void mx51_efikasb_power_off(void) |
@@ -250,7 +265,8 @@ static void __init efikasb_board_init(void) | |||
250 | 265 | ||
251 | mx51_efikasb_board_id(); | 266 | mx51_efikasb_board_id(); |
252 | mx51_efikasb_usb(); | 267 | mx51_efikasb_usb(); |
253 | imx51_add_sdhci_esdhc_imx(1, NULL); | 268 | imx51_add_sdhci_esdhc_imx(0, &sd0_pdata); |
269 | imx51_add_sdhci_esdhc_imx(1, &sd1_pdata); | ||
254 | 270 | ||
255 | gpio_led_register_device(-1, &mx51_efikasb_leds_data); | 271 | gpio_led_register_device(-1, &mx51_efikasb_leds_data); |
256 | imx_add_gpio_keys(&mx51_efikasb_keys_data); | 272 | imx_add_gpio_keys(&mx51_efikasb_keys_data); |
diff --git a/arch/arm/mach-mx5/mx51_efika.c b/arch/arm/mach-mx5/mx51_efika.c index c9209454807a..ec1fcb293a33 100644 --- a/arch/arm/mach-mx5/mx51_efika.c +++ b/arch/arm/mach-mx5/mx51_efika.c | |||
@@ -609,7 +609,6 @@ void __init efika_board_common_init(void) | |||
609 | ARRAY_SIZE(mx51efika_pads)); | 609 | ARRAY_SIZE(mx51efika_pads)); |
610 | imx51_add_imx_uart(0, &uart_pdata); | 610 | imx51_add_imx_uart(0, &uart_pdata); |
611 | mx51_efika_usb(); | 611 | mx51_efika_usb(); |
612 | imx51_add_sdhci_esdhc_imx(0, NULL); | ||
613 | 612 | ||
614 | /* FIXME: comes from original code. check this. */ | 613 | /* FIXME: comes from original code. check this. */ |
615 | if (mx51_revision() < IMX_CHIP_REVISION_2_0) | 614 | if (mx51_revision() < IMX_CHIP_REVISION_2_0) |