Re: linux 3.6-rc2, undefined reference to omap_musb_mailbox

2012-09-05 Thread Pantelis Antoniou
Felipe,

That seems like what this patch of mine fixes (was about to send it when
I saw this on my mailbox).

It is not enough to just do a dependency; the patch fixes it by having
a helper that's always resident, and also making sure we don't drop
events.

Regards

-- Pantelis

On Aug 24, 2012, at 10:27 AM, Felipe Balbi wrote:

 On Thu, Aug 23, 2012 at 10:38:59PM +0200, Peter Meerwald wrote:
 On Mon, 20 Aug 2012, Felipe Balbi wrote:
 
 On Mon, Aug 20, 2012 at 04:37:28PM +0530, ABRAHAM, KISHON VIJAY wrote:
 Hi,
 
 On Mon, Aug 20, 2012 at 3:56 PM, Felipe Balbi ba...@ti.com wrote:
 On Mon, Aug 20, 2012 at 03:46:07PM +0530, ABRAHAM, KISHON VIJAY wrote:
 Hi,
 
 On Mon, Aug 20, 2012 at 3:24 PM, Felipe Balbi ba...@ti.com wrote:
 On Mon, Aug 20, 2012 at 11:06:34AM +0530, ABRAHAM, KISHON VIJAY wrote:
 Hi,
 
 On Sat, Aug 18, 2012 at 9:34 PM, Peter Meerwald pme...@pmeerw.net 
 wrote:
 
 3.6-rc2 fails to compile with
 CONFIG_USB_MUSB_HDRC=m
 CONFIG_USB_MUSB_OMAP2PLUS=m
 
  LD  init/built-in.o
 drivers/built-in.o: In function `twl4030_usb_irq':
 /home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:518: 
 undefined reference to `omap_musb_mailbox'
 drivers/built-in.o: In function `twl4030_usb_phy_init':
 /home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:540: 
 undefined reference to `omap_musb_mailbox'
 
 Having TWL4030_USB as a module will get rid of this.
 I'll see how this can be resolved when some modules are *built-in* and
 some are made as *modules*.
 
 EXPORT_SYMBOL_GPL() should sort that out, right ?
 
 No :-( I already have EXPORT_SYMBOL_GPL() in omap2430.c.
 
 I see you're missing an extern on the function prototype (on the
 header). Not sure how modules.dep is generated, but maybe it needs the
 extern there. Can you check it out ?
 
 That isn't helping either.
 
 oh, ok... twl4030-usb is built-in... now that makes sense. Since
 twl4030-usb uses a symbol from omap2430, then it should depend on it,
 otherwise this will always happen.
 
 so add USB_MUSB_OMAP2PLUS to the depends of TWL4030_USB in 
 drivers/usb/otg/Kconfig?
 
 correct ;-)
 
 -- 
 balbi

commit e191e7226099d90ba077719313d4964cf42834ca
Author: Pantelis Antoniou pa...@antoniou-consulting.com
Date:   Fri Aug 10 13:07:43 2012 +

musb: Introduce mailbox helper

When MUSB_OMAP2 is compiled as a module while the musb mailbox callers are
not build fails. Introduce a helper to get around the problem.

diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile
index f5ed3d7..6a868bc 100644
--- a/drivers/usb/Makefile
+++ b/drivers/usb/Makefile
@@ -53,6 +53,7 @@ obj-$(CONFIG_USB_ATM) += atm/
 obj-$(CONFIG_USB_SPEEDTOUCH)   += atm/
 
 obj-$(CONFIG_USB_MUSB_HDRC)+= musb/
+obj-$(CONFIG_USB_MUSB_OMAP2PLUS_MBOX_HELPER)   += musb/
 obj-$(CONFIG_USB_CHIPIDEA) += chipidea/
 obj-$(CONFIG_USB_RENESAS_USBHS)+= renesas_usbhs/
 obj-$(CONFIG_USB_GADGET)   += gadget/
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 6259f0d..9201c3e 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -50,6 +50,7 @@ config USB_MUSB_TUSB6010
 config USB_MUSB_OMAP2PLUS
tristate OMAP2430 and onwards
depends on ARCH_OMAP2PLUS
+   select USB_MUSB_OMAP2PLUS_MBOX_HELPER
 
 config USB_MUSB_AM35X
