Re: [PATCH v3] musb: blackfin: add bf60x support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 29, 2013 at 04:37:27PM +0800, Bob Liu wrote:
> On Tue, Jan 29, 2013 at 3:50 PM, Felipe Balbi <balbi@xxxxxx> wrote:
> > Hi,
> >
> > On Tue, Jan 29, 2013 at 03:41:39PM +0800, Bob Liu wrote:
> >> This patch makes musb can work on blackfin bf60x series platform.
> >> Bf60x uses MHDRC RTL version 2.0 musb ip core which don't need a lot of blackfin
> >> specific anomalies anymore.
> >>
> >> Signed-off-by: Bob Liu <lliubbo@xxxxxxxxx>
> >> ---
> >>  drivers/usb/musb/Kconfig     |    2 +-
> >>  drivers/usb/musb/blackfin.c  |   52 ++++++++++++++++++++++++++++--------------
> >>  drivers/usb/musb/musb_core.c |    6 +++--
> >>  drivers/usb/musb/musb_core.h |    2 +-
> >>  drivers/usb/musb/musb_dma.h  |    2 +-
> >>  drivers/usb/musb/musb_io.h   |    2 +-
> >>  drivers/usb/musb/musb_regs.h |    2 +-
> >>  drivers/usb/musb/musbhsdma.c |    2 +-
> >>  drivers/usb/musb/musbhsdma.h |    2 +-
> >>  10 files changed, 52 insertions(+), 26 deletions(-)
> >>
> >> diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
> >> index 23a0b7f..4d416bc 100644
> >> --- a/drivers/usb/musb/Kconfig
> >> +++ b/drivers/usb/musb/Kconfig
> >> @@ -60,7 +60,7 @@ config USB_MUSB_DSPS
> >>
> >>  config USB_MUSB_BLACKFIN
> >>       tristate "Blackfin"
> >> -     depends on (BF54x && !BF544) || (BF52x && ! BF522 && !BF523)
> >> +     depends on (BF54x && !BF544) || (BF52x && ! BF522 && !BF523) || (BF60x)
> >>
> >>  config USB_MUSB_UX500
> >>       tristate "U8500 and U5500"
> >> diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
> >> index 14dab9f..74dd8cf 100644
> >> --- a/drivers/usb/musb/blackfin.c
> >> +++ b/drivers/usb/musb/blackfin.c
> >> @@ -36,6 +36,7 @@ struct bfin_glue {
> >>  /*
> >>   * Load an endpoint's FIFO
> >>   */
> >> +#ifndef CONFIG_BF60x
> >>  void musb_write_fifo(struct musb_hw_ep *hw_ep, u16 len, const u8 *src)
> >>  {
> >>       struct musb *musb = hw_ep->musb;
> >> @@ -164,6 +165,7 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
> >>
> >>       dump_fifo_data(dst, len);
> >>  }
> >> +#endif
> >
> > no ifdefs, try some runtime revision detection or something similar.
> >
> 
> I'm afraid this place can't use runtime revision detection .
> It affect the function define but no global revision i can use in musb
> framework.
> 
> For ifdefs inside a function i can replace them with musb->hwvers.

yes, please. This was a badly placed comment ;-)

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux