From: jamie@jamieiles.com (Jamie Iles)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/8] macb: unify at91 and avr32 platform data
Date: Fri, 11 Mar 2011 13:53:35 +0000 [thread overview]
Message-ID: <20110311135335.GG7357@pulham.picochip.com> (raw)
In-Reply-To: <20110311133713.GQ9351@game.jcrosoft.org>
On Fri, Mar 11, 2011 at 02:37:13PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 13:25 Fri 11 Mar , Jamie Iles wrote:
> > On Fri, Mar 11, 2011 at 01:52:46PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > On 08:56 Fri 11 Mar , Jamie Iles wrote:
> > > > On Fri, Mar 11, 2011 at 02:41:40AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > > keep as we need to remove the #ifdef AT91 to cpu_is
> > > > >
> > > > > I've patch for this
> > > >
> > > > Is this for the user IO register where the value written is conditional
> > > > on both RMII/MII and arch type?
> > > yes for
> > >
> > > #if defined(CONFIG_ARCH_AT91)
> > > macb_writel(bp, USRIO, (MACB_BIT(RMII) | MACB_BIT(CLKEN)));
> > > #else
> > > macb_writel(bp, USRIO, 0);
> > > #endif
> > > else
> > > #if defined(CONFIG_ARCH_AT91)
> > > macb_writel(bp, USRIO, MACB_BIT(CLKEN));
> > > #else
> > > macb_writel(bp, USRIO, MACB_BIT(MII));
> > > #endif
> >
> > Ok, but what about non-AT91/AVR32 systems? They may not have a
> > mach/cpu.h and won't have cpu_is_foo() for the platforms the driver is
> > interested in.
> >
> > Could we supply these values in the platform data so the driver doesn't
> > need to do any cpu_is_ magic?
>
> for other arch you can but at91 I prefer to avoid this copy and paste in every
> soc
Ok, just so I'm clear, you want to be able to set the USRIO register
based on a cpu_is_foo() test which requires mach/cpu.h to be included.
For other architectures we may not have mach/cpu.h and the cpu_is_foo()
macros, so we'd still need to protect all of that with "#ifdef
CONFIG_ARCH_AT91" tests. Is that okay?
Jamie
WARNING: multiple messages have this Message-ID (diff)
From: Jamie Iles <jamie@jamieiles.com>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Jamie Iles <jamie@jamieiles.com>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/8] macb: unify at91 and avr32 platform data
Date: Fri, 11 Mar 2011 13:53:35 +0000 [thread overview]
Message-ID: <20110311135335.GG7357@pulham.picochip.com> (raw)
In-Reply-To: <20110311133713.GQ9351@game.jcrosoft.org>
On Fri, Mar 11, 2011 at 02:37:13PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 13:25 Fri 11 Mar , Jamie Iles wrote:
> > On Fri, Mar 11, 2011 at 01:52:46PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > On 08:56 Fri 11 Mar , Jamie Iles wrote:
> > > > On Fri, Mar 11, 2011 at 02:41:40AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > > keep as we need to remove the #ifdef AT91 to cpu_is
> > > > >
> > > > > I've patch for this
> > > >
> > > > Is this for the user IO register where the value written is conditional
> > > > on both RMII/MII and arch type?
> > > yes for
> > >
> > > #if defined(CONFIG_ARCH_AT91)
> > > macb_writel(bp, USRIO, (MACB_BIT(RMII) | MACB_BIT(CLKEN)));
> > > #else
> > > macb_writel(bp, USRIO, 0);
> > > #endif
> > > else
> > > #if defined(CONFIG_ARCH_AT91)
> > > macb_writel(bp, USRIO, MACB_BIT(CLKEN));
> > > #else
> > > macb_writel(bp, USRIO, MACB_BIT(MII));
> > > #endif
> >
> > Ok, but what about non-AT91/AVR32 systems? They may not have a
> > mach/cpu.h and won't have cpu_is_foo() for the platforms the driver is
> > interested in.
> >
> > Could we supply these values in the platform data so the driver doesn't
> > need to do any cpu_is_ magic?
>
> for other arch you can but at91 I prefer to avoid this copy and paste in every
> soc
Ok, just so I'm clear, you want to be able to set the USRIO register
based on a cpu_is_foo() test which requires mach/cpu.h to be included.
For other architectures we may not have mach/cpu.h and the cpu_is_foo()
macros, so we'd still need to protect all of that with "#ifdef
CONFIG_ARCH_AT91" tests. Is that okay?
Jamie
next prev parent reply other threads:[~2011-03-11 13:53 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-10 10:10 [PATCH 0/8] macb: add support for Cadence GEM Jamie Iles
2011-03-10 10:10 ` Jamie Iles
2011-03-10 10:10 ` [PATCH 1/8] macb: unify at91 and avr32 platform data Jamie Iles
2011-03-10 10:10 ` Jamie Iles
2011-03-10 13:06 ` Nicolas Ferre
2011-03-10 13:06 ` Nicolas Ferre
2011-03-10 13:17 ` Jamie Iles
2011-03-10 13:17 ` Jamie Iles
2011-03-11 1:41 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 1:41 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 8:56 ` Jamie Iles
2011-03-11 8:56 ` Jamie Iles
2011-03-11 12:52 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 12:52 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 13:25 ` Jamie Iles
2011-03-11 13:25 ` Jamie Iles
2011-03-11 13:37 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 13:37 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 13:53 ` Jamie Iles [this message]
2011-03-11 13:53 ` Jamie Iles
2011-03-10 10:10 ` [PATCH 2/8] macb: detect hclk presence from " Jamie Iles
2011-03-10 10:10 ` Jamie Iles
2011-03-10 10:15 ` Russell King - ARM Linux
2011-03-10 10:15 ` Russell King - ARM Linux
2011-03-10 11:41 ` Jamie Iles
2011-03-10 11:41 ` Jamie Iles
2011-03-10 11:45 ` Jamie Iles
2011-03-10 11:45 ` Jamie Iles
2011-03-11 1:44 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 1:44 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 8:54 ` Jamie Iles
2011-03-11 8:54 ` Jamie Iles
2011-03-11 12:47 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 12:47 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 13:08 ` Jamie Iles
2011-03-11 13:08 ` Jamie Iles
2011-03-11 13:39 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 13:39 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-10 10:10 ` [PATCH 3/8] macb: convert printk to pr_ and friends Jamie Iles
2011-03-10 10:10 ` Jamie Iles
2011-03-10 22:48 ` Joe Perches
2011-03-10 22:48 ` Joe Perches
2011-03-11 0:09 ` Jamie Iles
2011-03-11 0:09 ` Jamie Iles
2011-03-11 12:53 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 12:53 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-10 10:10 ` [PATCH 4/8] macb: initial support for Cadence GEM Jamie Iles
2011-03-10 10:10 ` Jamie Iles
2011-03-11 13:14 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 13:14 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 13:30 ` Jamie Iles
2011-03-11 13:30 ` Jamie Iles
2011-03-11 13:34 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 13:34 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 14:08 ` Jamie Iles
2011-03-11 14:08 ` Jamie Iles
2011-03-10 10:10 ` [PATCH 5/8] macb: handle HW address registers for GEM devices Jamie Iles
2011-03-10 10:10 ` Jamie Iles
2011-03-10 10:10 ` [PATCH 6/8] macb: support higher rate GEM MDIO clock divisors Jamie Iles
2011-03-10 10:10 ` Jamie Iles
2011-03-10 10:10 ` [PATCH 7/8] macb: support statistics for GEM devices Jamie Iles
2011-03-10 10:10 ` Jamie Iles
2011-03-10 10:10 ` [PATCH 8/8] macb: support data bus widths > 32 bits Jamie Iles
2011-03-10 10:10 ` Jamie Iles
2011-03-11 12:55 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 12:55 ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 13:15 ` Jamie Iles
2011-03-11 13:15 ` Jamie Iles
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=20110311135335.GG7357@pulham.picochip.com \
--to=jamie@jamieiles.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.