Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
* [PATCH 2/8] usb: musb: tusb-dma can't be built-in if tusb is not
       [not found] <1399557141-1346645-1-git-send-email-arnd@arndb.de>
@ 2014-05-08 13:52 ` Arnd Bergmann
  2014-05-08 13:52 ` [PATCH 3/8] usb: musb: omap2plus bus glue needs USB host support Arnd Bergmann
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2014-05-08 13:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Arnd Bergmann, linux-usb, linux-kernel, Felipe Balbi, linux-omap,
	linux-arm-kernel

A configuration with CONFIG_USB_MUSB_HDRC=y, CONFIG_USB_TUSB_OMAP_DMA=y
and CONFIG_USB_MUSB_TUSB6010=m causes a link failure because of the
dependency on the tusb_get_revision symbol:

(.text+0x154ce8): undefined reference to `tusb_get_revision'

This patch ensures that either MUSB_HDRC and MUSB_TUSB6010 are
both modules or both built-in, which are the valid configurations.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: linux-omap@vger.kernel.org
---
 drivers/usb/musb/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 8b78979..618b152 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -144,7 +144,7 @@ config USB_TI_CPPI41_DMA
 
 config USB_TUSB_OMAP_DMA
 	bool 'TUSB 6010'
-	depends on USB_MUSB_TUSB6010
+	depends on USB_MUSB_TUSB6010 = USB_MUSB_HDRC # both built-in or both modules
 	depends on ARCH_OMAP
 	help
 	  Enable DMA transfers on TUSB 6010 when OMAP DMA is available.
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/8] usb: musb: omap2plus bus glue needs USB host support
       [not found] <1399557141-1346645-1-git-send-email-arnd@arndb.de>
  2014-05-08 13:52 ` [PATCH 2/8] usb: musb: tusb-dma can't be built-in if tusb is not Arnd Bergmann
@ 2014-05-08 13:52 ` Arnd Bergmann
  2014-05-08 13:52 ` [PATCH 4/8] usb: phy: fix isp1301-omap dependency on tps65010 Arnd Bergmann
  2014-05-08 13:52 ` [PATCH 7/8] usb: ohci: sort out dependencies for lpc32xx and omap Arnd Bergmann
  3 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2014-05-08 13:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Arnd Bergmann, linux-usb, linux-kernel, Felipe Balbi, linux-omap,
	linux-arm-kernel

The musb/omap2430.c bus glue driver calls usb_hcd_poll_rh_status,
which is only available if CONFIG_USB is also set, i.e. we
are building USB host mode and not just endpoint mode.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: linux-omap@vger.kernel.org
---
 drivers/usb/musb/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 618b152..fce762c 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -76,7 +76,7 @@ config USB_MUSB_TUSB6010
 
 config USB_MUSB_OMAP2PLUS
 	tristate "OMAP2430 and onwards"
-	depends on ARCH_OMAP2PLUS
+	depends on ARCH_OMAP2PLUS && USB
 	select GENERIC_PHY
 
 config USB_MUSB_AM35X
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/8] usb: phy: fix isp1301-omap dependency on tps65010
       [not found] <1399557141-1346645-1-git-send-email-arnd@arndb.de>
  2014-05-08 13:52 ` [PATCH 2/8] usb: musb: tusb-dma can't be built-in if tusb is not Arnd Bergmann
  2014-05-08 13:52 ` [PATCH 3/8] usb: musb: omap2plus bus glue needs USB host support Arnd Bergmann
@ 2014-05-08 13:52 ` Arnd Bergmann
       [not found]   ` <1399557141-1346645-5-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
  2014-05-08 13:52 ` [PATCH 7/8] usb: ohci: sort out dependencies for lpc32xx and omap Arnd Bergmann
  3 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2014-05-08 13:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Felipe Balbi, linux-usb, linux-kernel, linux-arm-kernel,
	Arnd Bergmann, linux-omap

The isp1301-omap driver cannot be built-in if the tps65010 driver
is a module, otherwise we get a link error from the reference to
the tps65010_set_vbus_draw function.

