> -----Original Message----- > From: Felipe Balbi [mailto:felipe.balbi@xxxxxxxxx] > Sent: Tuesday, December 15, 2009 12:57 PM > To: Gupta, Ajay Kumar > Cc: Balbi Felipe (Nokia-D/Helsinki); linux-usb@xxxxxxxxxxxxxxx; linux- > omap@xxxxxxxxxxxxxxx; david-b@xxxxxxxxxxx > Subject: Re: [PATCH 1/3] musb: save dynfifo in musb struct > > Hi, > > On Tue, Dec 15, 2009 at 05:04:30AM +0100, ext Gupta, Ajay Kumar wrote: > >musb->config->dyn_fifo is coming from platform files and is user defined > >but we need to check if the mentor core itself supports dynamic fifo. > > > >See the dynamic fifo code snippet: > > > >-------------------------------------------------------- > > if (reg & MUSB_CONFIGDATA_DYNFIFO) { > > if (musb->config->dyn_fifo) > > status = ep_config_from_table(musb); > > else { > > ERR("reconfigure software for Dynamic FIFOs\n"); > > status = -ENODEV; > > } > > } else { > >-------------------------------------------------------- > > > >If CONFIGDATA register bit indicates that dynamic FIFO is supported then > >musb->config->dyn_fifo has to be set to '1' for suceessful > initialization. > > > >Thus CONFIGDATA register bit alone is sufficient condition to > save/restore > >Tx/Rx FIFOSZ/FIFOADDR registers. > > yes, but if the user has to reconfigure the sw for dyn_fifo anyways, so > we can be sure musb->config->dyn_fifo is correct when you need. As per current logic, user has to set dyn_fifo if mentor core supports it and it has to be set to '0' if core doesn't support it. So what's the need for musb->config->dyn_fifo at all. We can very well decide based on only CONFIGDATA register bits alone. I think we should just get rid of this unwanted user defined flag. I will post a patch on this along with next revision. -Ajay > > -- > balbi -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html