diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2012-02-01 05:42:27 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2012-02-22 07:45:39 -0500 |
commit | e2b35f3dbfc080f15b72834d08f04f0269dbe9be (patch) | |
tree | fda60f8be147b57cf01155528dda33a9a99b0dab /arch/avr32 | |
parent | 327e6970258618da810f72e86cf2a8b803927e14 (diff) |
dmaengine/dw_dmac: Fix dw_dmac user drivers to adapt to slave_config changes
There are few existing user drivers of dw_dmac. They will break as soon as we
remove unused fields from struct dw_dma_slave. This patch focuses to fix these
user drivers to use dma_slave_config() routine.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'arch/avr32')
-rw-r--r-- | arch/avr32/mach-at32ap/at32ap700x.c | 13 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/include/mach/atmel-mci.h | 7 |
2 files changed, 0 insertions, 20 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index 402a7bb72669..43c44e77d83c 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -1353,7 +1353,6 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data) | |||
1353 | goto fail; | 1353 | goto fail; |
1354 | 1354 | ||
1355 | slave->sdata.dma_dev = &dw_dmac0_device.dev; | 1355 | slave->sdata.dma_dev = &dw_dmac0_device.dev; |
1356 | slave->sdata.reg_width = DW_DMA_SLAVE_WIDTH_32BIT; | ||
1357 | slave->sdata.cfg_hi = (DWC_CFGH_SRC_PER(0) | 1356 | slave->sdata.cfg_hi = (DWC_CFGH_SRC_PER(0) |
1358 | | DWC_CFGH_DST_PER(1)); | 1357 | | DWC_CFGH_DST_PER(1)); |
1359 | slave->sdata.cfg_lo &= ~(DWC_CFGL_HS_DST_POL | 1358 | slave->sdata.cfg_lo &= ~(DWC_CFGL_HS_DST_POL |
@@ -2048,27 +2047,19 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data, | |||
2048 | /* Check if DMA slave interface for capture should be configured. */ | 2047 | /* Check if DMA slave interface for capture should be configured. */ |
2049 | if (flags & AC97C_CAPTURE) { | 2048 | if (flags & AC97C_CAPTURE) { |
2050 | rx_dws->dma_dev = &dw_dmac0_device.dev; | 2049 | rx_dws->dma_dev = &dw_dmac0_device.dev; |
2051 | rx_dws->reg_width = DW_DMA_SLAVE_WIDTH_16BIT; | ||
2052 | rx_dws->cfg_hi = DWC_CFGH_SRC_PER(3); | 2050 | rx_dws->cfg_hi = DWC_CFGH_SRC_PER(3); |
2053 | rx_dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL); | 2051 | rx_dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL); |
2054 | rx_dws->src_master = 0; | 2052 | rx_dws->src_master = 0; |
2055 | rx_dws->dst_master = 1; | 2053 | rx_dws->dst_master = 1; |
2056 | rx_dws->src_msize = DW_DMA_MSIZE_1; | ||
2057 | rx_dws->dst_msize = DW_DMA_MSIZE_1; | ||
2058 | rx_dws->fc = DW_DMA_FC_D_P2M; | ||
2059 | } | 2054 | } |
2060 | 2055 | ||
2061 | /* Check if DMA slave interface for playback should be configured. */ | 2056 | /* Check if DMA slave interface for playback should be configured. */ |
2062 | if (flags & AC97C_PLAYBACK) { | 2057 | if (flags & AC97C_PLAYBACK) { |
2063 | tx_dws->dma_dev = &dw_dmac0_device.dev; | 2058 | tx_dws->dma_dev = &dw_dmac0_device.dev; |
2064 | tx_dws->reg_width = DW_DMA_SLAVE_WIDTH_16BIT; | ||
2065 | tx_dws->cfg_hi = DWC_CFGH_DST_PER(4); | 2059 | tx_dws->cfg_hi = DWC_CFGH_DST_PER(4); |
2066 | tx_dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL); | 2060 | tx_dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL); |
2067 | tx_dws->src_master = 0; | 2061 | tx_dws->src_master = 0; |
2068 | tx_dws->dst_master = 1; | 2062 | tx_dws->dst_master = 1; |
2069 | tx_dws->src_msize = DW_DMA_MSIZE_1; | ||
2070 | tx_dws->dst_msize = DW_DMA_MSIZE_1; | ||
2071 | tx_dws->fc = DW_DMA_FC_D_M2P; | ||
2072 | } | 2063 | } |
2073 | 2064 | ||
2074 | if (platform_device_add_data(pdev, data, | 2065 | if (platform_device_add_data(pdev, data, |
@@ -2138,14 +2129,10 @@ at32_add_device_abdac(unsigned int id, struct atmel_abdac_pdata *data) | |||
2138 | dws = &data->dws; | 2129 | dws = &data->dws; |
2139 | 2130 | ||
2140 | dws->dma_dev = &dw_dmac0_device.dev; | 2131 | dws->dma_dev = &dw_dmac0_device.dev; |
2141 | dws->reg_width = DW_DMA_SLAVE_WIDTH_32BIT; | ||
2142 | dws->cfg_hi = DWC_CFGH_DST_PER(2); | 2132 | dws->cfg_hi = DWC_CFGH_DST_PER(2); |
2143 | dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL); | 2133 | dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL); |
2144 | dws->src_master = 0; | 2134 | dws->src_master = 0; |
2145 | dws->dst_master = 1; | 2135 | dws->dst_master = 1; |
2146 | dws->src_msize = DW_DMA_MSIZE_1; | ||
2147 | dws->dst_msize = DW_DMA_MSIZE_1; | ||
2148 | dws->fc = DW_DMA_FC_D_M2P; | ||
2149 | 2136 | ||
2150 | if (platform_device_add_data(pdev, data, | 2137 | if (platform_device_add_data(pdev, data, |
2151 | sizeof(struct atmel_abdac_pdata))) | 2138 | sizeof(struct atmel_abdac_pdata))) |
diff --git a/arch/avr32/mach-at32ap/include/mach/atmel-mci.h b/arch/avr32/mach-at32ap/include/mach/atmel-mci.h index a9b38967f703..4bba58561d5c 100644 --- a/arch/avr32/mach-at32ap/include/mach/atmel-mci.h +++ b/arch/avr32/mach-at32ap/include/mach/atmel-mci.h | |||
@@ -14,11 +14,4 @@ struct mci_dma_data { | |||
14 | #define slave_data_ptr(s) (&(s)->sdata) | 14 | #define slave_data_ptr(s) (&(s)->sdata) |
15 | #define find_slave_dev(s) ((s)->sdata.dma_dev) | 15 | #define find_slave_dev(s) ((s)->sdata.dma_dev) |
16 | 16 | ||
17 | #define setup_dma_addr(s, t, r) do { \ | ||
18 | if (s) { \ | ||
19 | (s)->sdata.tx_reg = (t); \ | ||
20 | (s)->sdata.rx_reg = (r); \ | ||
21 | } \ | ||
22 | } while (0) | ||
23 | |||
24 | #endif /* __MACH_ATMEL_MCI_H */ | 17 | #endif /* __MACH_ATMEL_MCI_H */ |