diff options
Diffstat (limited to 'arch/arm/mach-u300/spi.c')
-rw-r--r-- | arch/arm/mach-u300/spi.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/arch/arm/mach-u300/spi.c b/arch/arm/mach-u300/spi.c index 00869def5420..5767208f1c1d 100644 --- a/arch/arm/mach-u300/spi.c +++ b/arch/arm/mach-u300/spi.c | |||
@@ -11,6 +11,9 @@ | |||
11 | #include <linux/spi/spi.h> | 11 | #include <linux/spi/spi.h> |
12 | #include <linux/amba/pl022.h> | 12 | #include <linux/amba/pl022.h> |
13 | #include <linux/err.h> | 13 | #include <linux/err.h> |
14 | #include <mach/coh901318.h> | ||
15 | #include <mach/dma_channels.h> | ||
16 | |||
14 | #include "padmux.h" | 17 | #include "padmux.h" |
15 | 18 | ||
16 | /* | 19 | /* |
@@ -30,11 +33,8 @@ static void select_dummy_chip(u32 chipselect) | |||
30 | } | 33 | } |
31 | 34 | ||
32 | struct pl022_config_chip dummy_chip_info = { | 35 | struct pl022_config_chip dummy_chip_info = { |
33 | /* | 36 | /* available POLLING_TRANSFER, INTERRUPT_TRANSFER, DMA_TRANSFER */ |
34 | * available POLLING_TRANSFER and INTERRUPT_TRANSFER, | 37 | .com_mode = DMA_TRANSFER, |
35 | * DMA_TRANSFER does not work | ||
36 | */ | ||
37 | .com_mode = INTERRUPT_TRANSFER, | ||
38 | .iface = SSP_INTERFACE_MOTOROLA_SPI, | 38 | .iface = SSP_INTERFACE_MOTOROLA_SPI, |
39 | /* We can only act as master but SSP_SLAVE is possible in theory */ | 39 | /* We can only act as master but SSP_SLAVE is possible in theory */ |
40 | .hierarchy = SSP_MASTER, | 40 | .hierarchy = SSP_MASTER, |
@@ -75,8 +75,6 @@ static struct spi_board_info u300_spi_devices[] = { | |||
75 | static struct pl022_ssp_controller ssp_platform_data = { | 75 | static struct pl022_ssp_controller ssp_platform_data = { |
76 | /* If you have several SPI buses this varies, we have only bus 0 */ | 76 | /* If you have several SPI buses this varies, we have only bus 0 */ |
77 | .bus_id = 0, | 77 | .bus_id = 0, |
78 | /* Set this to 1 when we think we got DMA working */ | ||
79 | .enable_dma = 0, | ||
80 | /* | 78 | /* |
81 | * On the APP CPU GPIO 4, 5 and 6 are connected as generic | 79 | * On the APP CPU GPIO 4, 5 and 6 are connected as generic |
82 | * chip selects for SPI. (Same on U330, U335 and U365.) | 80 | * chip selects for SPI. (Same on U330, U335 and U365.) |
@@ -84,6 +82,14 @@ static struct pl022_ssp_controller ssp_platform_data = { | |||
84 | * and do padmuxing accordingly too. | 82 | * and do padmuxing accordingly too. |
85 | */ | 83 | */ |
86 | .num_chipselect = 3, | 84 | .num_chipselect = 3, |
85 | #ifdef CONFIG_COH901318 | ||
86 | .enable_dma = 1, | ||
87 | .dma_filter = coh901318_filter_id, | ||
88 | .dma_rx_param = (void *) U300_DMA_SPI_RX, | ||
89 | .dma_tx_param = (void *) U300_DMA_SPI_TX, | ||
90 | #else | ||
91 | .enable_dma = 0, | ||
92 | #endif | ||
87 | }; | 93 | }; |
88 | 94 | ||
89 | 95 | ||
@@ -109,6 +115,7 @@ void __init u300_spi_init(struct amba_device *adev) | |||
109 | } | 115 | } |
110 | 116 | ||
111 | } | 117 | } |
118 | |||
112 | void __init u300_spi_register_board_devices(void) | 119 | void __init u300_spi_register_board_devices(void) |
113 | { | 120 | { |
114 | /* Register any SPI devices */ | 121 | /* Register any SPI devices */ |