android_kernel_msm-6.1_noth.../include/linux/usb
Stephen Warren 91a687d8fe USB: EHCI: tegra: fix circular module dependencies
The Tegra EHCI driver directly calls various functions in the Tegra USB
PHY driver. The reverse is also true; the PHY driver calls into the EHCI
driver. This is problematic when the two are built as modules.

The calls from the PHY to EHCI driver were originally added in commit
bbdabdb "usb: add APIs to access host registers from Tegra PHY", for the
following reasons:

1) The register being touched is an EHCI register, so logically only the
   EHCI driver should touch it.
2) (1) implies that some locking may be needed to correctly implement the
   r/m/w access to this shared register.
3) We were expecting to pass only the PHY register space to the Tegra PHY
   driver, and hence it would not have access to touch the shared
   registers.

To solve this, that commit added functions in the EHCI driver to touch the
shared register on behalf of the PHY driver.

In practice, we ended up not having any locking in the implementaiton of
those functions, and I've been led to believe this is safe. Equally, (3)
did not happen either. Hence, it is possible for the PHY driver to touch
the shared register directly.

Given that, this patch moves the code to touch the shared register back
into the PHY driver, to eliminate the module problems. If we actually
need locking or co-ordination in the future, I propose we put the lock
support into some pre-existing core module, or into a third separate
module, in order to avoid the circular dependencies.

I apologize for my contribution to code churn here.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-17 13:54:48 -07:00
..
association.h
atmel_usba_udc.h
audio-v2.h ALSA: snd-usb: handle raw data format of UAC2 devices 2013-03-18 08:47:13 +01:00
audio.h UAPI: (Scripted) Disintegrate include/linux/usb 2012-10-09 09:49:07 +01:00
c67x00.h
cdc-wdm.h USB: cdc-wdm: implement IOCTL_WDM_MAX_COMMAND 2013-03-25 13:32:20 -07:00
cdc_ncm.h net: cdc_ncm, cdc_mbim: allow user to prefer NCM for backwards compatibility 2013-03-17 11:59:03 -04:00
ch9.h usb: common: introduce usb_state_string() 2013-03-18 11:17:11 +02:00
chipidea.h usb: chipidea: introduce dual role mode pdata flags 2013-06-17 13:47:17 -07:00
composite.h usb: gadget: the start of the configfs interface 2013-04-03 14:43:32 +03:00
dwc3-omap.h usb: dwc3: dwc3-omap: return -EPROBE_DEFER if probe has not yet executed 2013-03-18 11:18:14 +02:00
ehci_def.h USB: EHCI: Tegra: Fix wrong register definition 2012-09-18 17:40:56 +01:00
ehci_pdriver.h USB: EHCI: remove ehci_port_power() routine 2012-10-31 12:48:07 -07:00
ezusb.h USB: ezusb: unexport some functions that aren't being used 2012-10-24 14:19:16 -07:00
functionfs.h UAPI: (Scripted) Disintegrate include/linux/usb 2012-10-09 09:49:07 +01:00
g_hid.h
gadget.h Correct typo "supperspeed" to "superspeed". 2013-05-15 17:19:15 +03:00
gadget_configfs.h usb: gadget: the start of the configfs interface 2013-04-03 14:43:32 +03:00
gpio_vbus.h
hcd.h Allow the USB HCD to create Wireless USB root hubs 2013-06-03 10:52:40 -07:00
input.h
intel_mid_otg.h
iowarrior.h
irda.h
isp116x.h
isp1301.h
isp1362.h
isp1760.h
m66592.h
msm_hsusb.h
msm_hsusb_hw.h
musb-omap.h
musb-ux500.h usb: phy: ab8500-usb: update irq handling code 2013-03-18 14:41:33 +02:00
musb.h ARM: OMAP2: MUSB: Specify omap4 has mailbox 2013-02-06 11:40:13 -08:00
net2280.h
nop-usb-xceiv.h usb: phy: nop: Add some parameters to platform data 2013-03-18 11:13:54 +02:00
of.h usb: add devicetree helpers for determining dr_mode and phy_type 2013-06-17 13:47:09 -07:00
ohci_pdriver.h USB: ohci: allow platform driver to specify the number of ports 2012-10-22 11:23:59 -07:00
omap_control_usb.h usb: omap_control_usb: fix compile warning 2013-02-06 11:40:14 -08:00
omap_usb.h usb: phy: add a new driver for usb3 phy 2013-01-25 13:02:50 +02:00
otg.h usb: add devicetree helpers for determining dr_mode and phy_type 2013-06-17 13:47:09 -07:00
phy.h usb: add devicetree helpers for determining dr_mode and phy_type 2013-06-17 13:47:09 -07:00
phy_companion.h
quirks.h
r8a66597.h
renesas_usbhs.h usb: renesas_usbhs: fixup sparse errors for common.c 2013-04-02 11:42:48 +03:00
rndis_host.h
samsung_usb_phy.h ARM: EXYNOS: Update & move usb-phy types to generic include layer 2013-01-23 13:39:07 +02:00
serial.h USB: serial: increase the number of devices we support 2013-06-17 13:34:15 -07:00
sl811.h
storage.h
tegra_usb_phy.h USB: EHCI: tegra: fix circular module dependencies 2013-06-17 13:54:48 -07:00
tilegx.h
uas.h
ulpi.h usb: ulpi: Define a *otg_ulpi_create no-op 2013-03-20 17:30:40 +02:00
usbnet.h usbnet: allow status interrupt URB to always be active 2013-05-08 13:13:29 -07:00
wusb-wa.h USB: wusbcore: add HWA-specific fields to usb_rpipe_descriptor 2013-06-06 12:14:39 -07:00
wusb.h