s3cmci: Support transfers which are not multiple of 32 bits.

To be able to do SDIO the s3cmci driver has to support non-word-sized
transfers.  Change pio_words into pio_bytes and fix up all the places
where it is used.

This variant of the patch will not overrun the buffer when reading an
odd number of bytes.  When writing, this variant will still read past
the end of the buffer, but since the driver can't support non-word-
aligned transfers anyway, this should not be a problem, since a
word-aligned transfer will never cross a page boundary.

This has been tested with a CSR SDIO Bluetooth Type A device on a
Samsung S3C24A0 processor.

Signed-off-by: Christer Weinigel <christer@weinigel.se>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
This commit is contained in:
Christer Weinigel
2008-10-15 00:17:17 +01:00
committed by Pierre Ossman
parent f87e6d00fb
commit 088a78af97
2 changed files with 54 additions and 28 deletions

View File

@ -51,7 +51,7 @@ struct s3cmci_host {
int dma_complete;
u32 pio_sgptr;
u32 pio_words;
u32 pio_bytes;
u32 pio_count;
u32 *pio_ptr;
#define XFER_NONE 0