[PATCH V5] powerpc/mpc512x: Add gpio driver

Anatolij Gustschin agust at denx.de
Thu Jul 29 17:39:54 EST 2010


On Thu, 29 Jul 2010 01:19:23 -0600
Grant Likely <grant.likely at secretlab.ca> wrote:

> On Wed, Jul 7, 2010 at 5:28 AM, Peter Korsgaard <jacmet at sunsite.dk> wrote:
> >>>>>> "Anatolij" == Anatolij Gustschin <agust at denx.de> writes:
> >
> > Hi,
> >
> > Old mail, I know ..
> >
> >  Anatolij> From: Matthias Fuchs <matthias.fuchs at esd.eu>
> >  Anatolij> This patch adds a gpio driver for MPC512X PowerPCs.
> >
> >  Anatolij> It has been tested on our CAN-CBX-CPU5201 module that
> >  Anatolij> uses a MPC5121 CPU. This platform comes with a couple of
> >  Anatolij> LEDs and configuration switches that have been used for testing.
> >
> >  Anatolij> After change to the of-gpio api the reworked driver has been
> >  Anatolij> tested on pdm360ng board with some configuration switches.
> >
> > This looks very similar to the existing
> > arch/powerpc/sysdev/mpc8xxx_gpio.c - Couldn't we just add 5121 support
> > there instead?
> >
> >  Anatolij> +struct mpc512x_gpio_regs {
> >  Anatolij> +    u32 gpdir;
> >  Anatolij> +    u32 gpodr;
> >  Anatolij> +    u32 gpdat;
> >  Anatolij> +    u32 gpier;
> >  Anatolij> +    u32 gpimr;
> >  Anatolij> +    u32 gpicr1;
> >  Anatolij> +    u32 gpicr2;
> >  Anatolij> +};
> 
> Hi Anatolij,
> 
> Peter's right, the register map looks the same, except for the
> additional gpicr1 & 2 registers in the 512x version.  Can the 512x
> gpios be supported by the 8xxx gpio driver?

Hi Grant,

I wanted to extend/test this driver but didn't have time so far. I'll
look at 8xxx gpio driver this weekend to see if it can be used for
512x gpios.

Anatolij


More information about the Linuxppc-dev mailing list