Patchwork PPC440EPx gpio driver

login
register
mail settings
Submitter Steven A. Falco
Date Oct. 8, 2008, 9:33 p.m.
Message ID <48ED273B.7080101@harris.com>
Download mbox | patch
Permalink /patch/3385/
State Superseded, archived
Headers show

Comments

Steven A. Falco - Oct. 8, 2008, 9:33 p.m.
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 other
folks would like to have a gpio driver for the 440 family.

Signed-off-by: Steve Falco <sfalco at harris.com>

Patch

diff --git a/arch/powerpc/include/asm/ppc4xx.h b/arch/powerpc/include/asm/ppc4xx.h
index 033039a..acbccb7 100644
--- a/arch/powerpc/include/asm/ppc4xx.h
+++ b/arch/powerpc/include/asm/ppc4xx.h
@@ -13,6 +13,28 @@ 
 #ifndef __ASM_POWERPC_PPC4xx_H__
 #define __ASM_POWERPC_PPC4xx_H__
 
+/* GPIO */
+struct ppc4xx_gpio {
+	unsigned int gpio_or;
+	unsigned int gpio_tcr;
+	unsigned int gpio_osrl;
+	unsigned int gpio_osrh;
+	unsigned int gpio_tsrl;
+	unsigned int gpio_tsrh;
+	unsigned int gpio_odr;
+	unsigned int gpio_ir;
+	unsigned int gpio_rr1;
+	unsigned int gpio_rr2;
+	unsigned int gpio_rr3;
+	unsigned int reserved1;
+	unsigned int gpio_isr1l;
+	unsigned int gpio_isr1h;
+	unsigned int gpio_isr2l;
+	unsigned int gpio_isr2h;
+	unsigned int gpio_isr3l;
+	unsigned int gpio_isr3h;
+};
+
 extern void ppc4xx_reset_system(char *cmd);
 
 #endif /* __ASM_POWERPC_PPC4xx_H__ */