diff options
Diffstat (limited to 'arch/arm/mach-tegra/board-p1852-sdhci.c')
-rw-r--r-- | arch/arm/mach-tegra/board-p1852-sdhci.c | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-p1852-sdhci.c b/arch/arm/mach-tegra/board-p1852-sdhci.c new file mode 100644 index 00000000000..c1aa066ae1b --- /dev/null +++ b/arch/arm/mach-tegra/board-p1852-sdhci.c | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-tegra/board-p1852-sdhci.c | ||
3 | * | ||
4 | * Copyright (C) 2010 Google, Inc. | ||
5 | * | ||
6 | * Copyright (C) 2012 NVIDIA Corporation | ||
7 | * | ||
8 | * This software is licensed under the terms of the GNU General Public | ||
9 | * License version 2, as published by the Free Software Foundation, and | ||
10 | * may be copied, distributed, and modified under those terms. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #include <linux/resource.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/wlan_plat.h> | ||
22 | #include <linux/delay.h> | ||
23 | #include <linux/gpio.h> | ||
24 | #include <linux/clk.h> | ||
25 | #include <linux/err.h> | ||
26 | #include <linux/mmc/host.h> | ||
27 | |||
28 | #include <asm/mach-types.h> | ||
29 | #include <mach/irqs.h> | ||
30 | #include <mach/iomap.h> | ||
31 | #include <mach/sdhci.h> | ||
32 | |||
33 | #include "gpio-names.h" | ||
34 | #include "board.h" | ||
35 | #include "board-p1852.h" | ||
36 | #include "devices.h" | ||
37 | |||
38 | static struct tegra_sdhci_platform_data tegra_sdhci_platform_data1 = { | ||
39 | .cd_gpio = TEGRA_GPIO_PV2, | ||
40 | .wp_gpio = TEGRA_GPIO_PD3, | ||
41 | .power_gpio = -1, | ||
42 | .is_8bit = false, | ||
43 | }; | ||
44 | |||
45 | static struct tegra_sdhci_platform_data tegra_sdhci_platform_data2 = { | ||
46 | .cd_gpio = -1, | ||
47 | .wp_gpio = -1, | ||
48 | .power_gpio = -1, | ||
49 | .is_8bit = true, | ||
50 | }; | ||
51 | |||
52 | static struct tegra_sdhci_platform_data tegra_sdhci_platform_data3 = { | ||
53 | .cd_gpio = TEGRA_GPIO_PV3, | ||
54 | .wp_gpio = TEGRA_GPIO_PD4, | ||
55 | .power_gpio = -1, | ||
56 | .is_8bit = false, | ||
57 | }; | ||
58 | |||
59 | static struct tegra_sdhci_platform_data tegra_sdhci_platform_data4 = { | ||
60 | .cd_gpio = -1, | ||
61 | .wp_gpio = -1, | ||
62 | .power_gpio = -1, | ||
63 | .is_8bit = true, | ||
64 | }; | ||
65 | |||
66 | int __init p1852_sdhci_init(void) | ||
67 | { | ||
68 | tegra_sdhci_device1.dev.platform_data = &tegra_sdhci_platform_data1; | ||
69 | tegra_sdhci_device2.dev.platform_data = &tegra_sdhci_platform_data2; | ||
70 | tegra_sdhci_device3.dev.platform_data = &tegra_sdhci_platform_data3; | ||
71 | tegra_sdhci_device4.dev.platform_data = &tegra_sdhci_platform_data4; | ||
72 | |||
73 | platform_device_register(&tegra_sdhci_device1); | ||
74 | platform_device_register(&tegra_sdhci_device2); | ||
75 | platform_device_register(&tegra_sdhci_device3); | ||
76 | platform_device_register(&tegra_sdhci_device4); | ||
77 | |||
78 | return 0; | ||
79 | } | ||