[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>
This commit is contained in:
Gary King
2010-07-13 18:30:59 -07:00
committed by Colin Cross
parent 7c1fc9071b
commit 0b00f73157
2 changed files with 104 additions and 1 deletions

View File

@@ -25,6 +25,7 @@
#include <linux/fsl_devices.h>
#include <linux/pda_power.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -34,7 +35,9 @@
#include <mach/iomap.h>
#include <mach/irqs.h>
#include <mach/nand.h>
#include <mach/clk.h>
#include "clock.h"
#include "board.h"
#include "board-harmony.h"
#include "clock.h"
@@ -172,7 +175,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 = {
@@ -196,6 +199,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_nand_device,
@@ -209,6 +234,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,

View File

@@ -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);