linux-mips
[Top] [All Lists]

Re: patch / rfc

To: ppopov@embeddedalley.com
Subject: Re: patch / rfc
From: Dan Malek <dan@embeddededge.com>
Date: Fri, 26 Aug 2005 11:47:36 -0400
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>, "'linux-mips@linux-mips.org'" <linux-mips@linux-mips.org>
In-reply-to: <1125069898.14435.1215.camel@localhost.localdomain>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1125006681.14435.1065.camel@localhost.localdomain> <Pine.LNX.4.61L.0508261340460.9561@blysk.ds.pg.gda.pl> <1125069898.14435.1215.camel@localhost.localdomain>
Sender: linux-mips-bounce@linux-mips.org

On Aug 26, 2005, at 11:24 AM, Pete Popov wrote:

void (*plat_setup_late)(void);
[...]
        if (plat_setup_late)
                plat_setup_late()

or something like that.

Sure, we can do that.

If you do this, I suggest using another PowerPC-ism.  They
have a ppc_md data structure that is filled with indirect function
pointers to machine dependent functions.  We could create
a mips_md that does this same thing.  The reason I like this
is it collects all machine dependent information in a single
place, so it's easy to see what functions/data are available
and what you may need to do.  It's also clear when used
that anything in this structure is a machine/board dependent
function.  In the proper places, you then do what is shown above:

        if (mips_md.plat_setup_late)
                mips_md.plat_setup_late();

Your earliest machine dependent set up can then fill this in
based upon board options, or you can statically set it up if
you need it even earlier and change it later.

Thanks.

        -- Dan


<Prev in Thread] Current Thread [Next in Thread>