From 50e6eff5fbb10c0866e873a23dfb6c046a9ec119 Mon Sep 17 00:00:00 2001 From: Benoit Goby Date: Fri, 10 Sep 2010 00:52:27 -0700 Subject: [PATCH] [ARM] tegra: board-stingray: Platform data for ehci devices Change-Id: I8a0120d016ed5cf5b0080a86af6b324b1f3e9d1c Signed-off-by: Benoit Goby --- arch/arm/mach-tegra/board-stingray.c | 29 +++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-tegra/board-stingray.c b/arch/arm/mach-tegra/board-stingray.c index 1a6a2c42a2b5..644487988145 100644 --- a/arch/arm/mach-tegra/board-stingray.c +++ b/arch/arm/mach-tegra/board-stingray.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -385,7 +386,7 @@ static struct platform_device rndis_device = { }; #endif -static struct tegra_utmip_config host_phy_config[] = { +static struct tegra_utmip_config utmi_phy_config[] = { [0] = { .hssync_start_delay = 0, .idle_wait_delay = 17, @@ -395,7 +396,7 @@ static struct tegra_utmip_config host_phy_config[] = { .xcvr_lsfslew = 2, .xcvr_lsrslew = 2, }, - [2] = { + [1] = { .hssync_start_delay = 0, .idle_wait_delay = 17, .elastic_limit = 16, @@ -411,6 +412,24 @@ static struct tegra_ulpi_config ulpi_phy_config = { .clk = "clk_dev2", }; +static struct tegra_ehci_platform_data tegra_ehci_pdata[] = { + [0] = { + .phy_config = &utmi_phy_config[0], + .operating_mode = TEGRA_USB_OTG, + .power_down_on_bus_suspend = 0, + }, + [1] = { + .phy_config = &ulpi_phy_config, + .operating_mode = TEGRA_USB_HOST, + .power_down_on_bus_suspend = 1, + }, + [2] = { + .phy_config = &utmi_phy_config[1], + .operating_mode = TEGRA_USB_HOST, + .power_down_on_bus_suspend = 1, + }, +}; + /* bq24617 charger */ static struct resource bq24617_resources[] = { [0] = { @@ -749,8 +768,8 @@ static void stingray_usb_init(void) struct android_usb_platform_data *platform_data; tegra_udc_device.dev.platform_data = &tegra_udc_pdata; - tegra_ehci2_device.dev.platform_data = &ulpi_phy_config; - tegra_ehci3_device.dev.platform_data = &host_phy_config[2]; + tegra_ehci2_device.dev.platform_data = &tegra_ehci_pdata[1]; + tegra_ehci3_device.dev.platform_data = &tegra_ehci_pdata[2]; platform_device_register(&tegra_udc_device); platform_device_register(&tegra_ehci2_device); @@ -990,7 +1009,7 @@ static void __init tegra_stingray_init(void) tegra_i2s_device1.dev.platform_data = &tegra_audio_pdata; cpcap_device_register(&cpcap_audio_device); - tegra_ehci1_device.dev.platform_data = &host_phy_config[0]; + tegra_ehci1_device.dev.platform_data = &tegra_ehci_pdata[0]; platform_add_devices(stingray_devices, ARRAY_SIZE(stingray_devices)); -- 2.34.1