summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-07-13 18:30:59 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:34:53 -0800
commitae5ebde3d5ac7fe1d3213582a5730b891326e23e (patch)
treea1f23ab463212fbf0197c4bfce653bd176816f04 /arch
parent307c1328459c091812f00281b01f1ab5206ab64b (diff)
[ARM] tegra: harmony/ventana: register additional devices
register GART, pda_power, and OTG devices Change-Id: I6dec5f765494cdc96f3395cf32fd962c87bf70b7 Signed-off-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-harmony.c27
-rw-r--r--arch/arm/mach-tegra/board-ventana.c77
2 files changed, 103 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index 34a903e93e4c..b0b69e26a7e7 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -41,7 +41,9 @@
#include <mach/irqs.h>
#include <mach/sdhci.h>
#include <mach/nand.h>
+#include <mach/clk.h>
+#include "clock.h"
#include "board.h"
#include "board-harmony.h"
#include "clock.h"
@@ -226,7 +228,7 @@ static struct fsl_usb2_platform_data tegra_otg_pdata = {
.phy_mode = FSL_USB2_PHY_UTMI,
};
-struct platform_device tegra_otg = {
+static struct platform_device tegra_otg = {
.name = "fsl-tegra-udc",
.id = -1,
.dev = {
@@ -250,6 +252,28 @@ static struct platform_device pda_power_device = {
},
};
+static struct resource tegra_gart_resources[] = {
+ {
+ .name = "mc",
+ .flags = IORESOURCE_MEM,
+ .start = TEGRA_MC_BASE,
+ .end = TEGRA_MC_BASE + TEGRA_MC_SIZE - 1,
+ },
+ {
+ .name = "gart",
+ .flags = IORESOURCE_MEM,
+ .start = 0x58000000,
+ .end = 0x58000000 - 1 + 32 * 1024 * 1024,
+ }
+};
+
+static struct platform_device tegra_gart_dev = {
+ .name = "tegra_gart",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(tegra_gart_resources),
+ .resource = tegra_gart_resources
+};
+
static struct platform_device *harmony_devices[] __initdata = {
&debug_uart,
&tegra_sdhci_device1,
@@ -270,6 +294,7 @@ static struct platform_device *harmony_devices[] __initdata = {
&tegra_spi_device2,
&tegra_spi_device3,
&tegra_spi_device4,
+ &tegra_gart_dev,
};
static void __init tegra_harmony_fixup(struct machine_desc *desc,
diff --git a/arch/arm/mach-tegra/board-ventana.c b/arch/arm/mach-tegra/board-ventana.c
index a42868a9f4f8..eef18980947d 100644
--- a/arch/arm/mach-tegra/board-ventana.c
+++ b/arch/arm/mach-tegra/board-ventana.c
@@ -26,6 +26,10 @@
#include <linux/clk.h>
#include <linux/serial_8250.h>
#include <linux/i2c.h>
+#include <linux/pda_power.h>
+#include <linux/dma-mapping.h>
+#include <linux/fsl_devices.h>
+#include <linux/delay.h>
#include <mach/iomap.h>
#include <mach/irqs.h>
@@ -64,11 +68,84 @@ static struct platform_device debug_uart = {
static __initdata struct tegra_clk_init_table ventana_clk_init_table[] = {
/* name parent rate enabled */
{ "uartd", "pll_p", 216000000, true},
+ { "pll_m", "clk_m", 600000000, true},
+ { "emc", "pll_m", 600000000, true},
{ NULL, NULL, 0, 0},
};
+/* OTG gadget device */
+static u64 tegra_otg_dmamask = DMA_BIT_MASK(32);
+
+
+static struct resource tegra_otg_resources[] = {
+ [0] = {
+ .start = TEGRA_USB_BASE,
+ .end = TEGRA_USB_BASE + TEGRA_USB_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = INT_USB,
+ .end = INT_USB,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct fsl_usb2_platform_data tegra_otg_pdata = {
+ .operating_mode = FSL_USB2_DR_DEVICE,
+ .phy_mode = FSL_USB2_PHY_UTMI,
+};
+
+static struct platform_device tegra_otg = {
+ .name = "fsl-tegra-udc",
+ .id = -1,
+ .dev = {
+ .dma_mask = &tegra_otg_dmamask,
+ .coherent_dma_mask = 0xffffffff,
+ .platform_data = &tegra_otg_pdata,
+ },
+ .resource = tegra_otg_resources,
+ .num_resources = ARRAY_SIZE(tegra_otg_resources),
+};
+
+/* PDA power */
+static struct pda_power_pdata pda_power_pdata = {
+};
+
+static struct platform_device pda_power_device = {
+ .name = "pda_power",
+ .id = -1,
+ .dev = {
+ .platform_data = &pda_power_pdata,
+ },
+};
+
+static struct resource tegra_gart_resources[] = {
+ {
+ .name = "mc",
+ .flags = IORESOURCE_MEM,
+ .start = TEGRA_MC_BASE,
+ .end = TEGRA_MC_BASE + TEGRA_MC_SIZE - 1,
+ },
+ {
+ .name = "gart",
+ .flags = IORESOURCE_MEM,
+ .start = 0x58000000,
+ .end = 0x58000000 - 1 + 32 * 1024 * 1024,
+ }
+};
+
+static struct platform_device tegra_gart_dev = {
+ .name = "tegra_gart",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(tegra_gart_resources),
+ .resource = tegra_gart_resources
+};
+
static struct platform_device *ventana_devices[] __initdata = {
&debug_uart,
+ &tegra_otg,
+ &pda_power_device,
+ &tegra_gart_dev,
};
extern int __init ventana_sdhci_init(void);