[PATCH] gpio: Add device driver for GRGPIO cores and support custom accessors with gpio-generic

2013-02-13 Thread Andreas Larsson
This driver supports GRGPIO gpio cores available in the GRLIB VHDL IP core library from Aeroflex Gaisler. This also adds support to gpio-generic for using custom accessor functions. The grgpio driver uses this to use ioread32be and iowrite32be for big endian register accesses. Reviewed-by: Anton

Re: [PATCH] gpio: Add device driver for GRGPIO cores

2013-02-09 Thread Anton Vorontsov
On Mon, Feb 04, 2013 at 11:27:33AM +0100, Andreas Larsson wrote: [...] > >>2) The grgpio_to_irq function is very hardware specific, and there is of > >>course no gpio_to_irq support in gpio-generic. > > > >Well, the idea about gpio-generic is to use the pieces you need > >IIRC. You may override. >

Re: [PATCH] gpio: Add device driver for GRGPIO cores

2013-02-09 Thread Grant Likely
On Wed, 30 Jan 2013 13:28:41 +0100, Andreas Larsson wrote: > This driver supports GRGPIO gpio cores available in the GRLIB VHDL IP core > library. > > Signed-off-by: Andreas Larsson Have you looked at drivers/gpio/gpio-generic.c? This looks to me like yet another memory mapped gpio controller t

Re: [PATCH] gpio: Add device driver for GRGPIO cores

2013-02-04 Thread Andreas Larsson
On 2013-02-04 10:24, Linus Walleij wrote: And do you really have and test this regularly on both LE and BE hardware? I am worrying a bit about maintenance... I am more than happy to drop that. I will most probably never test this on LE hardware. Will someone else? I'm more thinking whether it

Re: [PATCH] gpio: Add device driver for GRGPIO cores

2013-02-04 Thread Linus Walleij
(CC:ing Anton who wrote the generic GPIO. I might be wrong.) On Mon, Feb 4, 2013 at 9:10 AM, Andreas Larsson wrote: > On 2013-02-02 16:16, Linus Walleij wrote: >>> >>> +#if defined(__BIG_ENDIAN) >>> +static inline u32 grgpio_read_reg(u32 __iomem *reg) >>> +{ >>> + return ioread32be(reg); >>

Re: [PATCH] gpio: Add device driver for GRGPIO cores

2013-02-04 Thread Andreas Larsson
On 2013-02-02 16:16, Linus Walleij wrote: +#if defined(__BIG_ENDIAN) +static inline u32 grgpio_read_reg(u32 __iomem *reg) +{ + return ioread32be(reg); +} + +static inline void grgpio_write_reg(u32 __iomem *reg, u32 val) +{ + iowrite32be(val, reg); +} +#else [...] Where is this __BIG

Re: [PATCH] gpio: Add device driver for GRGPIO cores

2013-02-02 Thread Linus Walleij
On Wed, Jan 30, 2013 at 1:28 PM, Andreas Larsson wrote: > This driver supports GRGPIO gpio cores available in the GRLIB VHDL IP core > library. > > Signed-off-by: Andreas Larsson OK... > +#if defined(__BIG_ENDIAN) > +static inline u32 grgpio_read_reg(u32 __iomem *reg) > +{ > + return ior

[PATCH] gpio: Add device driver for GRGPIO cores

2013-01-30 Thread Andreas Larsson
This driver supports GRGPIO gpio cores available in the GRLIB VHDL IP core library. Signed-off-by: Andreas Larsson --- drivers/gpio/Kconfig |7 + drivers/gpio/Makefile |1 + drivers/gpio/gpio-grgpio.c | 313 3 files changed, 321 in