All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mark A. Greer" <mgreer@mvista.com>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Brian Waite <brian@waitefamily.us>,
	lachwani@pmc-sierra.com, Ralf Baechle <ralf@linux-mips.org>,
	mdharm@momenco.com, linuxppc-embedded@ozlabs.org,
	sjhill@realitydiluted.com, David Woodhouse <dwmw2@infradead.org>,
	rabeeh@galileo.co.il
Subject: OCP vs. platform_device (was Marvell 64360/64340 GigE driver for MIPS and PPC....)
Date: Fri, 08 Oct 2004 11:01:11 -0700	[thread overview]
Message-ID: <4166D5E7.8080209@mvista.com> (raw)
In-Reply-To: <20041008122633.C17999@flint.arm.linux.org.uk>

Moving to a wider PPC audience...

Mark
--

Russell King wrote:

>On Fri, Oct 08, 2004 at 12:16:43PM +0100, David Woodhouse wrote:
>  
>
>>On Fri, 2004-10-08 at 13:13 +0200, Ralf Baechle wrote:
>>    
>>
>>>I was already considering to implement something like OCP for MIPS also.
>>>Since it already exists on PPC I instead would suggest to move
>>>arch/ppc/syslib/ocp.c into generic code, something like drivers/ocp/
>>>maybe?
>>>      
>>>
>>Fine... but if you're doing that instead of extending platform_device to
>>meet your needs, make sure you remove platform_device while you're at it
>>and convert its users to OCP.
>>    
>>
>
>There are a lot of users of platform devices, and this now includes
>virtually everything in the input layer.  This would be a very large
>amount of work to rip out platform devices.
>
>Let's look at this:
>
>struct ocp_def {
>        unsigned int    vendor;
>        unsigned int    function;
>
>These are meaningless for the vast majority of platform devices.
>
>        int             index;
>        phys_addr_t     paddr;
>
>Some platform devices have multiple addresses.  phys_addr_t isn't
>sensible anyway - it really really really wants to be a struct
>resource so that you're integrated into the kernels resource
>management system.
>
>        int             irq;
>
>And have multiple IRQs, and may very well have multiple DMA channel
>numbers.
>
>        unsigned long   pm;
>        void            *additions;
>        void            (*show)(struct device *);
>};
> 
> 
>/* Struct for a given device instance */
>struct ocp_device {
>        struct list_head        link;
>
>Unnecessary - the device model provides this for us already.
>
>        char                    name[80];       /* device name */
>
>Already part of platform_device.
>
>        struct ocp_def          *def;           /* device definition */
>        void                    *drvdata;       /* driver data for this device */
>
>This is a duplication of the driver data in struct device.
>
>        struct ocp_driver       *driver;
>
>Another duplication.
>
>        u32                     current_state;  /* Current operating state. In ACPI-speak,
>                                                   this is D0-D3, D0 being fully functional,
>                                                   and D3 being off. */
>
>and yet again another duplication.
>
>        struct                  device dev;
>};
>
>So I think ripping out platform devices and throwing in something
>which is very different is a backwards step.
>
>  
>

       reply	other threads:[~2004-10-08 18:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1CFESm-0002PH-00@real.realitydiluted.com>
     [not found] ` <4165E52E.60908@waitefamily.us>
     [not found]   ` <20041008111345.GA23212@linux-mips.org>
     [not found]     ` <1097234203.318.89.camel@hades.cambridge.redhat.com>
     [not found]       ` <20041008122633.C17999@flint.arm.linux.org.uk>
2004-10-08 18:01         ` Mark A. Greer [this message]
2004-10-08 18:03           ` OCP vs. platform_device (was Marvell 64360/64340 GigE driver for MIPS and PPC....) Mark A. Greer
2004-10-08 20:42           ` Matt Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4166D5E7.8080209@mvista.com \
    --to=mgreer@mvista.com \
    --cc=brian@waitefamily.us \
    --cc=dwmw2@infradead.org \
    --cc=lachwani@pmc-sierra.com \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=mdharm@momenco.com \
    --cc=rabeeh@galileo.co.il \
    --cc=ralf@linux-mips.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=sjhill@realitydiluted.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.