Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-30 Thread Wolfgang Grandegger
Wolfgang Grandegger wrote: > David Miller wrote: >> From: Arnd Bergmann >> Date: Tue, 26 May 2009 10:10:30 +0100 >> >>> On Monday 25 May 2009, Wolfgang Grandegger wrote: > Right, that makes sense. However, most drivers use the field to store the > physical address, not the iomap token. May

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-26 Thread Wolfgang Grandegger
David Miller wrote: > From: Arnd Bergmann > Date: Tue, 26 May 2009 10:10:30 +0100 > >> On Monday 25 May 2009, Wolfgang Grandegger wrote: Right, that makes sense. However, most drivers use the field to store the physical address, not the iomap token. Maybe there should be a new field >>>

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-26 Thread Sascha Hauer
On Tue, May 26, 2009 at 10:42:05AM +0100, Arnd Bergmann wrote: > On Tuesday 26 May 2009, David Miller wrote: > > It's such a baroque thing, there is no reason to set it at all if you > > ask me. It's only use is to allow ISA and similar primitive bus > > devices to have their I/O ports changed via

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-26 Thread Arnd Bergmann
On Tuesday 26 May 2009, David Miller wrote: > It's such a baroque thing, there is no reason to set it at all if you > ask me. It's only use is to allow ISA and similar primitive bus > devices to have their I/O ports changed via ifconfig. My original comment was about the fact that sja1000 was doi

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-26 Thread Benjamin Herrenschmidt
On Tue, 2009-05-26 at 10:10 +0100, Arnd Bergmann wrote: > On Monday 25 May 2009, Wolfgang Grandegger wrote: > > > Right, that makes sense. However, most drivers use the field to store the > > > physical address, not the iomap token. Maybe there should be a new field > > > in struct sja1000_priv for

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-26 Thread David Miller
From: Arnd Bergmann Date: Tue, 26 May 2009 10:10:30 +0100 > On Monday 25 May 2009, Wolfgang Grandegger wrote: >> > Right, that makes sense. However, most drivers use the field to store the >> > physical address, not the iomap token. Maybe there should be a new field >> > in struct sja1000_priv fo

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-26 Thread Arnd Bergmann
On Monday 25 May 2009, Wolfgang Grandegger wrote: > > Right, that makes sense. However, most drivers use the field to store the > > physical address, not the iomap token. Maybe there should be a new field > > in struct sja1000_priv for the virtual address, but that would be a change > > to the base

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-25 Thread Wolfgang Grandegger
Grant Likely wrote: > On Sat, May 23, 2009 at 10:44 AM, Wolfgang Grandegger > wrote: >> Wolfgang Grandegger wrote: >>> Grant Likely wrote: > +- clock-frequency : CAN system clock frequency in Hz, which is normally > + half of the oscillator clock frequency. If not specified, a >

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-24 Thread Wolfgang Grandegger
Arnd Bergmann wrote: > On Saturday 23 May 2009, Wolfgang Grandegger wrote: >> Arnd Bergmann wrote: >>> Minor nitpicking: dev->base_addr should be defined as an __iomem pointer >>> so you can avoid the cast here and in the ioremap/iounmap path. >> Here the member "base_addr" of "struct net_device" i

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-24 Thread Grant Likely
On Sat, May 23, 2009 at 10:44 AM, Wolfgang Grandegger wrote: > Wolfgang Grandegger wrote: >> Grant Likely wrote: +- clock-frequency : CAN system clock frequency in Hz, which is normally +       half of the oscillator clock frequency. If not specified, a +       default value of 800

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-24 Thread Arnd Bergmann
On Saturday 23 May 2009, Wolfgang Grandegger wrote: > Arnd Bergmann wrote: > > > > Minor nitpicking: dev->base_addr should be defined as an __iomem pointer > > so you can avoid the cast here and in the ioremap/iounmap path. > > Here the member "base_addr" of "struct net_device" is used and it's n

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-23 Thread Wolfgang Grandegger
Arnd Bergmann wrote: > On Friday 22 May 2009, Wolfgang Grandegger wrote: >> This patch adds a generic driver for SJA1000 chips on the OpenFirmware >> platform bus found on embedded PowerPC systems. > > Nice driver! > >> +static u8 sja1000_ofp_read_reg(const struct net_device *dev, int reg) >> +{

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-23 Thread Wolfgang Grandegger
Wolfgang Grandegger wrote: > Hi Grant, > > Grant Likely wrote: >> Hi Wolfgang, thanks for the quick response. Comments below... >> >> On Fri, May 22, 2009 at 8:46 AM, Wolfgang Grandegger >> wrote: >>> +++ net-next-2.6/Documentation/powerpc/dts-bindings/can/sja1000.txt >>> @@ -0,0 +1,37 @@ >>> +

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-23 Thread Arnd Bergmann
On Friday 22 May 2009, Wolfgang Grandegger wrote: > This patch adds a generic driver for SJA1000 chips on the OpenFirmware > platform bus found on embedded PowerPC systems. Nice driver! > +static u8 sja1000_ofp_read_reg(const struct net_device *dev, int reg) > +{ > + return in_8((void __iome

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-22 Thread Wolfgang Grandegger
Hi Grant, Grant Likely wrote: > Hi Wolfgang, thanks for the quick response. Comments below... > > On Fri, May 22, 2009 at 8:46 AM, Wolfgang Grandegger > wrote: >> +++ net-next-2.6/Documentation/powerpc/dts-bindings/can/sja1000.txt >> @@ -0,0 +1,37 @@ >> +Memory mapped SJA1000 CAN controller fr

Re: [net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-22 Thread Grant Likely
Hi Wolfgang, thanks for the quick response. Comments below... On Fri, May 22, 2009 at 8:46 AM, Wolfgang Grandegger wrote: > +++ net-next-2.6/Documentation/powerpc/dts-bindings/can/sja1000.txt > @@ -0,0 +1,37 @@ > +Memory mapped SJA1000 CAN controller from NXP (formerly Philips) > + > +Required

[net-next-2.6 PATCH v2] can: SJA1000: generic OF platform bus driver

2009-05-22 Thread Wolfgang Grandegger
This patch adds a generic driver for SJA1000 chips on the OpenFirmware platform bus found on embedded PowerPC systems. You need a SJA1000 node definition in your flattened device tree source (DTS) file similar to: c...@3,100 { compatible = "nxp,sja1000"; reg = <3 0x100 0x8