diff options
author | Colin Cross <ccross@android.com> | 2011-07-10 17:59:45 -0400 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-07-12 23:39:40 -0400 |
commit | 681e6edc25a452e26e263386caaa4afb02b5f131 (patch) | |
tree | 1937aaf7057031bda8d03608314e422aa818fd0f /arch/arm/mach-tegra/devices.c | |
parent | 78702e43c1cadd600e35374411caba82ad9354b6 (diff) |
ARM: tegra: remove copy-and-pasted usb platform data from boards
trimslice and paz00 both have functionally identical platform
data for the tegra-ehci driver. Move the platform data into
devices.c, and remove it from all the board files.
Signed-off-by: Colin Cross <ccross@android.com>
Tested-by: Konstantin Sinyuk <kostyas@compulab.co.il>
Acked-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra/devices.c')
-rw-r--r-- | arch/arm/mach-tegra/devices.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c index 066eaf9533fe..57e35d20c24c 100644 --- a/arch/arm/mach-tegra/devices.c +++ b/arch/arm/mach-tegra/devices.c | |||
@@ -23,10 +23,13 @@ | |||
23 | #include <linux/fsl_devices.h> | 23 | #include <linux/fsl_devices.h> |
24 | #include <linux/serial_8250.h> | 24 | #include <linux/serial_8250.h> |
25 | #include <linux/i2c-tegra.h> | 25 | #include <linux/i2c-tegra.h> |
26 | #include <linux/platform_data/tegra_usb.h> | ||
26 | #include <asm/pmu.h> | 27 | #include <asm/pmu.h> |
27 | #include <mach/irqs.h> | 28 | #include <mach/irqs.h> |
28 | #include <mach/iomap.h> | 29 | #include <mach/iomap.h> |
29 | #include <mach/dma.h> | 30 | #include <mach/dma.h> |
31 | #include <mach/usb_phy.h> | ||
32 | #include "gpio-names.h" | ||
30 | 33 | ||
31 | static struct resource i2c_resource1[] = { | 34 | static struct resource i2c_resource1[] = { |
32 | [0] = { | 35 | [0] = { |
@@ -351,6 +354,28 @@ static struct resource tegra_usb3_resources[] = { | |||
351 | }, | 354 | }, |
352 | }; | 355 | }; |
353 | 356 | ||
357 | static struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config = { | ||
358 | /* All existing boards use GPIO PV0 for phy reset */ | ||
359 | .reset_gpio = TEGRA_GPIO_PV0, | ||
360 | .clk = "cdev2", | ||
361 | }; | ||
362 | |||
363 | static struct tegra_ehci_platform_data tegra_ehci1_pdata = { | ||
364 | .operating_mode = TEGRA_USB_OTG, | ||
365 | .power_down_on_bus_suspend = 1, | ||
366 | }; | ||
367 | |||
368 | static struct tegra_ehci_platform_data tegra_ehci2_pdata = { | ||
369 | .phy_config = &tegra_ehci2_ulpi_phy_config, | ||
370 | .operating_mode = TEGRA_USB_HOST, | ||
371 | .power_down_on_bus_suspend = 1, | ||
372 | }; | ||
373 | |||
374 | static struct tegra_ehci_platform_data tegra_ehci3_pdata = { | ||
375 | .operating_mode = TEGRA_USB_HOST, | ||
376 | .power_down_on_bus_suspend = 1, | ||
377 | }; | ||
378 | |||
354 | static u64 tegra_ehci_dmamask = DMA_BIT_MASK(32); | 379 | static u64 tegra_ehci_dmamask = DMA_BIT_MASK(32); |
355 | 380 | ||
356 | struct platform_device tegra_ehci1_device = { | 381 | struct platform_device tegra_ehci1_device = { |
@@ -359,6 +384,7 @@ struct platform_device tegra_ehci1_device = { | |||
359 | .dev = { | 384 | .dev = { |
360 | .dma_mask = &tegra_ehci_dmamask, | 385 | .dma_mask = &tegra_ehci_dmamask, |
361 | .coherent_dma_mask = DMA_BIT_MASK(32), | 386 | .coherent_dma_mask = DMA_BIT_MASK(32), |
387 | .platform_data = &tegra_ehci1_pdata, | ||
362 | }, | 388 | }, |
363 | .resource = tegra_usb1_resources, | 389 | .resource = tegra_usb1_resources, |
364 | .num_resources = ARRAY_SIZE(tegra_usb1_resources), | 390 | .num_resources = ARRAY_SIZE(tegra_usb1_resources), |
@@ -370,6 +396,7 @@ struct platform_device tegra_ehci2_device = { | |||
370 | .dev = { | 396 | .dev = { |
371 | .dma_mask = &tegra_ehci_dmamask, | 397 | .dma_mask = &tegra_ehci_dmamask, |
372 | .coherent_dma_mask = DMA_BIT_MASK(32), | 398 | .coherent_dma_mask = DMA_BIT_MASK(32), |
399 | .platform_data = &tegra_ehci2_pdata, | ||
373 | }, | 400 | }, |
374 | .resource = tegra_usb2_resources, | 401 | .resource = tegra_usb2_resources, |
375 | .num_resources = ARRAY_SIZE(tegra_usb2_resources), | 402 | .num_resources = ARRAY_SIZE(tegra_usb2_resources), |
@@ -381,6 +408,7 @@ struct platform_device tegra_ehci3_device = { | |||
381 | .dev = { | 408 | .dev = { |
382 | .dma_mask = &tegra_ehci_dmamask, | 409 | .dma_mask = &tegra_ehci_dmamask, |
383 | .coherent_dma_mask = DMA_BIT_MASK(32), | 410 | .coherent_dma_mask = DMA_BIT_MASK(32), |
411 | .platform_data = &tegra_ehci3_pdata, | ||
384 | }, | 412 | }, |
385 | .resource = tegra_usb3_resources, | 413 | .resource = tegra_usb3_resources, |
386 | .num_resources = ARRAY_SIZE(tegra_usb3_resources), | 414 | .num_resources = ARRAY_SIZE(tegra_usb3_resources), |