There is already a hack in the driver to work around the problem
of tps65010 being not available at all. This patch extends that
hack to ensure that the real tps65010_set_vbus_draw() function
is only called when it's avaiable.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: linux-omap@vger.kernel.org
---
 drivers/usb/phy/phy-isp1301-omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/phy/phy-isp1301-omap.c b/drivers/usb/phy/phy-isp1301-omap.c
index 6e146d7..35a0dd2 100644
--- a/drivers/usb/phy/phy-isp1301-omap.c
+++ b/drivers/usb/phy/phy-isp1301-omap.c
@@ -94,7 +94,7 @@ struct isp1301 {
 
 #if defined(CONFIG_MACH_OMAP_H2) || defined(CONFIG_MACH_OMAP_H3)
 
-#if	defined(CONFIG_TPS65010) || defined(CONFIG_TPS65010_MODULE)
+#if	defined(CONFIG_TPS65010) || (defined(CONFIG_TPS65010_MODULE) && defined(MODULE))
 
 #include <linux/i2c/tps65010.h>
 
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 7/8] usb: ohci: sort out dependencies for lpc32xx and omap
       [not found] <1399557141-1346645-1-git-send-email-arnd@arndb.de>
                   ` (2 preceding siblings ...)
  2014-05-08 13:52 ` [PATCH 4/8] usb: phy: fix isp1301-omap dependency on tps65010 Arnd Bergmann
@ 2014-05-08 13:52 ` Arnd Bergmann
  2014-05-08 15:51   ` Alan Stern
  3 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2014-05-08 13:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Arnd Bergmann, linux-usb, linux-kernel, Felipe Balbi, Alan Stern,
	linux-omap, linux-arm-kernel

The dependency on the isp1301 driver is not something that
should be in the main OHCI driver but rather the SoC specific
part of it.

This moves the dependency for LPC32xx into USB_OHCI_HCD_LPC32XX,
and changes the 'select ISP1301_OMAP' to a similar 'depends on'.
Since the same dependency exists for the client driver, do the
same change there.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: linux-omap@vger.kernel.org
Cc: Alan Stern <stern@rowland.harvard.edu>
---
 drivers/usb/gadget/Kconfig | 4 ++--
 drivers/usb/host/Kconfig   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 7fca52b..ba18e9c 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -157,7 +157,7 @@ config USB_AT91
 
 config USB_LPC32XX
 	tristate "LPC32XX USB Peripheral Controller"
-	depends on ARCH_LPC32XX
+	depends on ARCH_LPC32XX && I2C
 	select USB_ISP1301
 	help
 	   This option selects the USB device controller in the LPC32xx SoC.
@@ -226,7 +226,7 @@ config USB_GR_UDC
 config USB_OMAP
 	tristate "OMAP USB Device Controller"
 	depends on ARCH_OMAP1
-	select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3
+	depends on ISP1301_OMAP || !(MACH_OMAP_H2 || MACH_OMAP_H3)
 	help
 	   Many Texas Instruments OMAP processors have flexible full
 	   speed USB device controllers, with support for up to 30
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 890fc8c..e229a47 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -345,8 +345,6 @@ config USB_FOTG210_HCD
 
 config USB_OHCI_HCD
 	tristate "OHCI HCD (USB 1.1) support"
-	select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3
-	depends on USB_ISP1301 || !ARCH_LPC32XX
 	---help---
 	  The Open Host Controller Interface (OHCI) is a standard for accessing
 	  USB 1.1 host controller hardware.  It does more in hardware than Intel's
@@ -365,6 +363,7 @@ if USB_OHCI_HCD
 config USB_OHCI_HCD_OMAP1
 	tristate "OHCI support for OMAP1/2 chips"
 	depends on ARCH_OMAP1
+	depends on ISP1301_OMAP || !(MACH_OMAP_H2 || MACH_OMAP_H3)
 	default y
 	---help---
 	  Enables support for the OHCI controller on OMAP1/2 chips.
@@ -388,6 +387,7 @@ config USB_OHCI_HCD_S3C2410
 config USB_OHCI_HCD_LPC32XX
 	tristate "Support for LPC on-chip OHCI USB controller"
 	depends on USB_OHCI_HCD && ARCH_LPC32XX
