1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
/*
* arch/arm/mach-tegra/board-e1853-sdhci.c
*
* Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include <linux/resource.h>
#include <linux/platform_device.h>
#include <linux/wlan_plat.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/mmc/host.h>
#include <asm/mach-types.h>
#include <mach/irqs.h>
#include <mach/iomap.h>
#include <mach/sdhci.h>
#include "gpio-names.h"
#include "board.h"
#include "board-e1853.h"
#include "devices.h"
static struct tegra_sdhci_platform_data tegra_sdhci_platform_data1 = {
.cd_gpio = -1,
.wp_gpio = -1,
.power_gpio = -1,
.is_8bit = false,
};
static struct tegra_sdhci_platform_data tegra_sdhci_platform_data2 = {
.cd_gpio = -1,
.wp_gpio = -1,
.power_gpio = -1,
.is_8bit = 1,
.mmc_data = {
.built_in = 1,
}
};
static struct tegra_sdhci_platform_data tegra_sdhci_platform_data3 = {
.cd_gpio = TEGRA_GPIO_PN6,
.wp_gpio = TEGRA_GPIO_PD4,
.power_gpio = TEGRA_GPIO_PN7,
.is_8bit = false,
};
static struct tegra_sdhci_platform_data tegra_sdhci_platform_data4 = {
.cd_gpio = -1,
.wp_gpio = -1,
.power_gpio = -1,
.is_8bit = true,
};
int __init e1853_sdhci_init(void)
{
tegra_sdhci_device1.dev.platform_data = &tegra_sdhci_platform_data1;
tegra_sdhci_device2.dev.platform_data = &tegra_sdhci_platform_data2;
tegra_sdhci_device3.dev.platform_data = &tegra_sdhci_platform_data3;
tegra_sdhci_device4.dev.platform_data = &tegra_sdhci_platform_data4;
platform_device_register(&tegra_sdhci_device1);
platform_device_register(&tegra_sdhci_device2);
platform_device_register(&tegra_sdhci_device3);
platform_device_register(&tegra_sdhci_device4);
return 0;
}
|