Re: PPC440EPx gpio driver

2008-10-09 Thread Sean MacLennan
On Wed, 08 Oct 2008 16:56:54 -0400 "Steven A. Falco" <[EMAIL PROTECTED]> wrote: > have begun writing a driver for the GPIOs of the PPC440EPx. I just > noticed that the PIKA Warp .dts references a device "ibm,gpio-440ep", > but so far I have not been able to find a driver for that device. It's j

Re: PPC440EPx gpio driver

2008-10-09 Thread Anton Vorontsov
On Thu, Oct 09, 2008 at 08:46:44PM +0200, Stefan Roese wrote: [...] > > +struct ppc4xx_gpio_chip { > > + struct of_mm_gpio_chip mm_gc; > > + spinlock_t lock; > > + u32 shadow_or; > > + u32 shadow_tcr; > > + u32 shadow_osrl; > > + u32 shadow_osrh; > > + u32 shadow_tsrl; > > + u32 sha

Re: PPC440EPx gpio driver

2008-10-09 Thread Stefan Roese
Steve, On Thursday 09 October 2008, Steven A. Falco wrote: > I've moved the config variable to platforms/44x, and added the #include > of linux/types.h. > > Since I don't have any PPC405 boards, I am unable to test with that CPU. > So, I am reluctant to add the config variable to platforms/40x. I

Re: PPC440EPx gpio driver

2008-10-09 Thread Steven A. Falco
I've moved the config variable to platforms/44x, and added the #include of linux/types.h. Since I don't have any PPC405 boards, I am unable to test with that CPU. So, I am reluctant to add the config variable to platforms/40x. It would be trivial to add, if someone else has a suitable setup and c

Re: PPC440EPx gpio driver

2008-10-09 Thread Anton Vorontsov
On Thu, Oct 09, 2008 at 01:09:18PM -0400, Steven A. Falco wrote: > Please disregard the previous version, and consider this one instead. > The only difference is making better use of to_ppc4xx_gpiochip(), which > helps readability. > > Signed-off-by: Steve Falco [...] > #endif /* __ASM_POWERPC_P

Re: PPC440EPx gpio driver

2008-10-09 Thread Steven A. Falco
Please disregard the previous version, and consider this one instead. The only difference is making better use of to_ppc4xx_gpiochip(), which helps readability. Signed-off-by: Steve Falco diff --git a/arch/powerpc/include/asm/ppc4xx.h b/arch/powerpc/include/asm/ppc4xx.h index 033039a..589ff5c 1

Re: PPC440EPx gpio driver

2008-10-09 Thread Steven A. Falco
Thanks again for the comments. I followed the structure of your qe_lib/gpio.c; here is the result. At this point, I've tested input and output, so it is looking pretty good for me. I added __init to the ppc4xx_gpio_save_regs because it looks like it is only needed when first adding the gpios. S

Re: PPC440EPx gpio driver

2008-10-09 Thread Anton Vorontsov
On Thu, Oct 09, 2008 at 11:10:25AM -0400, Steven A. Falco wrote: > Anton - thanks very much for your comments. I learned a lot, and I've > incorporated your suggestions into the driver, copy attached. > > Stefan - hope I didn't step on your toes, but I was not aware you were > also working on thi

Re: PPC440EPx gpio driver

2008-10-09 Thread Stefan Roese
On Thursday 09 October 2008, Steven A. Falco wrote: > Anton - thanks very much for your comments. I learned a lot, and I've > incorporated your suggestions into the driver, copy attached. > > Stefan - hope I didn't step on your toes, but I was not aware you were > also working on this. Not at all

Re: PPC440EPx gpio driver

2008-10-09 Thread Steven A. Falco
Anton - thanks very much for your comments. I learned a lot, and I've incorporated your suggestions into the driver, copy attached. Stefan - hope I didn't step on your toes, but I was not aware you were also working on this. Anyway, it seemed like a good place to make my first "significant" cont

Re: PPC440EPx gpio driver

2008-10-09 Thread Stefan Roese
On Wednesday 08 October 2008, Steven A. Falco wrote: > I have begun writing a driver for the GPIOs of the PPC440EPx. I just > noticed that the PIKA Warp .dts references a device "ibm,gpio-440ep", > but so far I have not been able to find a driver for that device. > > So, here is what I have so far

Re: PPC440EPx gpio driver

2008-10-09 Thread Anton Vorontsov
Hi Steven, On Wed, Oct 08, 2008 at 04:56:54PM -0400, Steven A. Falco wrote: > I have begun writing a driver for the GPIOs of the PPC440EPx. I just > noticed that the PIKA Warp .dts references a device "ibm,gpio-440ep", > but so far I have not been able to find a driver for that device. > > So, h

Re: PPC440EPx gpio driver

2008-10-08 Thread Steven A. Falco
Here is the remainder of the driver - just the structure of the registers for the 440EPx. I put the struct in this file because that is similar to what was done for the mpc52xx, but the struct could go elsewhere if more appropriate. Anyway, I'd like some feedback on this driver, because I imagine