tristate AM35x
@@ -69,6 +70,9 @@ config USB_MUSB_UX500
 
 endchoice
 
+config USB_MUSB_OMAP2PLUS_MBOX_HELPER
+   bool
+
 choice
prompt 'MUSB DMA mode'
default USB_UX500_DMA if USB_MUSB_UX500
diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile
index 3b85871..9126fa2 100644
--- a/drivers/usb/musb/Makefile
+++ b/drivers/usb/musb/Makefile
@@ -12,6 +12,7 @@ musb_hdrc-$(CONFIG_DEBUG_FS)  += 
musb_debugfs.o
 
 # Hardware Glue Layer
 obj-$(CONFIG_USB_MUSB_OMAP2PLUS)   += omap2430.o
+obj-$(CONFIG_USB_MUSB_OMAP2PLUS_MBOX_HELPER)   += omap2430_mboxhelper.o
 obj-$(CONFIG_USB_MUSB_AM35X)   += am35x.o
 obj-$(CONFIG_USB_MUSB_DSPS)+= musb_dsps.o
 obj-$(CONFIG_USB_MUSB_TUSB6010)+= tusb6010.o
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index d8c6aeb..920db04 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -228,7 +228,7 @@ static inline void omap2430_low_level_init(struct musb 
*musb)
musb_writel(musb-mregs, OTG_FORCESTDBY, l);
 }
 
-void omap_musb_mailbox(enum omap_musb_vbus_id_status status)
+static void omap_musb_mailbox_actual(enum omap_musb_vbus_id_status status)
 {
struct omap2430_glue*glue = _glue;
struct musb *musb = glue_to_musb(glue);
@@ -241,7 +241,6 @@ void omap_musb_mailbox(enum omap_musb_vbus_id_status status)
 
schedule_work(glue-omap_musb_mailbox_work);
 }
-EXPORT_SYMBOL_GPL(omap_musb_mailbox);
 
 static void omap_musb_set_mailbox(struct omap2430_glue *glue)
 {
@@ -441,6 +440,7 @@ static int omap2430_probe(struct platform_device *pdev)
struct 

Re: linux 3.6-rc2, undefined reference to omap_musb_mailbox

2012-08-24 Thread Felipe Balbi
On Thu, Aug 23, 2012 at 10:38:59PM +0200, Peter Meerwald wrote:
 On Mon, 20 Aug 2012, Felipe Balbi wrote:
 
  On Mon, Aug 20, 2012 at 04:37:28PM +0530, ABRAHAM, KISHON VIJAY wrote:
   Hi,
   
   On Mon, Aug 20, 2012 at 3:56 PM, Felipe Balbi ba...@ti.com wrote:
On Mon, Aug 20, 2012 at 03:46:07PM +0530, ABRAHAM, KISHON VIJAY wrote:
Hi,
   
On Mon, Aug 20, 2012 at 3:24 PM, Felipe Balbi ba...@ti.com wrote:
 On Mon, Aug 20, 2012 at 11:06:34AM +0530, ABRAHAM, KISHON VIJAY 
 wrote:
 Hi,

 On Sat, Aug 18, 2012 at 9:34 PM, Peter Meerwald pme...@pmeerw.net 
 wrote:
 
  3.6-rc2 fails to compile with
  CONFIG_USB_MUSB_HDRC=m
  CONFIG_USB_MUSB_OMAP2PLUS=m
 
LD  init/built-in.o
  drivers/built-in.o: In function `twl4030_usb_irq':
  /home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:518: 
  undefined reference to `omap_musb_mailbox'
  drivers/built-in.o: In function `twl4030_usb_phy_init':
  /home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:540: 
  undefined reference to `omap_musb_mailbox'

 Having TWL4030_USB as a module will get rid of this.
 I'll see how this can be resolved when some modules are *built-in* 
 and
 some are made as *modules*.

 EXPORT_SYMBOL_GPL() should sort that out, right ?
   
No :-( I already have EXPORT_SYMBOL_GPL() in omap2430.c.
   
I see you're missing an extern on the function prototype (on the
header). Not sure how modules.dep is generated, but maybe it needs the
extern there. Can you check it out ?
   
   That isn't helping either.
  
  oh, ok... twl4030-usb is built-in... now that makes sense. Since
  twl4030-usb uses a symbol from omap2430, then it should depend on it,
  otherwise this will always happen.
 
 so add USB_MUSB_OMAP2PLUS to the depends of TWL4030_USB in 
 drivers/usb/otg/Kconfig?

correct ;-)

