From: Albert H. <he...@us...> - 2008-03-04 06:20:53
|
Update of /cvsroot/gc-linux/linux/drivers/exi In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv7117/drivers/exi Modified Files: exi-hw.c exi-hw.h Log Message: Added powerpc arch. Tweaked some driver for wii compatibility. Index: exi-hw.h =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/exi/exi-hw.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- exi-hw.h 24 Feb 2008 18:05:31 -0000 1.9 +++ exi-hw.h 4 Mar 2008 06:20:56 -0000 1.10 @@ -20,7 +20,12 @@ #include <asm/atomic.h> #include <linux/exi.h> + +#ifdef CONFIG_PPC_MERGE +#include <platforms/embedded6xx/gamecube.h> +#else #include <platforms/gamecube.h> +#endif #define exi_printk(level, format, arg...) \ printk(level "exi: " format , ## arg) @@ -130,6 +135,10 @@ unsigned long csr; struct tasklet_struct tasklet; + unsigned long stats_idi_xfers; + unsigned long stats_dma_xfers; + unsigned long stats_xfers; + struct exi_event events[EXI_MAX_EVENTS]; }; Index: exi-hw.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/exi/exi-hw.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- exi-hw.c 24 Feb 2008 18:05:31 -0000 1.16 +++ exi-hw.c 4 Mar 2008 06:20:56 -0000 1.17 @@ -236,6 +236,7 @@ { while(len >= 4) { __exi_transfer_raw_u32(exi_channel, data, mode); + exi_channel->stats_xfers++; data += 4; len -= 4; } @@ -243,14 +244,18 @@ switch(len) { case 1: __exi_transfer_raw_u8(exi_channel, data, mode); + exi_channel->stats_xfers++; break; case 2: __exi_transfer_raw_u16(exi_channel, data, mode); + exi_channel->stats_xfers++; break; case 3: /* XXX optimize this case */ __exi_transfer_raw_u16(exi_channel, data, mode); + exi_channel->stats_xfers++; __exi_transfer_raw_u8(exi_channel, data+2, mode); + exi_channel->stats_xfers++; break; default: break; @@ -270,6 +275,9 @@ BUG_ON(len < 1 || len > 4); + exi_channel->stats_idi_xfers++; + exi_channel->stats_xfers++; + if ((mode & EXI_OP_WRITE)) { switch(len) { case 1: @@ -347,6 +355,9 @@ BUG_ON((data & EXI_DMA_ALIGN) != 0 || (len & EXI_DMA_ALIGN) != 0); + exi_channel->stats_dma_xfers++; + exi_channel->stats_xfers++; + /* * We clear the DATA register here to avoid confusing some * special hardware, like SD cards. |