From: Andreas Oberritter <obi@saftware.de>
To: Tom Rini <trini@kernel.crashing.org>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: [PATCH] add board_init() (was [PATCH] make platform_init() weak for 8xx)
Date: Fri, 23 Jul 2004 15:59:53 +0200 [thread overview]
Message-ID: <1090591193.3939.27.camel@localhost.localdomain> (raw)
In-Reply-To: <20040719182047.GC6813@smtp.west.cox.net>
[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]
Am Mo, den 19.07.2004 schrieb Tom Rini um 20:20:
> On Mon, Jul 19, 2004 at 07:34:28PM +0200, Andreas Oberritter wrote:
>
> > On Mon, 2004-07-19 at 18:32, Tom Rini wrote:
> > > 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.
>
> There currently isn't a reference platform for what you speak of. My
> preference would be to see what I described given a shot to see if it
> looks better or worse (and it better, or worse, in the flow of things).
How about this patch?
Regards,
Andreas
[-- Attachment #2: board_init.diff --]
[-- Type: text/x-patch, Size: 843 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/07/23 15:54:13+02:00 obi@pegasos.saftware.de
# add weak board_init() function which can be overridden by board support code
#
# arch/ppc/syslib/m8xx_setup.c
# 2004/07/23 15:53:53+02:00 obi@pegasos.saftware.de +6 -0
# add weak board_init() function which can be overridden by board support code
#
diff -Nru a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
--- a/arch/ppc/syslib/m8xx_setup.c 2004-07-23 15:54:57 +02:00
+++ b/arch/ppc/syslib/m8xx_setup.c 2004-07-23 15:54:57 +02:00
@@ -61,6 +61,11 @@
extern void m8xx_wdt_handler_install(bd_t *bp);
extern void rpxfb_alloc_pages(void);
+void __attribute__ ((weak))
+board_init(void)
+{
+}
+
void __init
m8xx_setup_arch(void)
{
@@ -103,6 +108,7 @@
}
#endif
#endif
+ board_init();
}
void
next prev parent reply other threads:[~2004-07-23 13:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-19 16:13 [PATCH] make platform_init() weak for 8xx Andreas Oberritter
2004-07-19 16:32 ` Tom Rini
2004-07-19 17:34 ` Andreas Oberritter
2004-07-19 18:20 ` Tom Rini
2004-07-23 13:59 ` Andreas Oberritter [this message]
2004-07-27 21:01 ` [PATCH] add board_init() (was [PATCH] make platform_init() weak for 8xx) Tom Rini
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=1090591193.3939.27.camel@localhost.localdomain \
--to=obi@saftware.de \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=trini@kernel.crashing.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).