-- 
balbi


signature.asc
Description: Digital signature


Re: linux 3.6-rc2, undefined reference to omap_musb_mailbox

2012-08-23 Thread Peter Meerwald
On Mon, 20 Aug 2012, Felipe Balbi wrote:

 On Mon, Aug 20, 2012 at 04:37:28PM +0530, ABRAHAM, KISHON VIJAY wrote:
  Hi,
  
  On Mon, Aug 20, 2012 at 3:56 PM, Felipe Balbi ba...@ti.com wrote:
   On Mon, Aug 20, 2012 at 03:46:07PM +0530, ABRAHAM, KISHON VIJAY wrote:
   Hi,
  
   On Mon, Aug 20, 2012 at 3:24 PM, Felipe Balbi ba...@ti.com wrote:
On Mon, Aug 20, 2012 at 11:06:34AM +0530, ABRAHAM, KISHON VIJAY wrote:
Hi,
   
On Sat, Aug 18, 2012 at 9:34 PM, Peter Meerwald pme...@pmeerw.net 
wrote:

 3.6-rc2 fails to compile with
 CONFIG_USB_MUSB_HDRC=m
 CONFIG_USB_MUSB_OMAP2PLUS=m

   LD  init/built-in.o
 drivers/built-in.o: In function `twl4030_usb_irq':
 /home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:518: 
 undefined reference to `omap_musb_mailbox'
 drivers/built-in.o: In function `twl4030_usb_phy_init':
 /home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:540: 
 undefined reference to `omap_musb_mailbox'
   
Having TWL4030_USB as a module will get rid of this.
I'll see how this can be resolved when some modules are *built-in* and
some are made as *modules*.
   
EXPORT_SYMBOL_GPL() should sort that out, right ?
  
   No :-( I already have EXPORT_SYMBOL_GPL() in omap2430.c.
  
   I see you're missing an extern on the function prototype (on the
   header). Not sure how modules.dep is generated, but maybe it needs the
   extern there. Can you check it out ?
  
  That isn't helping either.
 
 oh, ok... twl4030-usb is built-in... now that makes sense. Since
 twl4030-usb uses a symbol from omap2430, then it should depend on it,
 otherwise this will always happen.

so add USB_MUSB_OMAP2PLUS to the depends of TWL4030_USB in 
drivers/usb/otg/Kconfig?

thanks, p.

-- 

Peter Meerwald
+43-664-218 (mobile)
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: linux 3.6-rc2, undefined reference to omap_musb_mailbox

2012-08-20 Thread Felipe Balbi
On Mon, Aug 20, 2012 at 11:06:34AM +0530, ABRAHAM, KISHON VIJAY wrote:
 Hi,
 
 On Sat, Aug 18, 2012 at 9:34 PM, Peter Meerwald pme...@pmeerw.net wrote:
 
  3.6-rc2 fails to compile with
  CONFIG_USB_MUSB_HDRC=m
  CONFIG_USB_MUSB_OMAP2PLUS=m
 
LD  init/built-in.o
  drivers/built-in.o: In function `twl4030_usb_irq':
  /home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:518: undefined 
  reference to `omap_musb_mailbox'
  drivers/built-in.o: In function `twl4030_usb_phy_init':
  /home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:540: undefined 
  reference to `omap_musb_mailbox'
 
 Having TWL4030_USB as a module will get rid of this.
 I'll see how this can be resolved when some modules are *built-in* and
 some are made as *modules*.

EXPORT_SYMBOL_GPL() should sort that out, right ?

-- 
balbi


signature.asc
Description: Digital signature


Re: linux 3.6-rc2, undefined reference to omap_musb_mailbox

2012-08-20 Thread ABRAHAM, KISHON VIJAY
Hi,

On Mon, Aug 20, 2012 at 3:24 PM, Felipe Balbi ba...@ti.com wrote:
 On Mon, Aug 20, 2012 at 11:06:34AM +0530, ABRAHAM, KISHON VIJAY wrote:
 Hi,

 On Sat, Aug 18, 2012 at 9:34 PM, Peter Meerwald pme...@pmeerw.net wrote:
 
  3.6-rc2 fails to compile with
  CONFIG_USB_MUSB_HDRC=m
  CONFIG_USB_MUSB_OMAP2PLUS=m
 
