diff options
author | Ludovic Desroches <ludovic.desroches@atmel.com> | 2011-08-11 11:25:44 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-10-26 15:43:26 -0400 |
commit | 796211b7953bd1036670359f31cd97f309322107 (patch) | |
tree | ba83818e4bc9265f3bf2e4e9786c525922b41b38 /drivers/mmc/host/atmel-mci-regs.h | |
parent | b9867f371c5e1197f2109daf64168e3af41df8a5 (diff) |
mmc: atmel-mci: add pdc support and runtime capabilities detection
Add pdc support for atmel-mci. It makes at91-mci driver useless because it
was only used for the old atmel MCI core which has pdc but no dma support.
To allow removing at91-mci, the capabilities of the MCI core are detected
at runtime -- then the driver will use pio, pdc or dma transfers.
Warning: at91rm9200 is not supported, to support it we need to use swab32
on data but I have no board to test it.
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/atmel-mci-regs.h')
-rw-r--r-- | drivers/mmc/host/atmel-mci-regs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/mmc/host/atmel-mci-regs.h b/drivers/mmc/host/atmel-mci-regs.h index 7310b207a442..000b3ad0f5ca 100644 --- a/drivers/mmc/host/atmel-mci-regs.h +++ b/drivers/mmc/host/atmel-mci-regs.h | |||
@@ -88,8 +88,14 @@ | |||
88 | # define ATMCI_BLKE ( 1 << 3) /* Data Block Ended */ | 88 | # define ATMCI_BLKE ( 1 << 3) /* Data Block Ended */ |
89 | # define ATMCI_DTIP ( 1 << 4) /* Data Transfer In Progress */ | 89 | # define ATMCI_DTIP ( 1 << 4) /* Data Transfer In Progress */ |
90 | # define ATMCI_NOTBUSY ( 1 << 5) /* Data Not Busy */ | 90 | # define ATMCI_NOTBUSY ( 1 << 5) /* Data Not Busy */ |
91 | # define ATMCI_ENDRX ( 1 << 6) /* End of RX Buffer */ | ||
92 | # define ATMCI_ENDTX ( 1 << 7) /* End of TX Buffer */ | ||
91 | # define ATMCI_SDIOIRQA ( 1 << 8) /* SDIO IRQ in slot A */ | 93 | # define ATMCI_SDIOIRQA ( 1 << 8) /* SDIO IRQ in slot A */ |
92 | # define ATMCI_SDIOIRQB ( 1 << 9) /* SDIO IRQ in slot B */ | 94 | # define ATMCI_SDIOIRQB ( 1 << 9) /* SDIO IRQ in slot B */ |
95 | # define ATMCI_SDIOWAIT ( 1 << 12) /* SDIO Read Wait Operation Status */ | ||
96 | # define ATMCI_CSRCV ( 1 << 13) /* CE-ATA Completion Signal Received */ | ||
97 | # define ATMCI_RXBUFF ( 1 << 14) /* RX Buffer Full */ | ||
98 | # define ATMCI_TXBUFE ( 1 << 15) /* TX Buffer Empty */ | ||
93 | # define ATMCI_RINDE ( 1 << 16) /* Response Index Error */ | 99 | # define ATMCI_RINDE ( 1 << 16) /* Response Index Error */ |
94 | # define ATMCI_RDIRE ( 1 << 17) /* Response Direction Error */ | 100 | # define ATMCI_RDIRE ( 1 << 17) /* Response Direction Error */ |
95 | # define ATMCI_RCRCE ( 1 << 18) /* Response CRC Error */ | 101 | # define ATMCI_RCRCE ( 1 << 18) /* Response CRC Error */ |
@@ -97,6 +103,13 @@ | |||
97 | # define ATMCI_RTOE ( 1 << 20) /* Response Time-Out Error */ | 103 | # define ATMCI_RTOE ( 1 << 20) /* Response Time-Out Error */ |
98 | # define ATMCI_DCRCE ( 1 << 21) /* Data CRC Error */ | 104 | # define ATMCI_DCRCE ( 1 << 21) /* Data CRC Error */ |
99 | # define ATMCI_DTOE ( 1 << 22) /* Data Time-Out Error */ | 105 | # define ATMCI_DTOE ( 1 << 22) /* Data Time-Out Error */ |
106 | # define ATMCI_CSTOE ( 1 << 23) /* Completion Signal Time-out Error */ | ||
107 | # define ATMCI_BLKOVRE ( 1 << 24) /* DMA Block Overrun Error */ | ||
108 | # define ATMCI_DMADONE ( 1 << 25) /* DMA Transfer Done */ | ||
109 | # define ATMCI_FIFOEMPTY ( 1 << 26) /* FIFO Empty Flag */ | ||
110 | # define ATMCI_XFRDONE ( 1 << 27) /* Transfer Done Flag */ | ||
111 | # define ATMCI_ACKRCV ( 1 << 28) /* Boot Operation Acknowledge Received */ | ||
112 | # define ATMCI_ACKRCVE ( 1 << 29) /* Boot Operation Acknowledge Error */ | ||
100 | # define ATMCI_OVRE ( 1 << 30) /* RX Overrun Error */ | 113 | # define ATMCI_OVRE ( 1 << 30) /* RX Overrun Error */ |
101 | # define ATMCI_UNRE ( 1 << 31) /* TX Underrun Error */ | 114 | # define ATMCI_UNRE ( 1 << 31) /* TX Underrun Error */ |
102 | #define ATMCI_DMA 0x0050 /* DMA Configuration[2] */ | 115 | #define ATMCI_DMA 0x0050 /* DMA Configuration[2] */ |
@@ -114,6 +127,7 @@ | |||
114 | #define ATMCI_WPSR 0x00e8 /* Write Protection Status[2] */ | 127 | #define ATMCI_WPSR 0x00e8 /* Write Protection Status[2] */ |
115 | # define ATMCI_GET_WP_VS(x) ((x) & 0x0f) | 128 | # define ATMCI_GET_WP_VS(x) ((x) & 0x0f) |
116 | # define ATMCI_GET_WP_VSRC(x) (((x) >> 8) & 0xffff) | 129 | # define ATMCI_GET_WP_VSRC(x) (((x) >> 8) & 0xffff) |
130 | #define ATMCI_VERSION 0x00FC /* Version */ | ||
117 | #define ATMCI_FIFO_APERTURE 0x0200 /* FIFO Aperture[2] */ | 131 | #define ATMCI_FIFO_APERTURE 0x0200 /* FIFO Aperture[2] */ |
118 | 132 | ||
119 | /* This is not including the FIFO Aperture on MCI2 */ | 133 | /* This is not including the FIFO Aperture on MCI2 */ |