-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
atmel-mci: change use of dma slave interface
Allow the use of another DMA controller driver in atmel-mci sd/mmc driver. This adds a generic dma_slave pointer to the mci platform structure where we can store DMA controller information. In atmel-mci we use information provided by this structure to initialize the driver (with new helper functions that are architecture dependant). This also adds at32/avr32 chip modifications to cope with this new access method. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
- Loading branch information
Nicolas Ferre
authored and
Linus Torvalds
committed
Dec 15, 2009
1 parent
bd68e08
commit 2635d1b
Showing
5 changed files
with
98 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef __MACH_ATMEL_MCI_H | ||
#define __MACH_ATMEL_MCI_H | ||
|
||
#include <mach/at_hdmac.h> | ||
|
||
/** | ||
* struct mci_dma_data - DMA data for MCI interface | ||
*/ | ||
struct mci_dma_data { | ||
struct at_dma_slave sdata; | ||
}; | ||
|
||
/* accessor macros */ | ||
#define slave_data_ptr(s) (&(s)->sdata) | ||
#define find_slave_dev(s) ((s)->sdata.dma_dev) | ||
|
||
#define setup_dma_addr(s, t, r) do { \ | ||
if (s) { \ | ||
(s)->sdata.tx_reg = (t); \ | ||
(s)->sdata.rx_reg = (r); \ | ||
} \ | ||
} while (0) | ||
|
||
#endif /* __MACH_ATMEL_MCI_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef __MACH_ATMEL_MCI_H | ||
#define __MACH_ATMEL_MCI_H | ||
|
||
#include <linux/dw_dmac.h> | ||
|
||
/** | ||
* struct mci_dma_data - DMA data for MCI interface | ||
*/ | ||
struct mci_dma_data { | ||
struct dw_dma_slave sdata; | ||
}; | ||
|
||
/* accessor macros */ | ||
#define slave_data_ptr(s) (&(s)->sdata) | ||
#define find_slave_dev(s) ((s)->sdata.dma_dev) | ||
|
||
#define setup_dma_addr(s, t, r) do { \ | ||
if (s) { \ | ||
(s)->sdata.tx_reg = (t); \ | ||
(s)->sdata.rx_reg = (r); \ | ||
} \ | ||
} while (0) | ||
|
||
#endif /* __MACH_ATMEL_MCI_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters