From: Paul Mundt <lethal@linux-sh.org>
To: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Simon Horman <horms@verge.net.au>,
Nobuhiro Iwamatsu <iwamatsu@nigauri.org>,
Jeff Garzik <jeff@garzik.org>,
Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>,
netdev@vger.kernel.org, linux-sh@vger.kernel.org
Subject: Re: [PATCH] sh_eth Add SH7619 support
Date: Wed, 6 Aug 2008 11:36:17 +0900 [thread overview]
Message-ID: <20080806023617.GA581@linux-sh.org> (raw)
In-Reply-To: <87tzdzmfno.wl%ysato@users.sourceforge.jp>
On Tue, Aug 05, 2008 at 03:21:31PM -0400, Yoshinori Sato wrote:
> At Mon, 4 Aug 2008 04:23:35 +0900,
> Paul Mundt wrote:
> > On Sat, Aug 02, 2008 at 11:34:21AM -0400, Yoshinori Sato wrote:
> > > At Sat, 2 Aug 2008 17:30:22 +1000,
> > > Simon Horman wrote:
> > > > what is the difference between CONFIG_CPU_LITTLE_ENDIAN and
> > > > __LITTLE_ENDIAN__ as used in drivers/net/sh_eth.h ?
> > >
> > > EDMAC endian is no depend CPU endian.
> > >
> > The cleaner thing to do might just be to introduce a config symbol for
> > specifying whether the EDMAC is in big or little endian mode, depending
> > on how it's wired up in the CPU. Also, you should use a consistent ifdef
> > style. In some cases you only check if 7619 is defined and do your corner
> > cases there, in others (like this one) you check if it is not defined and
> > push its corner cases further down. The latter of which is very error
> > prone.
> >
> > If the EDMAC endianness can be changed within a given subtype (or hooked
> > up externally), then we also need to making the conversion run-time
> > configurable, and we can toss the endian hint in the platform data.
>
> I think it's best solution.
>
> example
>
> struct sh_eth_drvadata drvdata {
> .phy = 1,
> .edmac_endian = EDMAC_LITTLE, /* or EDMAC_BIG */
> };
>
> static struct platform_device eth_device = {
> :
> .dev = {
> .platform_data = &drvdata,
> },
> :
> };
>
> It's OK?
>
Looks good to me.
next prev parent reply other threads:[~2008-08-06 2:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 23:35 [PATCH] sh_eth Add SH7619 support Yoshinori Sato
2008-08-01 3:48 ` Nobuhiro Iwamatsu
2008-08-01 15:32 ` Yoshinori Sato
2008-08-02 7:30 ` Simon Horman
2008-08-02 15:34 ` Yoshinori Sato
2008-08-03 19:23 ` Paul Mundt
2008-08-05 19:21 ` Yoshinori Sato
[not found] ` <87tzdzmfno.wl%ysato@users.sourceforge.jp>
2008-08-06 2:36 ` Paul Mundt [this message]
2008-08-06 7:38 ` Nobuhiro Iwamatsu
2008-08-06 23:49 ` [PATCH 1/2] sh_eth Add SH7619 support (driver) Yoshinori Sato
2008-08-07 6:23 ` Jeff Garzik
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=20080806023617.GA581@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=horms@verge.net.au \
--cc=iwamatsu.nobuhiro@renesas.com \
--cc=iwamatsu@nigauri.org \
--cc=jeff@garzik.org \
--cc=linux-sh@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ysato@users.sourceforge.jp \
/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).