aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/qe.h
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2008-05-23 12:38:58 -0400
committerKumar Gala <galak@kernel.crashing.org>2008-06-10 11:39:18 -0400
commit9572653ee01a2134ae3a1d7aa29ce9d026a6afe9 (patch)
treec136d6fbcd38eff44473abc6f4d6262181b63c3e /include/asm-powerpc/qe.h
parent5e41486c408eb4206aee09303631427f57771691 (diff)
powerpc/QE: prepare QE PIO code for GPIO LIB support
- split and export __par_io_config_pin() out of par_io_config_pin(), so we could use the prefixed version with GPIO LIB API; - rename struct port_regs to qe_pio_regs, and place it into qe.h; - rename #define NUM_OF_PINS to QE_PIO_PINS, and place it into qe.h. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-By: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'include/asm-powerpc/qe.h')
-rw-r--r--include/asm-powerpc/qe.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/asm-powerpc/qe.h b/include/asm-powerpc/qe.h
index d217288ec6bf..c4523acad48b 100644
--- a/include/asm-powerpc/qe.h
+++ b/include/asm-powerpc/qe.h
@@ -84,8 +84,27 @@ extern spinlock_t cmxgcr_lock;
84 84
85/* Export QE common operations */ 85/* Export QE common operations */
86extern void qe_reset(void); 86extern void qe_reset(void);
87
88/* QE PIO */
89#define QE_PIO_PINS 32
90
91struct qe_pio_regs {
92 __be32 cpodr; /* Open drain register */
93 __be32 cpdata; /* Data register */
94 __be32 cpdir1; /* Direction register */
95 __be32 cpdir2; /* Direction register */
96 __be32 cppar1; /* Pin assignment register */
97 __be32 cppar2; /* Pin assignment register */
98#ifdef CONFIG_PPC_85xx
99 u8 pad[8];
100#endif
101};
102
87extern int par_io_init(struct device_node *np); 103extern int par_io_init(struct device_node *np);
88extern int par_io_of_config(struct device_node *np); 104extern int par_io_of_config(struct device_node *np);
105extern void __par_io_config_pin(struct qe_pio_regs __iomem *par_io, u8 pin,
106 int dir, int open_drain, int assignment,
107 int has_irq);
89extern int par_io_config_pin(u8 port, u8 pin, int dir, int open_drain, 108extern int par_io_config_pin(u8 port, u8 pin, int dir, int open_drain,
90 int assignment, int has_irq); 109 int assignment, int has_irq);
91extern int par_io_data_set(u8 port, u8 pin, u8 val); 110extern int par_io_data_set(u8 port, u8 pin, u8 val);