From: Gary King Date: Wed, 14 Jul 2010 01:30:59 +0000 (-0700) Subject: [ARM] tegra: harmony/ventana: register additional devices X-Git-Tag: firefly_0821_release~9833^2~312 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0b00f73157027c73663cff2c04a9061bb04a3a2d;p=firefly-linux-kernel-4.4.55.git [ARM] tegra: harmony/ventana: register additional devices register GART, pda_power, and OTG devices Change-Id: I6dec5f765494cdc96f3395cf32fd962c87bf70b7 Signed-off-by: Gary King --- diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index a5521983ef89..ebf8362fd3a5 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -34,7 +35,9 @@ #include #include #include +#include +#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, 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 #include #include +#include +#include +#include +#include #include #include @@ -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);