+	depends on USB_ISP1301
 	default y
 	---help---
           Enables support for the on-chip OHCI controller on
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 7/8] usb: ohci: sort out dependencies for lpc32xx and omap
  2014-05-08 13:52 ` [PATCH 7/8] usb: ohci: sort out dependencies for lpc32xx and omap Arnd Bergmann
@ 2014-05-08 15:51   ` Alan Stern
  0 siblings, 0 replies; 8+ messages in thread
From: Alan Stern @ 2014-05-08 15:51 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Greg Kroah-Hartman, Felipe Balbi, linux-usb, linux-kernel,
	linux-arm-kernel, linux-omap

On Thu, 8 May 2014, Arnd Bergmann wrote:

> The dependency on the isp1301 driver is not something that
> should be in the main OHCI driver but rather the SoC specific
> part of it.
> 
> This moves the dependency for LPC32xx into USB_OHCI_HCD_LPC32XX,
> and changes the 'select ISP1301_OMAP' to a similar 'depends on'.
> Since the same dependency exists for the client driver, do the
> same change there.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: linux-omap@vger.kernel.org
> Cc: Alan Stern <stern@rowland.harvard.edu>

For the host side changes:

Acked-by: Alan Stern <stern@rowland.harvard.edu>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/8] usb: phy: fix isp1301-omap dependency on tps65010
       [not found]   ` <1399557141-1346645-5-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
@ 2014-05-13 15:26     ` Felipe Balbi
  2014-05-13 19:48       ` Arnd Bergmann
  0 siblings, 1 reply; 8+ messages in thread
From: Felipe Balbi @ 2014-05-13 15:26 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Greg Kroah-Hartman, Felipe Balbi,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-omap-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1299 bytes --]

On Thu, May 08, 2014 at 03:52:17PM +0200, Arnd Bergmann wrote:
> The isp1301-omap driver cannot be built-in if the tps65010 driver
> is a module, otherwise we get a link error from the reference to
> the tps65010_set_vbus_draw function.
> 
> There is already a hack in the driver to work around the problem
> of tps65010 being not available at all. This patch extends that
> hack to ensure that the real tps65010_set_vbus_draw() function
> is only called when it's avaiable.
> 
> Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
> Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
>  drivers/usb/phy/phy-isp1301-omap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/phy/phy-isp1301-omap.c b/drivers/usb/phy/phy-isp1301-omap.c
> index 6e146d7..35a0dd2 100644
> --- a/drivers/usb/phy/phy-isp1301-omap.c
> +++ b/drivers/usb/phy/phy-isp1301-omap.c
> @@ -94,7 +94,7 @@ struct isp1301 {
>  
>  #if defined(CONFIG_MACH_OMAP_H2) || defined(CONFIG_MACH_OMAP_H3)
>  
> -#if	defined(CONFIG_TPS65010) || defined(CONFIG_TPS65010_MODULE)
> +#if	defined(CONFIG_TPS65010) || (defined(CONFIG_TPS65010_MODULE) && defined(MODULE))

nack, I would rather see a real fix, possibly also fixing the original
hack.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/8] usb: phy: fix isp1301-omap dependency on tps65010
  2014-05-13 15:26     ` Felipe Balbi
@ 2014-05-13 19:48       ` Arnd Bergmann
  2014-05-13 19:52         ` Felipe Balbi
  0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2014-05-13 19:48 UTC (permalink / raw)
  To: linux-arm-kernel, balbi
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, linux-omap

