aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/mpc52xx.h
diff options
context:
space:
mode:
authorJohn Bonesio <bones@secretlab.ca>2009-09-29 06:43:42 -0400
committerGrant Likely <grant.likely@secretlab.ca>2009-11-04 18:42:47 -0500
commit3c9059d79f5eea6b8b75ddac97693127c3c41db4 (patch)
tree7134da85c066a811bc7d1c7c21508d834dbadd67 /arch/powerpc/include/asm/mpc52xx.h
parent4f59ecfa9b87da09bdc346f2c443e25fa2c0674c (diff)
powerpc/5200: add LocalPlus bus FIFO device driver
This is a driver for the FIFO device on the LocalPlus bus on an mpc5200 system. The driver supports programmed I/O through the FIFO as well as setting up DMA via the BestComm engine through the FIFO. Signed-off-by: John Bonesio <bones@secretlab.ca> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/powerpc/include/asm/mpc52xx.h')
-rw-r--r--arch/powerpc/include/asm/mpc52xx.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/mpc52xx.h b/arch/powerpc/include/asm/mpc52xx.h
index 671685011a23..707ab7590cfb 100644
--- a/arch/powerpc/include/asm/mpc52xx.h
+++ b/arch/powerpc/include/asm/mpc52xx.h
@@ -283,6 +283,45 @@ extern int mpc52xx_gpt_start_timer(struct mpc52xx_gpt_priv *gpt, int period,
283 int continuous); 283 int continuous);
284extern void mpc52xx_gpt_stop_timer(struct mpc52xx_gpt_priv *gpt); 284extern void mpc52xx_gpt_stop_timer(struct mpc52xx_gpt_priv *gpt);
285 285
286/* mpc52xx_lpbfifo.c */
287#define MPC52XX_LPBFIFO_FLAG_READ (0)
288#define MPC52XX_LPBFIFO_FLAG_WRITE (1<<0)
289#define MPC52XX_LPBFIFO_FLAG_NO_INCREMENT (1<<1)
290#define MPC52XX_LPBFIFO_FLAG_NO_DMA (1<<2)
291#define MPC52XX_LPBFIFO_FLAG_POLL_DMA (1<<3)
292
293struct mpc52xx_lpbfifo_request {
294 struct list_head list;
295
296 /* localplus bus address */
297 unsigned int cs;
298 size_t offset;
299
300 /* Memory address */
301 void *data;
302 phys_addr_t data_phys;
303
304 /* Details of transfer */
305 size_t size;
306 size_t pos; /* current position of transfer */
307 int flags;
308
309 /* What to do when finished */
310 void (*callback)(struct mpc52xx_lpbfifo_request *);
311
312 void *priv; /* Driver private data */
313
314 /* statistics */
315 int irq_count;
316 int irq_ticks;
317 u8 last_byte;
318 int buffer_not_done_cnt;
319};
320
321extern int mpc52xx_lpbfifo_submit(struct mpc52xx_lpbfifo_request *req);
322extern void mpc52xx_lpbfifo_abort(struct mpc52xx_lpbfifo_request *req);
323extern void mpc52xx_lpbfifo_poll(void);
324
286/* mpc52xx_pic.c */ 325/* mpc52xx_pic.c */
287extern void mpc52xx_init_irq(void); 326extern void mpc52xx_init_irq(void);
288extern unsigned int mpc52xx_get_irq(void); 327extern unsigned int mpc52xx_get_irq(void);