From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] [ARM] Introduce 'struct machine_class' for SoC level abstraction
Date: Mon, 21 Jun 2010 10:02:45 +0100 [thread overview]
Message-ID: <20100621090245.GA7702@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTilUddhIW0C5LN4b7igh6vEDvelhnT8a3or677Zk@mail.gmail.com>
On Mon, Jun 21, 2010 at 04:23:22PM +0800, Eric Miao wrote:
> So that from derivative POV, it can be expressed as:
>
> if (mdesc->class && mdesc->class->map_io)
> mdesc->class->map_io();
> if (mdesc->map_io())
> mdesc->map_io();
>
> But this seems to make things a bit over complicated, so for such cases
> I'd prefer:
>
> 1. have a separate machine_class for mainstone
> 2. or move the board specific map_io() separatedly
How about making the presence of mdesc->map_io override the class
version?
So if mainstone provides its own map_io() function, it is still
responsible (as is today) for calling the PXA specific map_io().
The same behaviour seems sensible to apply to the other class
functions as well - allow platforms to override the class
version, and leave the replacement platform function responsible
for calling the class if that's what it needs to do.
next prev parent reply other threads:[~2010-06-21 9:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-20 14:00 [PATCH 1/2] [ARM] Introduce 'struct machine_class' for SoC level abstraction Eric Miao
2010-06-20 14:00 ` [PATCH 2/2] [ARM] pxa: make use of 'struct machine_class' Eric Miao
2010-06-20 16:08 ` Antonio Ospite
2010-06-21 1:06 ` Eric Miao
2010-06-21 7:27 ` [PATCH 1/2] [ARM] Introduce 'struct machine_class' for SoC level abstraction Jeremy Kerr
2010-06-21 8:23 ` Eric Miao
2010-06-21 9:02 ` Russell King - ARM Linux [this message]
2010-06-21 10:19 ` Eric Miao
2010-06-21 15:38 ` Nicolas Pitre
2010-06-21 15:44 ` Eric Miao
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=20100621090245.GA7702@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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).