[RFC] SystemACE driver - abstract register ops
Andrei Konovalov
akonovalov at ru.mvista.com
Sat Apr 28 04:38:56 EST 2007
Hi Grant,
Grant Likely wrote:
> For your reading pleasure, I've attached the bus attachment changes
> that I've made in my tree. I hope to get this driver accepted into
> mainline during the 2.6.22 merge window; so please get any comments
> you have back to me ASAP.
>
> Cheers,
> g.
ML300 + IBM microdrive.
8-bit, __BIG_ENDIAN
(ace->bus_width = 0;)
Have noticed a misprint (see below).
Correcting it seems to make the device geometry to be recognized OK, but then:
[ 3.798449] xsysace xsa: Xilinx SystemACE revision 1.0.12
[ 3.891228] xsysace xsa: capacity: 2104704 sectors
[ 3.973193] xsa:<4>xsysace xsa: kicking stalled fsm; state=3 task=1 iter=2 dc=0
[ 6.103446] xsysace xsa: kicking stalled fsm; state=3 task=1 iter=2 dc=0
[ 7.207342] xsysace xsa: kicking stalled fsm; state=3 task=1 iter=2 dc=0
[ 8.311230] xsysace xsa: kicking stalled fsm; state=3 task=1 iter=2 dc=0
[ 9.411113] xsysace xsa: kicking stalled fsm; state=3 task=1 iter=2 dc=0
[ 10.511016] xsysace xsa: kicking stalled fsm; state=3 task=1 iter=2 dc=0
Will have a deeper look tomorrow.
And try CF card too.
At the moment not sure if this the driver issue.
Thanks,
Andrei
Index: linux-2.6.20/drivers/block/xsysace.c
===================================================================
--- linux-2.6.20.orig/drivers/block/xsysace.c
+++ linux-2.6.20/drivers/block/xsysace.c
@@ -240,9 +240,9 @@ static void ace_identin_8(struct ace_dev
int i = ACE_FIFO_SIZE/2;
while (i--)
#if defined(__BIG_ENDIAN)
- *ace->data_ptr = (in_8(r)) | (in_8(r+1)<<8);
+ *ace->data_ptr++ = (in_8(r)) | (in_8(r+1)<<8);
#else
- *ace->data_ptr = (in_8(r)<<8) | (in_8(r+1));
+ *ace->data_ptr++ = (in_8(r)<<8) | (in_8(r+1));
#endif
ace->data_count--;
}
@@ -253,9 +253,9 @@ static void ace_datain_8(struct ace_devi
int i = ACE_FIFO_SIZE/2;
while (i--)
#if defined(__BIG_ENDIAN)
- *ace->data_ptr = (in_8(r)<<8) | (in_8(r+1));
+ *ace->data_ptr++ = (in_8(r)<<8) | (in_8(r+1));
#else
- *ace->data_ptr = (in_8(r)) | (in_8(r+1)<<8);
+ *ace->data_ptr++ = (in_8(r)) | (in_8(r+1)<<8);
#endif
}
More information about the Linuxppc-embedded
mailing list