summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/p852/board-p852-sku8-b00.c
diff options
context:
space:
mode:
authorManoj Chourasia <mchourasia@nvidia.com>2011-09-19 16:25:57 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:29 -0800
commite44ea6d665f660324f58dbe15d00d8899d8546c5 (patch)
tree075be1a941d441aa9bc71f436b5090f8fec176cb /arch/arm/mach-tegra/p852/board-p852-sku8-b00.c
parente7fbb0f99e1253a929ab6be5127caafeb7a436df (diff)
tegra: p852: Add initial support of p852 platform
This patch adds initial support for p852 platform bug 872849 Signed-off-by: Manoj Chourasia<mchourasia@nvidia.com> Reviewed-on: http://git-master/r/46397 Tested-by: Manoj Chourasia <mchourasia@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com> (cherry picked from commit 7c3e671d05fcabdac4e73adf8f3f297924d44498) Change-Id: I098489f5ef672ab1462edc0a188dc107f1291435 Reviewed-on: http://git-master/r/56897 Tested-by: Manoj Chourasia <mchourasia@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: R7bfc6620b98515249ead457cf9dde9d2f267de64
Diffstat (limited to 'arch/arm/mach-tegra/p852/board-p852-sku8-b00.c')
-rw-r--r--arch/arm/mach-tegra/p852/board-p852-sku8-b00.c88
1 files changed, 88 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/p852/board-p852-sku8-b00.c b/arch/arm/mach-tegra/p852/board-p852-sku8-b00.c
new file mode 100644
index 000000000000..4cc4d53d980f
--- /dev/null
+++ b/arch/arm/mach-tegra/p852/board-p852-sku8-b00.c
@@ -0,0 +1,88 @@
+/*
+ * arch/arm/mach-tegra/board-p852-sku8-b00.c
+ *
+ * Copyright (C) 2010-2011, 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 "board-p852.h"
+
+static inline void p852_sku8_b00_spi_init(void)
+{
+ p852_sku_peripherals |= P852_SKU_SPI_ENABLE;
+ p852_spi_peripherals |=
+ ((P852_SPI_MASTER | P852_SPI_ENABLE) << P852_SPI1_SHIFT) |
+ ((P852_SPI_MASTER | P852_SPI_ENABLE) << P852_SPI4_SHIFT);
+}
+
+static inline void p852_sku8_b00_i2s_init(void)
+{
+ p852_sku_peripherals |= P852_SKU_I2S_ENABLE;
+ p852_i2s_peripherals |= ((P852_I2S_ENABLE | P852_I2S_TDM)
+ << P852_I2S1_SHIFT) | ((P852_I2S_ENABLE | P852_I2S_TDM)
+ << P852_I2S2_SHIFT);
+}
+
+static inline void p852_sku8_b00_sdhci_init(void)
+{
+ p852_sku_peripherals |= P852_SKU_SDHCI_ENABLE;
+ p852_sdhci_peripherals |=
+ ((P852_SDHCI_ENABLE)
+ << P852_SDHCI4_SHIFT) |
+ ((P852_SDHCI_ENABLE | P852_SDHCI_CD_EN | P852_SDHCI_WP_EN)
+ << P852_SDHCI1_SHIFT) |
+ ((P852_SDHCI_ENABLE | P852_SDHCI_CD_EN | P852_SDHCI_WP_EN)
+ << P852_SDHCI3_SHIFT);
+
+ p852_sdhci_platform_data[0].cd_gpio = TEGRA_GPIO_PV0;
+ p852_sdhci_platform_data[0].wp_gpio = TEGRA_GPIO_PV1;
+ p852_sdhci_platform_data[2].cd_gpio = TEGRA_GPIO_PD7;
+ p852_sdhci_platform_data[2].wp_gpio = TEGRA_GPIO_PT4;
+}
+
+static inline void p852_sku8_b00_uart_init(void)
+{
+ p852_sku_peripherals |= P852_SKU_UART_ENABLE;
+ p852_uart_peripherals |=
+ ((P852_UART_ENABLE | P852_UART_DB) << P852_UARTD_SHIFT) |
+ ((P852_UART_ENABLE | P852_UART_HS) << P852_UARTB_SHIFT);
+}
+
+static inline void p852_sku8_b00_display_init(void)
+{
+ p852_sku_peripherals |= P852_SKU_DISPLAY_ENABLE;
+}
+
+static inline void p852_sku8_b00_i2c_init(void)
+{
+ p852_sku_peripherals |= P852_SKU_I2C_ENABLE;
+ p852_i2c_peripherals |=
+ ((P852_I2C_ENABLE) << P852_I2C1_SHIFT) |
+ ((P852_I2C_ENABLE) << P852_I2C2_SHIFT) |
+ ((P852_I2C_ENABLE) << P852_I2C4_SHIFT);
+}
+
+
+void __init p852_sku8_b00_init(void)
+{
+ p852_sku_peripherals |= P852_SKU_NOR_ENABLE;
+
+ p852_sku8_b00_spi_init();
+ p852_sku8_b00_i2s_init();
+ p852_sku8_b00_uart_init();
+ p852_sku8_b00_sdhci_init();
+ p852_sku8_b00_display_init();
+ p852_sku8_b00_i2c_init();
+
+ p852_common_init();
+}
+