diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2019-02-06 16:34:14 +0100 |
---|---|---|
committer | Dominik Sliwa <dominik.sliwa@toradex.com> | 2019-02-06 16:34:14 +0100 |
commit | 12806713eb83fea91eb5ec779bc177efe5b70691 (patch) | |
tree | d1b49bb0ac439d579dcf70c0b124a52b127cae43 | |
parent | 29d3a8dfa6d45286ffc03fa56e12d7c795df7c37 (diff) |
board-apalis-tk1: do not use OTG when using 3.0
If the OTG port is configured for USB 3.0 operation
using usb_port_owner_info kernel cmd line argument
operate in host mode only.
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
-rw-r--r-- | arch/arm/mach-tegra/board-apalis-tk1.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/arch/arm/mach-tegra/board-apalis-tk1.c b/arch/arm/mach-tegra/board-apalis-tk1.c index 7d1e4305dbf4..fa1f04b96981 100644 --- a/arch/arm/mach-tegra/board-apalis-tk1.c +++ b/arch/arm/mach-tegra/board-apalis-tk1.c @@ -374,25 +374,21 @@ static struct tegra_usb_otg_data tegra_otg_pdata = { static void apalis_tk1_usb_init(void) { int usb_port_owner_info = tegra_get_usb_port_owner_info(); -/* TBD - tegra_ehci1_utmi_pdata.u_data.host.turn_off_vbus_on_lp0 = true; */ + /* + * TBD tegra_ehci1_utmi_pdata.u_data.host.turn_off_vbus_on_lp0 = true; + */ + if (!(usb_port_owner_info & UTMI1_PORT_OWNER_XUSB)) { - if (usb_port_owner_info & UTMI1_PORT_OWNER_XUSB) { - tegra_ehci1_utmi_pdata.id_det_type = TEGRA_USB_ID; - tegra_otg_pdata.is_xhci = true; - tegra_otg_device.dev.platform_data = &tegra_otg_pdata; - platform_device_register(&tegra_otg_device); - } else { tegra_ehci1_utmi_pdata.id_det_type = TEGRA_USB_ID; tegra_otg_pdata.is_xhci = false; tegra_otg_device.dev.platform_data = &tegra_otg_pdata; platform_device_register(&tegra_otg_device); - } - /* Setup the udc platform data */ - tegra_udc_pdata.id_det_type = TEGRA_USB_ID; - tegra_udc_pdata.u_data.dev.is_xhci = false; - tegra_udc_device.dev.platform_data = &tegra_udc_pdata; + /* Setup the udc platform data */ + tegra_udc_pdata.id_det_type = TEGRA_USB_ID; + tegra_udc_pdata.u_data.dev.is_xhci = false; + tegra_udc_device.dev.platform_data = &tegra_udc_pdata; + } if (!(usb_port_owner_info & UTMI2_PORT_OWNER_XUSB)) { tegra_ehci3_device.dev.platform_data = &tegra_ehci3_utmi_pdata; @@ -401,7 +397,6 @@ static void apalis_tk1_usb_init(void) tegra_ehci2_device.dev.platform_data = &tegra_ehci2_utmi_pdata; platform_device_register(&tegra_ehci2_device); - } static struct tegra_xusb_platform_data xusb_pdata = { |