[PATCH 1/5] [POWERPC] sysdev: implement FSL GTM support

Scott Wood scottwood at freescale.com
Tue Apr 22 04:39:14 EST 2008


On Mon, Apr 21, 2008 at 08:03:31AM -0600, Grant Likely wrote:
> >  +    r) Freescale General-purpose Timers Module
> >  +
> >  +    Required properties:
> >  +      - compatible : should be "fsl,gtm" ("fsl,qe-gtm" in addition for QE
> >  +                     GTMs or "fsl,cpm2-gtm" for CPM2 GTMs).
> 
> I don't think this is specific enough.  It is a very real possibility
> for Freescale to produce another part with a "general purpose timers
> module" that isn't register level compatible (and fsl,i2c is an
> example of what not to do).

If that happens, we'll make up "fsl,gtm2". :-)

>  The compatible string should include the
> exact chip version.  Newer parts can also claim compatibility with
> older ones.
> 
> Defining a 'generic' compatible value is also known as "making stuff up".  :-)

Nothing wrong with making stuff up as long as we do it sanely.

How about something like fsl,gtm-1.0?

> >  +/**
> >  + * gtm_ack_timer16 - acknowledge timer event (free-run timers only)
> >  + * @tmr:       pointer to the gtm_timer structure obtained from gtm_get_timer
> >  + * @events:    events mask to ack
> >  + *
> >  + * Thus function used to acknowledge timer interrupt event, use it inside the
> >  + * interrupt handler.
> >  + */
> >  +static inline void gtm_ack_timer16(struct gtm_timer *tmr, u16 events)
> >  +{
> >  +       out_be16(tmr->gtevr, events);
> >  +}
> 
> Drop 'inline' and expect gcc to do the right thing.

Not in a header...

-Scott



More information about the Linuxppc-dev mailing list