LD  init/built-in.o
  drivers/built-in.o: In function `twl4030_usb_irq':
  /home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:518: undefined 
  reference to `omap_musb_mailbox'
  drivers/built-in.o: In function `twl4030_usb_phy_init':
  /home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:540: undefined 
  reference to `omap_musb_mailbox'

 Having TWL4030_USB as a module will get rid of this.
 I'll see how this can be resolved when some modules are *built-in* and
 some are made as *modules*.

 EXPORT_SYMBOL_GPL() should sort that out, right ?

No :-( I already have EXPORT_SYMBOL_GPL() in omap2430.c.

Thanks
Kishon
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: linux 3.6-rc2, undefined reference to omap_musb_mailbox

2012-08-20 Thread ABRAHAM, KISHON VIJAY
Hi,

On Mon, Aug 20, 2012 at 3:56 PM, Felipe Balbi ba...@ti.com wrote:
 On Mon, Aug 20, 2012 at 03:46:07PM +0530, ABRAHAM, KISHON VIJAY wrote:
 Hi,

 On Mon, Aug 20, 2012 at 3:24 PM, Felipe Balbi ba...@ti.com wrote:
  On Mon, Aug 20, 2012 at 11:06:34AM +0530, ABRAHAM, KISHON VIJAY wrote:
  Hi,
 
  On Sat, Aug 18, 2012 at 9:34 PM, Peter Meerwald pme...@pmeerw.net wrote:
  
   3.6-rc2 fails to compile with
   CONFIG_USB_MUSB_HDRC=m
   CONFIG_USB_MUSB_OMAP2PLUS=m
  
 LD  init/built-in.o
   drivers/built-in.o: In function `twl4030_usb_irq':
   /home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:518: undefined 
   reference to `omap_musb_mailbox'
   drivers/built-in.o: In function `twl4030_usb_phy_init':
   /home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:540: undefined 
   reference to `omap_musb_mailbox'
 
  Having TWL4030_USB as a module will get rid of this.
  I'll see how this can be resolved when some modules are *built-in* and
  some are made as *modules*.
 
  EXPORT_SYMBOL_GPL() should sort that out, right ?

 No :-( I already have EXPORT_SYMBOL_GPL() in omap2430.c.

 I see you're missing an extern on the function prototype (on the
 header). Not sure how modules.dep is generated, but maybe it needs the
 extern there. Can you check it out ?

That isn't helping either.

Thanks
Kishon
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: linux 3.6-rc2, undefined reference to omap_musb_mailbox

2012-08-19 Thread ABRAHAM, KISHON VIJAY
Hi,

On Sat, Aug 18, 2012 at 9:34 PM, Peter Meerwald pme...@pmeerw.net wrote:

 3.6-rc2 fails to compile with
 CONFIG_USB_MUSB_HDRC=m
 CONFIG_USB_MUSB_OMAP2PLUS=m

   LD  init/built-in.o
 drivers/built-in.o: In function `twl4030_usb_irq':
 /home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:518: undefined 
 reference to `omap_musb_mailbox'
 drivers/built-in.o: In function `twl4030_usb_phy_init':
 /home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:540: undefined 
 reference to `omap_musb_mailbox'

Having TWL4030_USB as a module will get rid of this.
I'll see how this can be resolved when some modules are *built-in* and
some are made as *modules*.

Thanks
Kishon
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


linux 3.6-rc2, undefined reference to omap_musb_mailbox

2012-08-18 Thread Peter Meerwald

3.6-rc2 fails to compile with
CONFIG_USB_MUSB_HDRC=m
CONFIG_USB_MUSB_OMAP2PLUS=m

  LD  init/built-in.o
drivers/built-in.o: In function `twl4030_usb_irq': 
/home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:518: undefined 
reference to `omap_musb_mailbox'
drivers/built-in.o: In function `twl4030_usb_phy_init':
/home/pmeerw/linux-3.6-rc2/drivers/usb/otg/twl4030-usb.c:540: undefined 
reference to `omap_musb_mailbox'
make[1]: *** [vmlinux] Error 1
make[1]: Leaving directory 
`/home/pmeerw/linux-3.6-rc2'

thanks, p.

-- 

Peter Meerwald
+43-664-218 (mobile)
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html