On Tuesday 13 May 2014 10:26:31 Felipe Balbi wrote:
> On Thu, May 08, 2014 at 03:52:17PM +0200, Arnd Bergmann wrote:
> > The isp1301-omap driver cannot be built-in if the tps65010 driver
> > is a module, otherwise we get a link error from the reference to
> > the tps65010_set_vbus_draw function.
> > 
> > There is already a hack in the driver to work around the problem
> > of tps65010 being not available at all. This patch extends that
> > hack to ensure that the real tps65010_set_vbus_draw() function
> > is only called when it's avaiable.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Cc: linux-omap@vger.kernel.org
> > ---
> >  drivers/usb/phy/phy-isp1301-omap.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/usb/phy/phy-isp1301-omap.c b/drivers/usb/phy/phy-isp1301-omap.c
> > index 6e146d7..35a0dd2 100644
> > --- a/drivers/usb/phy/phy-isp1301-omap.c
> > +++ b/drivers/usb/phy/phy-isp1301-omap.c
> > @@ -94,7 +94,7 @@ struct isp1301 {
> >  
> >  #if defined(CONFIG_MACH_OMAP_H2) || defined(CONFIG_MACH_OMAP_H3)
> >  
> > -#if  defined(CONFIG_TPS65010) || defined(CONFIG_TPS65010_MODULE)
> > +#if  defined(CONFIG_TPS65010) || (defined(CONFIG_TPS65010_MODULE) && defined(MODULE))
> 
> nack, I would rather see a real fix, possibly also fixing the original
> hack.

Any suggestion how?

	Arnd

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/8] usb: phy: fix isp1301-omap dependency on tps65010
  2014-05-13 19:48       ` Arnd Bergmann
@ 2014-05-13 19:52         ` Felipe Balbi
  0 siblings, 0 replies; 8+ messages in thread
From: Felipe Balbi @ 2014-05-13 19:52 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, balbi, Greg Kroah-Hartman, linux-usb,
	linux-kernel, linux-omap

[-- Attachment #1: Type: text/plain, Size: 1785 bytes --]

Hi,

On Tue, May 13, 2014 at 09:48:27PM +0200, Arnd Bergmann wrote:
> On Tuesday 13 May 2014 10:26:31 Felipe Balbi wrote:
> > On Thu, May 08, 2014 at 03:52:17PM +0200, Arnd Bergmann wrote:
> > > The isp1301-omap driver cannot be built-in if the tps65010 driver
> > > is a module, otherwise we get a link error from the reference to
> > > the tps65010_set_vbus_draw function.
> > > 
> > > There is already a hack in the driver to work around the problem
> > > of tps65010 being not available at all. This patch extends that
> > > hack to ensure that the real tps65010_set_vbus_draw() function
> > > is only called when it's avaiable.
> > > 
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > Cc: linux-omap@vger.kernel.org
> > > ---
> > >  drivers/usb/phy/phy-isp1301-omap.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/usb/phy/phy-isp1301-omap.c b/drivers/usb/phy/phy-isp1301-omap.c
> > > index 6e146d7..35a0dd2 100644
> > > --- a/drivers/usb/phy/phy-isp1301-omap.c
> > > +++ b/drivers/usb/phy/phy-isp1301-omap.c
> > > @@ -94,7 +94,7 @@ struct isp1301 {
> > >  
> > >  #if defined(CONFIG_MACH_OMAP_H2) || defined(CONFIG_MACH_OMAP_H3)
> > >  
> > > -#if  defined(CONFIG_TPS65010) || defined(CONFIG_TPS65010_MODULE)
> > > +#if  defined(CONFIG_TPS65010) || (defined(CONFIG_TPS65010_MODULE) && defined(MODULE))
> > 
> > nack, I would rather see a real fix, possibly also fixing the original
> > hack.
> 
> Any suggestion how?

well, that driver shouldn't depend on a particular PMIC. It should use
regulator framework to enable and disable vbus regulator, to start with.

In fact, isp1301-omap.c shouldn't even exist. isp1301 is a generic
device and not OMAP-specific.

cheers

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-05-13 19:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1399557141-1346645-1-git-send-email-arnd@arndb.de>
2014-05-08 13:52 ` [PATCH 2/8] usb: musb: tusb-dma can't be built-in if tusb is not Arnd Bergmann
2014-05-08 13:52 ` [PATCH 3/8] usb: musb: omap2plus bus glue needs USB host support Arnd Bergmann
2014-05-08 13:52 ` [PATCH 4/8] usb: phy: fix isp1301-omap dependency on tps65010 Arnd Bergmann
     [not found]   ` <1399557141-1346645-5-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2014-05-13 15:26     ` Felipe Balbi
2014-05-13 19:48       ` Arnd Bergmann
2014-05-13 19:52         ` Felipe Balbi
2014-05-08 13:52 ` [PATCH 7/8] usb: ohci: sort out dependencies for lpc32xx and omap Arnd Bergmann
2014-05-08 15:51   ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox