[PATCH 2/5] [POWERPC] QE: add support for QE USB clocks routing
Anton Vorontsov
cbouatmailru at gmail.com
Fri Apr 18 07:48:46 EST 2008
On Thu, Apr 17, 2008 at 02:56:42PM -0500, Timur Tabi wrote:
> Anton Vorontsov wrote:
>
> > +config QE_USB
> > + bool
> > + help
> > + QE USB Host Controller support
>
> Don't you need something like "depends on USB"? I would assume that you need
> core USB support before any USB drivers can be loaded.
No, I'll add there "default y if USB_HCD_FHCI", but I'll do this at the
same time as USB_HCD_FHCI merges, because otherwise I would reference not
existent Kconfig symbol.
> > --- /dev/null
> > +++ b/arch/powerpc/sysdev/qe_lib/usb.c
> > @@ -0,0 +1,57 @@
> > +/*
> > + * QE USB routines
> > + *
> > + * Copyright (c) Freescale Semicondutor, Inc. 2006.
> > + * Shlomi Gridish <gridish at freescale.com>
>
> Is this code from one of our BSPs?
Well, it is based on. I'm not sure that there is a single line of the
original code, but anyway I'd better be safe than remove someone's
copyright. The same applies to FSL GTM code.
> > +int qe_usb_clock_set(enum qe_clock clk, int rate)
> > +{
> > + struct qe_mux __iomem *mux = &qe_immr->qmx;
> > + unsigned long flags;
> > + const bool is_brg = clk < QE_CLK1;
>
> You don't really need "is_brg", since it's only used once.
Hm, no. This is code that speaks. More than that, I'd prefer this in
qe.h:
static inline bool qe_clock_is_brg(enum qe_clock clk)
{
return clk < QE_CLK1;
}
:-)
--
Anton Vorontsov
email: cbouatmailru at gmail.com
irc://irc.freenode.net/bd2
More information about the Linuxppc-dev
mailing list