Re: [PATCH] Custom IORESOURCE Class

From: Matthew Gilbert (mgilbert_at_mvista.com)
Date: 08/10/05

  • Next message: Shaun Jackman: "Trouble shooting a ten minute boot delay (SiI3112)"
    To: Kumar Gala <kumar.gala@freescale.com>
    Date:	Tue, 09 Aug 2005 16:24:39 -0700
    
    

    On Mon, 2005-08-08 at 23:23 -0500, Kumar Gala wrote:
    > On Aug 8, 2005, at 6:17 PM, Adam Belay wrote:
    >
    > > On Mon, Aug 08, 2005 at 09:00:21AM -0700, Greg KH wrote:
    > >
    > >> On Mon, Aug 08, 2005 at 11:11:45AM -0700, Matthew Gilbert wrote:
    > >>
    > >>> Below is a patch that adds an additional resource class to the
    > >>>
    > > platform
    > >
    > >>> resource types. This is to support additional resources that need to
    > >>>
    > > be passed
    > >
    > >>> to drivers without overloading the existing specific types. In my
    > >>>
    > > case, I need
    > >
    > >>> to send clock information to the driver to enable power management.
    > >>>
    > >>> Signed-off-by: Matthew Gilbert <mgilbert@mvista.com>
    > >>>
    > >>
    > >> Hm, you do realize that Pat's no longer the driver core maintainer?
    > >>
    > > :)
    > >
    > >>
    > >> Anyway, Russell and Adam, any objections to this patch?
    > >>
    > >
    > > I'm not sure if I agree with this patch. "struct resource" is used
    > > primarily for
    > > I/O resource assignment. Although I agree we may need to add new
    > > IORESOURCE types,
    > > I'm not sure if clock data belongs here. I don't think "start" and
    > > "end" would be
    > > useful for most platform data. Could you provide more information
    > > about
    > > this
    > > specific issue and resource type? Maybe we could create a new sysfs
    > > attribute?
    >
    > I would also like to understand more about what the need is here. We
    > have clock data and such but use platform_data for it.

    I am using IORESOURCE_MEM to pass in the base addresses of the necessary
    clock registers. I also need to pass a fractional divider clk id. The
    resource table seemed appropriate because the base addresses and the
    divider id are closely related. Its also a great framework for enabling
    varying resource lists. Currently I don't use this, but in the future I
    may. Its possible in a future board revision there may not be a
    fractional divider available. The resource framework makes querying for
    the clk id very straight forward as opposed to magic values in a struct
    I pass through platform_data.

    It can easily be moved to platform_data (or split between the two) if
    that is more appropriate. Thanks for the feedback. _matt

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Shaun Jackman: "Trouble shooting a ten minute boot delay (SiI3112)"

    Relevant Pages

    • ALSA update broke Sparc
      ... Each platform uses a different number of arguments for ... You'll need to have the full resource structure ... Can I make a small formal request of the ALSA folks? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Silly URL...
      ... Note that while an URL can refer to a local File.. ... - A File cannot refer to a resource on an http site, or ftp, or.. ... But how many times have you seen code similar to this? ... ...use of File's can easily be made 'platform specific', ...
      (comp.lang.java.programmer)
    • Re: The problems in comp.lang.c
      ... and redirect the poster to an appropriate resource. ... platform specific solutions for one of the most commonly available ... because of topicality concerns. ...
      (comp.lang.c)
    • Re: PCI bus enumeration differences between Geode and ARM
      ... hard codes values to some of the PCI devices. ... might break the whole platform so I decided to reseach the problem a little ... device emunration and resource dispatch is done by the ...
      (microsoft.public.windowsce.platbuilder)
    • Re: Separate resource dll for PPC and Smartphone
      ... resource dll for each language with a separate rc file for the platform ... in the given resource dll project. ... automatically depending on the current configuration (i.e. Smartphone ...
      (microsoft.public.windowsce.embedded.vc)