Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-02-10 Thread Grant Likely
On Wed, Feb 10, 2010 at 3:20 AM, Wolfgang Grandegger wrote: > Wolfgang Grandegger wrote: >> Hi David, >> >> David Miller wrote: >>> From: Anatolij Gustschin >>> Date: Tue, 9 Feb 2010 15:23:17 +0100 >>> In my understanding, in the ESP scsi driver the set of defines for the register offs

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-02-10 Thread Wolfgang Grandegger
Wolfgang Grandegger wrote: > Hi David, > > David Miller wrote: >> From: Anatolij Gustschin >> Date: Tue, 9 Feb 2010 15:23:17 +0100 >> >>> In my understanding, in the ESP scsi driver the set of defines for >>> the register offsets is common for all chip drivers. The chip driver >>> methods for reg

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-02-10 Thread Wolfgang Grandegger
Hi David, David Miller wrote: > From: Anatolij Gustschin > Date: Tue, 9 Feb 2010 15:23:17 +0100 > >> In my understanding, in the ESP scsi driver the set of defines for >> the register offsets is common for all chip drivers. The chip driver >> methods for register access translate the offsets bec

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-02-09 Thread David Miller
From: Anatolij Gustschin Date: Tue, 9 Feb 2010 15:23:17 +0100 > In my understanding, in the ESP scsi driver the set of defines for > the register offsets is common for all chip drivers. The chip driver > methods for register access translate the offsets because the > registers on some chips are a

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-02-09 Thread Anatolij Gustschin
On Thu, 21 Jan 2010 18:03:11 -0800 (PST) David Miller wrote: > From: Wolfgang Grandegger > Date: Thu, 21 Jan 2010 16:25:38 +0100 > > > Do you see a more clever solution to this problem? > > See how we handle this in the ESP scsi driver. We have a set of > defines for the register offsets, and

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-01-27 Thread Wolfgang Grandegger
Arnd Bergmann wrote: > On Sunday 24 January 2010, Wolfgang Denk wrote: >> In message <4b5c5bdf.6020...@grandegger.com> you wrote: >>> You are probably right and your proposal would likely result in more >>> transparent (less ugly) code. There has been some discussion about >>> unifying FEC drivers

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-01-26 Thread Arnd Bergmann
On Sunday 24 January 2010, Wolfgang Denk wrote: > In message <4b5c5bdf.6020...@grandegger.com> you wrote: > > > > You are probably right and your proposal would likely result in more > > transparent (less ugly) code. There has been some discussion about > > unifying FEC drivers when the patches (w

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-01-24 Thread Wolfgang Denk
Dear Wolfgang & Arnd, In message <4b5c5bdf.6020...@grandegger.com> you wrote: > > Arnd Bergmann wrote: ... > > Is there any chance of building a kernel that runs on both mpc8xx and > > mpc5121? AFAIK, the 5121 is built on a 6xx core which is fundamentally > > incompatible with 8xx due to different

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-01-24 Thread Wolfgang Grandegger
Arnd Bergmann wrote: > On Thursday 21 January 2010, Wolfgang Grandegger wrote: >> The major problem that Anatolij tries to solve are the different >> register layouts of the supported SOCs, MPC52xx and MPC8xx. They use the >> same registers but at different offsets. Therefore we cannot handle >> th

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-01-23 Thread Arnd Bergmann
On Thursday 21 January 2010, Wolfgang Grandegger wrote: > The major problem that Anatolij tries to solve are the different > register layouts of the supported SOCs, MPC52xx and MPC8xx. They use the > same registers but at different offsets. Therefore we cannot handle > this with a single "fec_t" st

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-01-22 Thread Wolfgang Grandegger
David Miller wrote: > From: Wolfgang Grandegger > Date: Thu, 21 Jan 2010 16:25:38 +0100 > >> Do you see a more clever solution to this problem? > > See how we handle this in the ESP scsi driver. We have a set of > defines for the register offsets, and a set of methods a chip driver > implements

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-01-21 Thread David Miller
From: Wolfgang Grandegger Date: Thu, 21 Jan 2010 16:25:38 +0100 > Do you see a more clever solution to this problem? See how we handle this in the ESP scsi driver. We have a set of defines for the register offsets, and a set of methods a chip driver implements for register accesses. If the off

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-01-21 Thread Wolfgang Grandegger
Hi Anatolij, I had a close look... Anatolij Gustschin wrote: > drivers/net/fs_enet/* > Enable fs_enet driver to work 5121 FEC > Enable it with CONFIG_FS_ENET_MPC5121_FEC > > Signed-off-by: John Rigby > Signed-off-by: Piotr Ziecik > Signed-off-by: Wolfgang Denk > Signed-off

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-01-21 Thread Wolfgang Grandegger
David Miller wrote: > From: Anatolij Gustschin > Date: Thu, 21 Jan 2010 03:13:18 +0100 > >> struct fec_info { >> -fec_t __iomem *fecp; >> +void __iomem *fecp; To avoid confusion, the name "base_addr" seems more appropriate as it's just used to calculate register offsets and for iomap/un

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-01-21 Thread Anatolij Gustschin
On Thu, 21 Jan 2010 01:22:35 -0800 (PST) David Miller wrote: > From: Anatolij Gustschin > Date: Thu, 21 Jan 2010 03:13:18 +0100 > > > struct fec_info { > > - fec_t __iomem *fecp; > > + void __iomem *fecp; > ... > > /* write */ > > -#define FW(_fecp, _reg, _v) __fs_out32(&(_fecp)->fec_ ##

Re: [net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-01-21 Thread David Miller
From: Anatolij Gustschin Date: Thu, 21 Jan 2010 03:13:18 +0100 > struct fec_info { > - fec_t __iomem *fecp; > + void __iomem *fecp; ... > /* write */ > -#define FW(_fecp, _reg, _v) __fs_out32(&(_fecp)->fec_ ## _reg, (_v)) > +#define FW(_regp, _reg, _v) __fs_out32((_regp)->fec_ ## _reg,

[net-next-2.6 PATCH 2/3] fs_enet: Add support for MPC512x to fs_enet driver

2010-01-20 Thread Anatolij Gustschin
drivers/net/fs_enet/* Enable fs_enet driver to work 5121 FEC Enable it with CONFIG_FS_ENET_MPC5121_FEC Signed-off-by: John Rigby Signed-off-by: Piotr Ziecik Signed-off-by: Wolfgang Denk Signed-off-by: Anatolij Gustschin Cc: Cc: Grant Likely --- Changes since previous subm