aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-30 11:26:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-30 11:26:25 -0400
commit706d4b12f8d7edd28d7e879a77235472da393edb (patch)
treec9bc1ce06b1154a49da1d0d907cac544a818eb0e /arch/arm/mach-imx
parent3af54c9bd9e6f14f896aac1bb0e8405ae0bc7a44 (diff)
parent9bafc74163d8bccca9810159aab39be926fb877c (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (215 commits) ARM: memblock: setup lowmem mappings using memblock ARM: memblock: move meminfo into find_limits directly ARM: memblock: convert free_highpages() to use memblock ARM: move freeing of highmem pages out of mem_init() ARM: memblock: convert memory detail printing to use memblock ARM: memblock: use memblock to free memory into arm_bootmem_init() ARM: memblock: use memblock when initializing memory allocators ARM: ensure membank array is always sorted ARM: 6466/1: implement flush_icache_all for the rest of the CPUs ARM: 6464/2: fix spinlock recursion in adjust_pte() ARM: fix memblock breakage ARM: 6465/1: Fix data abort accessing proc_info from __lookup_processor_type ARM: 6460/1: ixp2000: fix type of ixp2000_timer_interrupt ARM: 6449/1: Fix for compiler warning of uninitialized variable. ARM: 6445/1: fixup TCM memory types ARM: imx: Add wake functionality to GPIO ARM: mx5: Add gpio-keys to mx51 babbage board ARM: imx: Add gpio-keys to plat-mxc mx31_3ds: Fix spi registration mx31_3ds: Fix the logic for detecting the debug board ...
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/mach-mx27_3ds.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index b8bbd31aa850..84a5ba03f1ba 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -23,16 +23,20 @@
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/gpio.h> 24#include <linux/gpio.h>
25#include <linux/input/matrix_keypad.h> 25#include <linux/input/matrix_keypad.h>
26#include <linux/irq.h>
26#include <asm/mach-types.h> 27#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
28#include <asm/mach/time.h> 29#include <asm/mach/time.h>
29#include <mach/hardware.h> 30#include <mach/hardware.h>
30#include <mach/common.h> 31#include <mach/common.h>
31#include <mach/iomux-mx27.h> 32#include <mach/iomux-mx27.h>
33#include <mach/mmc.h>
32 34
33#include "devices-imx27.h" 35#include "devices-imx27.h"
34#include "devices.h" 36#include "devices.h"
35 37
38#define SD1_EN_GPIO (GPIO_PORTB + 25)
39
36static const int mx27pdk_pins[] __initconst = { 40static const int mx27pdk_pins[] __initconst = {
37 /* UART1 */ 41 /* UART1 */
38 PE12_PF_UART1_TXD, 42 PE12_PF_UART1_TXD,
@@ -58,6 +62,14 @@ static const int mx27pdk_pins[] __initconst = {
58 PD15_AOUT_FEC_COL, 62 PD15_AOUT_FEC_COL,
59 PD16_AIN_FEC_TX_ER, 63 PD16_AIN_FEC_TX_ER,
60 PF23_AIN_FEC_TX_EN, 64 PF23_AIN_FEC_TX_EN,
65 /* SDHC1 */
66 PE18_PF_SD1_D0,
67 PE19_PF_SD1_D1,
68 PE20_PF_SD1_D2,
69 PE21_PF_SD1_D3,
70 PE22_PF_SD1_CMD,
71 PE23_PF_SD1_CLK,
72 SD1_EN_GPIO | GPIO_GPIO | GPIO_OUT,
61}; 73};
62 74
63static const struct imxuart_platform_data uart_pdata __initconst = { 75static const struct imxuart_platform_data uart_pdata __initconst = {
@@ -85,13 +97,39 @@ static struct matrix_keymap_data mx27_3ds_keymap_data = {
85 .keymap_size = ARRAY_SIZE(mx27_3ds_keymap), 97 .keymap_size = ARRAY_SIZE(mx27_3ds_keymap),
86}; 98};
87 99
100static int mx27_3ds_sdhc1_init(struct device *dev, irq_handler_t detect_irq,
101 void *data)
102{
103 return request_irq(IRQ_GPIOB(26), detect_irq, IRQF_TRIGGER_FALLING |
104 IRQF_TRIGGER_RISING, "sdhc1-card-detect", data);
105}
106
107static void mx27_3ds_sdhc1_exit(struct device *dev, void *data)
108{
109 free_irq(IRQ_GPIOB(26), data);
110}
111
112static struct imxmmc_platform_data sdhc1_pdata = {
113 .init = mx27_3ds_sdhc1_init,
114 .exit = mx27_3ds_sdhc1_exit,
115};
116
117static void mx27_3ds_sdhc1_enable_level_translator(void)
118{
119 /* Turn on TXB0108 OE pin */
120 gpio_request(SD1_EN_GPIO, "sd1_enable");
121 gpio_direction_output(SD1_EN_GPIO, 1);
122}
123
88static void __init mx27pdk_init(void) 124static void __init mx27pdk_init(void)
89{ 125{
90 mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), 126 mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins),
91 "mx27pdk"); 127 "mx27pdk");
128 mx27_3ds_sdhc1_enable_level_translator();
92 imx27_add_imx_uart0(&uart_pdata); 129 imx27_add_imx_uart0(&uart_pdata);
93 imx27_add_fec(NULL); 130 imx27_add_fec(NULL);
94 mxc_register_device(&imx_kpp_device, &mx27_3ds_keymap_data); 131 mxc_register_device(&imx_kpp_device, &mx27_3ds_keymap_data);
132 mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata);
95} 133}
96 134
97static void __init mx27pdk_timer_init(void) 135static void __init mx27pdk_timer_init(void)