[PATCH 2/2] ARM: tegra: remove copy-and-pasted usb platform data from boards

Heiko Stübner heiko at sntech.de
Fri Jul 15 05:55:56 EDT 2011


Am Freitag, 15. Juli 2011, 11:13:48 schrieb Marc Dietrich:
> see comment for PATCH 1/2
> 
> Am Sun, 10 Jul 2011 15:19:34 -0700
> 
> schrieb Colin Cross <ccross at android.com>:
> > 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 at android.com>
> 
> Acked-By: Marc Dietrich <marvin24 at gmx.de>
> 
> > ---
> > 
> >  arch/arm/mach-tegra/board-paz00.c     |   26
> > 

> > 
> > -static struct tegra_ulpi_config ulpi_phy_config = {
> > -		.reset_gpio = TEGRA_ULPI_RST,
> > -		.clk = "cdev2",
> > -};
> > -
> > -static struct tegra_ehci_platform_data tegra_ehci_pdata[] = {
> > -		[0] = {
> > -			.operating_mode = TEGRA_USB_OTG,
> > -			.power_down_on_bus_suspend = 1,
> > -		},
> > -		[1] = {
> > -			.phy_config = &ulpi_phy_config,
> > -			.operating_mode = TEGRA_USB_HOST,
> > -			.power_down_on_bus_suspend = 1,
> > -		},
> > -		[2] = {
> > -			.operating_mode = TEGRA_USB_HOST,
> > -			.power_down_on_bus_suspend = 1,
> > -		},
> > -};

I'm not sure about this.

For paz00 tegra_ehci3_device also leads to an external usb port. With 
power_down_on_bus_suspend = 1 hotplugging usb devices doesn't work (as the bus 
might be suspended at the time).

From the initial commit message of ehci-tegra on android.git.kernel.org:
"For additional power saving, the driver supports powering down the
phy on bus suspend when it is used, for example, to connect an internal
device that use an out-of-band remote wakeup mechanism (e.g. a gpio)."

So my guess was, that the correct handling of this was setting 
power_down_on_bus_suspend to 0 - which did fix the problem.

With this data moving to devices.c, setting this would also change the 
trimslice behaviour which would be a problem.

In the end I'm not sure if setting power_down_on_bus_suspend to 0 is the 
correct solution to the hotplug problem or if a better solution exists.

Thanks
Heiko



More information about the linux-arm-kernel mailing list