MUSB Kconfig bugs?
I am seeing some weirdness trying to configure MUSB for Gadget mode; I deleted all USB lines from .config and ran "make oldconfig" hoping to be prompted for things. Perhaps that approach is wrong? Such odd things happened as getting the peripheral controller automatically selected, and not having an option for the Inventra controller; a snippet from "make oldconfig" which automatically selected 1: USB Peripheral Controller > 1. Renesas R8A66597 USB Peripheral Controller (USB_GADGET_R8A66597) (NEW) 2. Renesas M66592 USB Peripheral Controller (USB_GADGET_M66592) (NEW) choice[1-2?]: 1 I had to make two passes and do a few hand-edits to sort things out. Things worked fine once I did. One thing that jumps out at me is that there are config USB_GADGET_MUSB_HDRC lines in both usb/gadget/Kconfig and usb/musb/Kconfig, ie the same variable in two places. I'm not a Kconfig expert but that seems wrong. The dependencies seem a bit mixed up and maybe a little circular, I don't know how kconfig resolves such things but USB_MUSB_PERIPHERAL in musb/Kconfig depends on USB_GADGET which doesn't appear until gadget/Kconfig which is sourced later. I am not quite sure what is wrong or how to fix it, but thought it was worth bringing up. -- Jon Povey jon.po...@racelogic.co.uk Racelogic is a limited company registered in England. Registered number 2743719 . Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, MK18 1TB . The information contained in this electronic mail transmission is intended by Racelogic Ltd for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email so that the sender's address records can be corrected. The views expressed by the sender of this communication do not necessarily represent those of Racelogic Ltd. Please note that Racelogic reserves the right to monitor e-mail communications passing through its network ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
[PATCH v2] musb_core: make disconnect and suspend interrupts work again
Commit 1c25fda4a09e8229800979986ef399401053b46e (usb: musb: handle irqs in the order dictated by programming guide) forgot to get rid of the old 'STAGE0_MASK' filter for calling musb_stage0_irq(), so now disconnect and suspend interrupts are effectively ignored... Signed-off-by: Sergei Shtylyov Cc: sta...@kernel.org --- The patch is against the recent Linus' tree. Should be applied to 2.6.34.y as well... Changes since previous version: - corrected typos in the description... drivers/usb/musb/musb_core.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) Index: linux-2.6/drivers/usb/musb/musb_core.c === --- linux-2.6.orig/drivers/usb/musb/musb_core.c +++ linux-2.6/drivers/usb/musb/musb_core.c @@ -371,10 +371,6 @@ void musb_hnp_stop(struct musb *musb) * @param power */ -#define STAGE0_MASK (MUSB_INTR_RESUME | MUSB_INTR_SESSREQ \ - | MUSB_INTR_VBUSERROR | MUSB_INTR_CONNECT \ - | MUSB_INTR_RESET) - static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, u8 devctl, u8 power) { @@ -1519,7 +1515,7 @@ irqreturn_t musb_interrupt(struct musb * /* the core can interrupt us for multiple reasons; docs have * a generic interrupt flowchart to follow */ - if (musb->int_usb & STAGE0_MASK) + if (musb->int_usb) retval |= musb_stage0_irq(musb, musb->int_usb, devctl, power); ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
RE: [PATCH resend] musb_core: make disconnect and suspend interrupts work again
Sergei Shtylyov wrote: > Sent: Thursday, May 20, 2010 11:03 PM > To: linux-...@vger.kernel.org; felipe.ba...@nokia.com > Cc: gre...@suse.de; davinci-linux-open-source@linux.davincidsp.com; > sta...@kernel.org > Subject: [PATCH resend] musb_core: make disconnect and suspend interrupts > work again > > Commit 1c25fda4a09e8229800979986ef399401053b46e (usb: musb: handle irqs in the > order dictated by programming guide) forgot to get rid of the old > 'STAGE0_MASK' > filter for calling musb_stage_orq(), so now disconnect and suspend interrupts > are effectively ignored... > > Signed-off-by: Sergei Shtylyov > Cc: sta...@kernel.org > Thanks for fixing this. I see the behavior with current mainline on my OMAP3 boards. Acked-by: Anand Gadiyar > --- > The patch is against the recent Linus' tree. > Should be applied to 2.6.34.y as well... > Resending with the correct subject. :-/ > > drivers/usb/musb/musb_core.c |6 +- > 1 file changed, 1 insertion(+), 5 deletions(-) > > Index: linux-2.6/drivers/usb/musb/musb_core.c > === > --- linux-2.6.orig/drivers/usb/musb/musb_core.c > +++ linux-2.6/drivers/usb/musb/musb_core.c > @@ -371,10 +371,6 @@ void musb_hnp_stop(struct musb *musb) > * @param power > */ > > -#define STAGE0_MASK (MUSB_INTR_RESUME | MUSB_INTR_SESSREQ \ > - | MUSB_INTR_VBUSERROR | MUSB_INTR_CONNECT \ > - | MUSB_INTR_RESET) > - > static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, > u8 devctl, u8 power) > { > @@ -1519,7 +1515,7 @@ irqreturn_t musb_interrupt(struct musb * > /* the core can interrupt us for multiple reasons; docs have >* a generic interrupt flowchart to follow >*/ > - if (musb->int_usb & STAGE0_MASK) > + if (musb->int_usb) > retval |= musb_stage0_irq(musb, musb->int_usb, > devctl, power); > ___ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source