[RFC] add 8-bit bus support to the Xilinx SystemACE device driver + minor clean-ups

Andrei Konovalov akonovalov at ru.mvista.com
Fri Apr 20 04:32:14 EST 2007


Hello,

The attached patch should be applied on top of the SystemACE device
driver patch by Grant.

Here is the list of changes:

1) 8-bit bus support added to the driver.
    SystemACE chip could be connected to the FPGA by 8-bit or
    16-bit data bus.
    ML403 uses the 16-bit connection, while ML300 - the 8-bit one.

2) In the original driver the data bus width and endiannes has
    been hard-coded with "#if 1" etc statements.
    I've tried to bind this selection to the board the kernel is built
    for: the bus width is defined by the board design, am I right?
    Please let me know if this concept is correct.

3) Added "do {" "} while(0)" brackets to the macros that need them.

Signed-off-by: Andrei Konovalov <akonovalov at ru.mvista.com>

I've done some testing for the Grant's driver with this patch applied.
Both ML403 and ML300 booted OK with rootfs on CF card and the microdrive
respectively. ML403 survived "bonnie++ -f -u root -x 5 -r 8 -s 16" test
(it took 15 minutes to complete), and I wouldn't like to repeat this
test because of the risk to kill the CF card. ML300 oopsed during
the 3d pass of "bonnie++ -f -u root -x 5 -r 10 -s 20"
(kernel access of bad area, sig: 11). Haven't dig into this yet.

Thanks,
Andrei

Grant Likely wrote:
> Add support for block device access to the Xilinx SystemACE Compact
> flash interface
> 
> Signed-off-by: Grant Likely <grant.likely at secretlab.ca>
> ---
> I think this driver is in pretty good shape.  I've got a few things to
> clean up a bit.  Specifically, I'm still working on error handling and
> making sure that the state machine is sane at all times.
> 
> I would appreciate any review/comments.  One area where I am undecided is
> the format of the state machine.  The current code uses one big function
> with a large switch() statment for each state.  I'm considering breaking
> this up into a seperate function for each state, and adding a static
> state table with pointers to each state function.
> 
> I feel this driver is pretty close to done, and I'd like to get it into
> mainline for the 2.6.22 timeframe.
> 
> Cheers,
> g.
> 
>  drivers/block/Kconfig   |    6 +
>  drivers/block/Makefile  |    1 +
>  drivers/block/xsysace.c | 1070 +++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 1077 insertions(+), 0 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-8bit-support-for-systemace.patch
Type: text/x-patch
Size: 4155 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20070419/ad65fb1c/attachment.bin 


More information about the Linuxppc-embedded mailing list