diff options
author | Olof Johansson <olof@lixom.net> | 2011-02-19 19:39:37 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2011-02-22 20:28:12 -0500 |
commit | 875d4af6a3bdf548ebf069c1f4254c6ae1edae93 (patch) | |
tree | 5951dea20494c876848faaca49e14a209561a55d /arch/arm/mach-tegra | |
parent | ec243a071d32af0350449c220d1de7c437088879 (diff) |
ARM: tegra: harmony: register sdhci devices
Add the 3 sdhci devices that are available on Harmony as
platform devices. Two go to slots (one 4-lane, one 8-lane),
and one goes to onboard wifi.
Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/board-harmony.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index f4c41c010e16..49224e936eb4 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c | |||
@@ -30,10 +30,13 @@ | |||
30 | 30 | ||
31 | #include <mach/iomap.h> | 31 | #include <mach/iomap.h> |
32 | #include <mach/irqs.h> | 32 | #include <mach/irqs.h> |
33 | #include <mach/sdhci.h> | ||
33 | 34 | ||
34 | #include "board.h" | 35 | #include "board.h" |
35 | #include "board-harmony.h" | 36 | #include "board-harmony.h" |
36 | #include "clock.h" | 37 | #include "clock.h" |
38 | #include "devices.h" | ||
39 | #include "gpio-names.h" | ||
37 | 40 | ||
38 | static struct plat_serial8250_port debug_uart_platform_data[] = { | 41 | static struct plat_serial8250_port debug_uart_platform_data[] = { |
39 | { | 42 | { |
@@ -59,6 +62,9 @@ static struct platform_device debug_uart = { | |||
59 | 62 | ||
60 | static struct platform_device *harmony_devices[] __initdata = { | 63 | static struct platform_device *harmony_devices[] __initdata = { |
61 | &debug_uart, | 64 | &debug_uart, |
65 | &tegra_sdhci_device1, | ||
66 | &tegra_sdhci_device2, | ||
67 | &tegra_sdhci_device4, | ||
62 | }; | 68 | }; |
63 | 69 | ||
64 | static void __init tegra_harmony_fixup(struct machine_desc *desc, | 70 | static void __init tegra_harmony_fixup(struct machine_desc *desc, |
@@ -77,12 +83,36 @@ static __initdata struct tegra_clk_init_table harmony_clk_init_table[] = { | |||
77 | { NULL, NULL, 0, 0}, | 83 | { NULL, NULL, 0, 0}, |
78 | }; | 84 | }; |
79 | 85 | ||
86 | |||
87 | static struct tegra_sdhci_platform_data sdhci_pdata1 = { | ||
88 | .cd_gpio = -1, | ||
89 | .wp_gpio = -1, | ||
90 | .power_gpio = -1, | ||
91 | }; | ||
92 | |||
93 | static struct tegra_sdhci_platform_data sdhci_pdata2 = { | ||
94 | .cd_gpio = TEGRA_GPIO_PI5, | ||
95 | .wp_gpio = TEGRA_GPIO_PH1, | ||
96 | .power_gpio = TEGRA_GPIO_PT3, | ||
97 | }; | ||
98 | |||
99 | static struct tegra_sdhci_platform_data sdhci_pdata4 = { | ||
100 | .cd_gpio = TEGRA_GPIO_PH2, | ||
101 | .wp_gpio = TEGRA_GPIO_PH3, | ||
102 | .power_gpio = TEGRA_GPIO_PI6, | ||
103 | .is_8bit = 1, | ||
104 | }; | ||
105 | |||
80 | static void __init tegra_harmony_init(void) | 106 | static void __init tegra_harmony_init(void) |
81 | { | 107 | { |
82 | tegra_clk_init_from_table(harmony_clk_init_table); | 108 | tegra_clk_init_from_table(harmony_clk_init_table); |
83 | 109 | ||
84 | harmony_pinmux_init(); | 110 | harmony_pinmux_init(); |
85 | 111 | ||
112 | tegra_sdhci_device1.dev.platform_data = &sdhci_pdata1; | ||
113 | tegra_sdhci_device2.dev.platform_data = &sdhci_pdata2; | ||
114 | tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4; | ||
115 | |||
86 | platform_add_devices(harmony_devices, ARRAY_SIZE(harmony_devices)); | 116 | platform_add_devices(harmony_devices, ARRAY_SIZE(harmony_devices)); |
87 | } | 117 | } |
88 | 118 | ||