[PATCH] make platform_init() weak for 8xx

Andreas Oberritter obi at saftware.de
Tue Jul 20 03:34:28 EST 2004


On Mon, 2004-07-19 at 18:32, Tom Rini wrote:
> On Mon, Jul 19, 2004 at 06:13:35PM +0200, Andreas Oberritter wrote:
> > this patch renames platform_init to m8xx_init in m8xx_setup.c and adds
> > new weak platform_init, which can be overridden by boards to allow them
> > to e.g. register platform_devices like redwood5.c does for 40x.
>
> First, I don't see the redwood5 example you're talking about.

http://ppc.bkbits.net:8080/linuxppc-2.5/anno/arch/ppc/platforms/4xx/redwood5.c@1.11?nav=index.html

> Second, this takes us in the direction of 82xx.  Until the 82xx
> abstractions get flushed out a bit more, I remain unconvinced that
> they're really the right way to go (perhaps hooking the other direction
> would work better, e.g. platform_init() calls board_init(), with a weak
> version provided, and some functions forced to be provided by board.c,
> such as m8xx_map_io).

I chose this way because it seemed to be a simple way to port the dbox2
board to 2.6 using the new device API. Is there another 8xx board which
uses the device API for its onboard peripherials and can be used as a
reference? Can I get my devices registered without modifying
platform_init, or shall I send a patch with the board_init() you
mentioned? See my board.c attached.

Regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbox2.c
Type: text/x-csrc
Size: 3463 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20040719/b5095198/attachment.c 


More information about the Linuxppc-embedded mailing list