summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-p1852-sdhci.c
diff options
context:
space:
mode:
authorAmlan Kundu <akundu@nvidia.com>2012-01-30 15:32:59 +0530
committerSimone Willett <swillett@nvidia.com>2012-02-09 12:52:40 -0800
commit854b02d84f4fb3583b3b871b82b5fe6f18f775b6 (patch)
tree770d5756c468f454b8f1ac2cec00622ffbaa71e4 /arch/arm/mach-tegra/board-p1852-sdhci.c
parent385778bfee40e5925128ccd5186276c32ef252f2 (diff)
ARM: tegra: p1852: Add board support files for p1852
bug 871603 P1852 is a T30 based Automotive platform. Signed-off-by: Amlan Kundu <akundu@nvidia.com> Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com> Reviewed-on: http://git-master/r/72253 (cherry picked from commit 98d50016e70a22ae7e8e109cfb6633a8fe75f905) Change-Id: Iede9881fc1168bb6802694e233554d84adfb8f44 Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-on: http://git-master/r/79981 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-p1852-sdhci.c')
-rw-r--r--arch/arm/mach-tegra/board-p1852-sdhci.c79
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 000000000000..c1aa066ae1b0
--- /dev/null
+++ b/arch/arm/mach-tegra/board-p1852-sdhci.c
@@ -0,0 +1,79 @@
+/*
+ * arch/arm/mach-tegra/board-p1852-sdhci.c
+ *
+ * Copyright (C) 2010 Google, Inc.
+ *
+ * Copyright (C) 2012 NVIDIA Corporation
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that 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.
+ *
+ */
+
+#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-p1852.h"
+#include "devices.h"
+
+static struct tegra_sdhci_platform_data tegra_sdhci_platform_data1 = {
+ .cd_gpio = TEGRA_GPIO_PV2,
+ .wp_gpio = TEGRA_GPIO_PD3,
+ .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 = true,
+};
+
+static struct tegra_sdhci_platform_data tegra_sdhci_platform_data3 = {
+ .cd_gpio = TEGRA_GPIO_PV3,
+ .wp_gpio = TEGRA_GPIO_PD4,
+ .power_gpio = -1,
+ .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 p1852_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;
+}