diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-08 15:36:50 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-08 15:36:50 -0400 |
| commit | 2ceedf97aef41d071d897a6e6aec8c05fb707ec4 (patch) | |
| tree | 8435c97dbb7333f8b4977e041075f7a68dfbb92b /include | |
| parent | 09b56d5a418b7ced4ca427c7cf8faf11df72364c (diff) | |
| parent | 3edc85023a1e1daf22d8e372c5c4f87dc4a04a71 (diff) | |
Merge tag 'dmaengine-4.13-rc1' of git://git.infradead.org/users/vkoul/slave-dma
Pull dmaengine updates from Vinod Koul:
- removal of AVR32 support in dw driver as AVR32 is gone
- new driver for Broadcom stream buffer accelerator (SBA) RAID driver
- add support for Faraday Technology FTDMAC020 in amba-pl08x driver
- IOMMU support in pl330 driver
- updates to bunch of drivers
* tag 'dmaengine-4.13-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (36 commits)
dmaengine: qcom_hidma: correct API violation for submit
dmaengine: zynqmp_dma: Remove max len check in zynqmp_dma_prep_memcpy
dmaengine: tegra-apb: Really fix runtime-pm usage
dmaengine: fsl_raid: make of_device_ids const.
dmaengine: qcom_hidma: allow ACPI/DT parameters to be overridden
dmaengine: fsldma: set BWC, DAHTS and SAHTS values correctly
dmaengine: Kconfig: Simplify the help text for MXS_DMA
dmaengine: pl330: Delete unused functions
dmaengine: Replace WARN_TAINT_ONCE() with pr_warn_once()
dmaengine: Kconfig: Extend the dependency for MXS_DMA
dmaengine: mxs: Use %zu for printing a size_t variable
dmaengine: ste_dma40: Cleanup scatterlist layering violations
dmaengine: imx-dma: cleanup scatterlist layering violations
dmaengine: use proper name for the R-Car SoC
dmaengine: imx-sdma: Fix compilation warning.
dmaengine: imx-sdma: Handle return value of clk_prepare_enable
dmaengine: pl330: Add IOMMU support to slave tranfers
dmaengine: DW DMAC: Handle return value of clk_prepare_enable
dmaengine: pl08x: use GENMASK() to create bitmasks
dmaengine: pl08x: Add support for Faraday Technology FTDMAC020
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/amba/pl080.h | 107 | ||||
| -rw-r--r-- | include/linux/amba/pl08x.h | 30 | ||||
| -rw-r--r-- | include/linux/raid/pq.h | 1 |
3 files changed, 121 insertions, 17 deletions
diff --git a/include/linux/amba/pl080.h b/include/linux/amba/pl080.h index 580b5323a717..ab036b6b1804 100644 --- a/include/linux/amba/pl080.h +++ b/include/linux/amba/pl080.h | |||
| @@ -44,7 +44,14 @@ | |||
| 44 | 44 | ||
| 45 | #define PL080_SYNC (0x34) | 45 | #define PL080_SYNC (0x34) |
| 46 | 46 | ||
| 47 | /* Per channel configuration registers */ | 47 | /* The Faraday Technology FTDMAC020 variant registers */ |
| 48 | #define FTDMAC020_CH_BUSY (0x20) | ||
| 49 | /* Identical to PL080_CONFIG */ | ||
| 50 | #define FTDMAC020_CSR (0x24) | ||
| 51 | /* Identical to PL080_SYNC */ | ||
| 52 | #define FTDMAC020_SYNC (0x2C) | ||
| 53 | #define FTDMAC020_REVISION (0x30) | ||
| 54 | #define FTDMAC020_FEATURE (0x34) | ||
| 48 | 55 | ||
| 49 | /* Per channel configuration registers */ | 56 | /* Per channel configuration registers */ |
| 50 | #define PL080_Cx_BASE(x) ((0x100 + (x * 0x20))) | 57 | #define PL080_Cx_BASE(x) ((0x100 + (x * 0x20))) |
| @@ -55,13 +62,20 @@ | |||
| 55 | #define PL080_CH_CONFIG (0x10) | 62 | #define PL080_CH_CONFIG (0x10) |
| 56 | #define PL080S_CH_CONTROL2 (0x10) | 63 | #define PL080S_CH_CONTROL2 (0x10) |
| 57 | #define PL080S_CH_CONFIG (0x14) | 64 | #define PL080S_CH_CONFIG (0x14) |
| 58 | 65 | /* The Faraday FTDMAC020 derivative shuffles the registers around */ | |
| 59 | #define PL080_LLI_ADDR_MASK (0x3fffffff << 2) | 66 | #define FTDMAC020_CH_CSR (0x00) |
| 67 | #define FTDMAC020_CH_CFG (0x04) | ||
| 68 | #define FTDMAC020_CH_SRC_ADDR (0x08) | ||
| 69 | #define FTDMAC020_CH_DST_ADDR (0x0C) | ||
| 70 | #define FTDMAC020_CH_LLP (0x10) | ||
| 71 | #define FTDMAC020_CH_SIZE (0x14) | ||
| 72 | |||
| 73 | #define PL080_LLI_ADDR_MASK GENMASK(31, 2) | ||
| 60 | #define PL080_LLI_ADDR_SHIFT (2) | 74 | #define PL080_LLI_ADDR_SHIFT (2) |
| 61 | #define PL080_LLI_LM_AHB2 BIT(0) | 75 | #define PL080_LLI_LM_AHB2 BIT(0) |
| 62 | 76 | ||
| 63 | #define PL080_CONTROL_TC_IRQ_EN BIT(31) | 77 | #define PL080_CONTROL_TC_IRQ_EN BIT(31) |
| 64 | #define PL080_CONTROL_PROT_MASK (0x7 << 28) | 78 | #define PL080_CONTROL_PROT_MASK GENMASK(30, 28) |
| 65 | #define PL080_CONTROL_PROT_SHIFT (28) | 79 | #define PL080_CONTROL_PROT_SHIFT (28) |
| 66 | #define PL080_CONTROL_PROT_CACHE BIT(30) | 80 | #define PL080_CONTROL_PROT_CACHE BIT(30) |
| 67 | #define PL080_CONTROL_PROT_BUFF BIT(29) | 81 | #define PL080_CONTROL_PROT_BUFF BIT(29) |
| @@ -70,16 +84,16 @@ | |||
| 70 | #define PL080_CONTROL_SRC_INCR BIT(26) | 84 | #define PL080_CONTROL_SRC_INCR BIT(26) |
| 71 | #define PL080_CONTROL_DST_AHB2 BIT(25) | 85 | #define PL080_CONTROL_DST_AHB2 BIT(25) |
| 72 | #define PL080_CONTROL_SRC_AHB2 BIT(24) | 86 | #define PL080_CONTROL_SRC_AHB2 BIT(24) |
| 73 | #define PL080_CONTROL_DWIDTH_MASK (0x7 << 21) | 87 | #define PL080_CONTROL_DWIDTH_MASK GENMASK(23, 21) |
| 74 | #define PL080_CONTROL_DWIDTH_SHIFT (21) | 88 | #define PL080_CONTROL_DWIDTH_SHIFT (21) |
| 75 | #define PL080_CONTROL_SWIDTH_MASK (0x7 << 18) | 89 | #define PL080_CONTROL_SWIDTH_MASK GENMASK(20, 18) |
| 76 | #define PL080_CONTROL_SWIDTH_SHIFT (18) | 90 | #define PL080_CONTROL_SWIDTH_SHIFT (18) |
| 77 | #define PL080_CONTROL_DB_SIZE_MASK (0x7 << 15) | 91 | #define PL080_CONTROL_DB_SIZE_MASK GENMASK(17, 15) |
| 78 | #define PL080_CONTROL_DB_SIZE_SHIFT (15) | 92 | #define PL080_CONTROL_DB_SIZE_SHIFT (15) |
| 79 | #define PL080_CONTROL_SB_SIZE_MASK (0x7 << 12) | 93 | #define PL080_CONTROL_SB_SIZE_MASK GENMASK(14, 12) |
| 80 | #define PL080_CONTROL_SB_SIZE_SHIFT (12) | 94 | #define PL080_CONTROL_SB_SIZE_SHIFT (12) |
| 81 | #define PL080_CONTROL_TRANSFER_SIZE_MASK (0xfff << 0) | 95 | #define PL080_CONTROL_TRANSFER_SIZE_MASK GENMASK(11, 0) |
| 82 | #define PL080S_CONTROL_TRANSFER_SIZE_MASK (0x1ffffff << 0) | 96 | #define PL080S_CONTROL_TRANSFER_SIZE_MASK GENMASK(24, 0) |
| 83 | #define PL080_CONTROL_TRANSFER_SIZE_SHIFT (0) | 97 | #define PL080_CONTROL_TRANSFER_SIZE_SHIFT (0) |
| 84 | 98 | ||
| 85 | #define PL080_BSIZE_1 (0x0) | 99 | #define PL080_BSIZE_1 (0x0) |
| @@ -102,11 +116,11 @@ | |||
| 102 | #define PL080_CONFIG_LOCK BIT(16) | 116 | #define PL080_CONFIG_LOCK BIT(16) |
| 103 | #define PL080_CONFIG_TC_IRQ_MASK BIT(15) | 117 | #define PL080_CONFIG_TC_IRQ_MASK BIT(15) |
| 104 | #define PL080_CONFIG_ERR_IRQ_MASK BIT(14) | 118 | #define PL080_CONFIG_ERR_IRQ_MASK BIT(14) |
| 105 | #define PL080_CONFIG_FLOW_CONTROL_MASK (0x7 << 11) | 119 | #define PL080_CONFIG_FLOW_CONTROL_MASK GENMASK(13, 11) |
| 106 | #define PL080_CONFIG_FLOW_CONTROL_SHIFT (11) | 120 | #define PL080_CONFIG_FLOW_CONTROL_SHIFT (11) |
| 107 | #define PL080_CONFIG_DST_SEL_MASK (0xf << 6) | 121 | #define PL080_CONFIG_DST_SEL_MASK GENMASK(9, 6) |
| 108 | #define PL080_CONFIG_DST_SEL_SHIFT (6) | 122 | #define PL080_CONFIG_DST_SEL_SHIFT (6) |
| 109 | #define PL080_CONFIG_SRC_SEL_MASK (0xf << 1) | 123 | #define PL080_CONFIG_SRC_SEL_MASK GENMASK(4, 1) |
| 110 | #define PL080_CONFIG_SRC_SEL_SHIFT (1) | 124 | #define PL080_CONFIG_SRC_SEL_SHIFT (1) |
| 111 | #define PL080_CONFIG_ENABLE BIT(0) | 125 | #define PL080_CONFIG_ENABLE BIT(0) |
| 112 | 126 | ||
| @@ -119,6 +133,73 @@ | |||
| 119 | #define PL080_FLOW_PER2MEM_PER (0x6) | 133 | #define PL080_FLOW_PER2MEM_PER (0x6) |
| 120 | #define PL080_FLOW_SRC2DST_SRC (0x7) | 134 | #define PL080_FLOW_SRC2DST_SRC (0x7) |
| 121 | 135 | ||
| 136 | #define FTDMAC020_CH_CSR_TC_MSK BIT(31) | ||
| 137 | /* Later versions have a threshold in bits 24..26, */ | ||
| 138 | #define FTDMAC020_CH_CSR_FIFOTH_MSK GENMASK(26, 24) | ||
| 139 | #define FTDMAC020_CH_CSR_FIFOTH_SHIFT (24) | ||
| 140 | #define FTDMAC020_CH_CSR_CHPR1_MSK GENMASK(23, 22) | ||
| 141 | #define FTDMAC020_CH_CSR_PROT3 BIT(21) | ||
| 142 | #define FTDMAC020_CH_CSR_PROT2 BIT(20) | ||
| 143 | #define FTDMAC020_CH_CSR_PROT1 BIT(19) | ||
| 144 | #define FTDMAC020_CH_CSR_SRC_SIZE_MSK GENMASK(18, 16) | ||
| 145 | #define FTDMAC020_CH_CSR_SRC_SIZE_SHIFT (16) | ||
| 146 | #define FTDMAC020_CH_CSR_ABT BIT(15) | ||
| 147 | #define FTDMAC020_CH_CSR_SRC_WIDTH_MSK GENMASK(13, 11) | ||
| 148 | #define FTDMAC020_CH_CSR_SRC_WIDTH_SHIFT (11) | ||
| 149 | #define FTDMAC020_CH_CSR_DST_WIDTH_MSK GENMASK(10, 8) | ||
| 150 | #define FTDMAC020_CH_CSR_DST_WIDTH_SHIFT (8) | ||
| 151 | #define FTDMAC020_CH_CSR_MODE BIT(7) | ||
| 152 | /* 00 = increase, 01 = decrease, 10 = fix */ | ||
| 153 | #define FTDMAC020_CH_CSR_SRCAD_CTL_MSK GENMASK(6, 5) | ||
| 154 | #define FTDMAC020_CH_CSR_SRCAD_CTL_SHIFT (5) | ||
| 155 | #define FTDMAC020_CH_CSR_DSTAD_CTL_MSK GENMASK(4, 3) | ||
| 156 | #define FTDMAC020_CH_CSR_DSTAD_CTL_SHIFT (3) | ||
| 157 | #define FTDMAC020_CH_CSR_SRC_SEL BIT(2) | ||
| 158 | #define FTDMAC020_CH_CSR_DST_SEL BIT(1) | ||
| 159 | #define FTDMAC020_CH_CSR_EN BIT(0) | ||
| 160 | |||
| 161 | /* FIFO threshold setting */ | ||
| 162 | #define FTDMAC020_CH_CSR_FIFOTH_1 (0x0) | ||
| 163 | #define FTDMAC020_CH_CSR_FIFOTH_2 (0x1) | ||
| 164 | #define FTDMAC020_CH_CSR_FIFOTH_4 (0x2) | ||
| 165 | #define FTDMAC020_CH_CSR_FIFOTH_8 (0x3) | ||
| 166 | #define FTDMAC020_CH_CSR_FIFOTH_16 (0x4) | ||
| 167 | /* The FTDMAC020 supports 64bit wide transfers */ | ||
| 168 | #define FTDMAC020_WIDTH_64BIT (0x3) | ||
| 169 | /* Address can be increased, decreased or fixed */ | ||
| 170 | #define FTDMAC020_CH_CSR_SRCAD_CTL_INC (0x0) | ||
| 171 | #define FTDMAC020_CH_CSR_SRCAD_CTL_DEC (0x1) | ||
| 172 | #define FTDMAC020_CH_CSR_SRCAD_CTL_FIXED (0x2) | ||
| 173 | |||
| 174 | #define FTDMAC020_CH_CFG_LLP_CNT_MASK GENMASK(19, 16) | ||
| 175 | #define FTDMAC020_CH_CFG_LLP_CNT_SHIFT (16) | ||
| 176 | #define FTDMAC020_CH_CFG_BUSY BIT(8) | ||
| 177 | #define FTDMAC020_CH_CFG_INT_ABT_MASK BIT(2) | ||
| 178 | #define FTDMAC020_CH_CFG_INT_ERR_MASK BIT(1) | ||
| 179 | #define FTDMAC020_CH_CFG_INT_TC_MASK BIT(0) | ||
| 180 | |||
| 181 | /* Inside the LLIs, the applicable CSR fields are mapped differently */ | ||
| 182 | #define FTDMAC020_LLI_TC_MSK BIT(28) | ||
| 183 | #define FTDMAC020_LLI_SRC_WIDTH_MSK GENMASK(27, 25) | ||
| 184 | #define FTDMAC020_LLI_SRC_WIDTH_SHIFT (25) | ||
| 185 | #define FTDMAC020_LLI_DST_WIDTH_MSK GENMASK(24, 22) | ||
| 186 | #define FTDMAC020_LLI_DST_WIDTH_SHIFT (22) | ||
| 187 | #define FTDMAC020_LLI_SRCAD_CTL_MSK GENMASK(21, 20) | ||
| 188 | #define FTDMAC020_LLI_SRCAD_CTL_SHIFT (20) | ||
| 189 | #define FTDMAC020_LLI_DSTAD_CTL_MSK GENMASK(19, 18) | ||
| 190 | #define FTDMAC020_LLI_DSTAD_CTL_SHIFT (18) | ||
| 191 | #define FTDMAC020_LLI_SRC_SEL BIT(17) | ||
| 192 | #define FTDMAC020_LLI_DST_SEL BIT(16) | ||
| 193 | #define FTDMAC020_LLI_TRANSFER_SIZE_MASK GENMASK(11, 0) | ||
| 194 | #define FTDMAC020_LLI_TRANSFER_SIZE_SHIFT (0) | ||
| 195 | |||
| 196 | #define FTDMAC020_CFG_LLP_CNT_MASK GENMASK(19, 16) | ||
| 197 | #define FTDMAC020_CFG_LLP_CNT_SHIFT (16) | ||
| 198 | #define FTDMAC020_CFG_BUSY BIT(8) | ||
| 199 | #define FTDMAC020_CFG_INT_ABT_MSK BIT(2) | ||
| 200 | #define FTDMAC020_CFG_INT_ERR_MSK BIT(1) | ||
| 201 | #define FTDMAC020_CFG_INT_TC_MSK BIT(0) | ||
| 202 | |||
| 122 | /* DMA linked list chain structure */ | 203 | /* DMA linked list chain structure */ |
| 123 | 204 | ||
| 124 | struct pl080_lli { | 205 | struct pl080_lli { |
diff --git a/include/linux/amba/pl08x.h b/include/linux/amba/pl08x.h index 5308eae9ce35..79d1bcee738d 100644 --- a/include/linux/amba/pl08x.h +++ b/include/linux/amba/pl08x.h | |||
| @@ -47,8 +47,6 @@ enum { | |||
| 47 | * devices with static assignments | 47 | * devices with static assignments |
| 48 | * @muxval: a number usually used to poke into some mux regiser to | 48 | * @muxval: a number usually used to poke into some mux regiser to |
| 49 | * mux in the signal to this channel | 49 | * mux in the signal to this channel |
| 50 | * @cctl_memcpy: options for the channel control register for memcpy | ||
| 51 | * *** not used for slave channels *** | ||
| 52 | * @addr: source/target address in physical memory for this DMA channel, | 50 | * @addr: source/target address in physical memory for this DMA channel, |
| 53 | * can be the address of a FIFO register for burst requests for example. | 51 | * can be the address of a FIFO register for burst requests for example. |
| 54 | * This can be left undefined if the PrimeCell API is used for configuring | 52 | * This can be left undefined if the PrimeCell API is used for configuring |
| @@ -63,12 +61,28 @@ struct pl08x_channel_data { | |||
| 63 | int min_signal; | 61 | int min_signal; |
| 64 | int max_signal; | 62 | int max_signal; |
| 65 | u32 muxval; | 63 | u32 muxval; |
| 66 | u32 cctl_memcpy; | ||
| 67 | dma_addr_t addr; | 64 | dma_addr_t addr; |
| 68 | bool single; | 65 | bool single; |
| 69 | u8 periph_buses; | 66 | u8 periph_buses; |
| 70 | }; | 67 | }; |
| 71 | 68 | ||
| 69 | enum pl08x_burst_size { | ||
| 70 | PL08X_BURST_SZ_1, | ||
| 71 | PL08X_BURST_SZ_4, | ||
| 72 | PL08X_BURST_SZ_8, | ||
| 73 | PL08X_BURST_SZ_16, | ||
| 74 | PL08X_BURST_SZ_32, | ||
| 75 | PL08X_BURST_SZ_64, | ||
| 76 | PL08X_BURST_SZ_128, | ||
| 77 | PL08X_BURST_SZ_256, | ||
| 78 | }; | ||
| 79 | |||
| 80 | enum pl08x_bus_width { | ||
| 81 | PL08X_BUS_WIDTH_8_BITS, | ||
| 82 | PL08X_BUS_WIDTH_16_BITS, | ||
| 83 | PL08X_BUS_WIDTH_32_BITS, | ||
| 84 | }; | ||
| 85 | |||
| 72 | /** | 86 | /** |
| 73 | * struct pl08x_platform_data - the platform configuration for the PL08x | 87 | * struct pl08x_platform_data - the platform configuration for the PL08x |
| 74 | * PrimeCells. | 88 | * PrimeCells. |
| @@ -76,6 +90,11 @@ struct pl08x_channel_data { | |||
| 76 | * platform, all inclusive, including multiplexed channels. The available | 90 | * platform, all inclusive, including multiplexed channels. The available |
| 77 | * physical channels will be multiplexed around these signals as they are | 91 | * physical channels will be multiplexed around these signals as they are |
| 78 | * requested, just enumerate all possible channels. | 92 | * requested, just enumerate all possible channels. |
| 93 | * @num_slave_channels: number of elements in the slave channel array | ||
| 94 | * @memcpy_burst_size: the appropriate burst size for memcpy operations | ||
| 95 | * @memcpy_bus_width: memory bus width | ||
| 96 | * @memcpy_prot_buff: whether memcpy DMA is bufferable | ||
| 97 | * @memcpy_prot_cache: whether memcpy DMA is cacheable | ||
| 79 | * @get_xfer_signal: request a physical signal to be used for a DMA transfer | 98 | * @get_xfer_signal: request a physical signal to be used for a DMA transfer |
| 80 | * immediately: if there is some multiplexing or similar blocking the use | 99 | * immediately: if there is some multiplexing or similar blocking the use |
| 81 | * of the channel the transfer can be denied by returning less than zero, | 100 | * of the channel the transfer can be denied by returning less than zero, |
| @@ -90,7 +109,10 @@ struct pl08x_channel_data { | |||
| 90 | struct pl08x_platform_data { | 109 | struct pl08x_platform_data { |
| 91 | struct pl08x_channel_data *slave_channels; | 110 | struct pl08x_channel_data *slave_channels; |
| 92 | unsigned int num_slave_channels; | 111 | unsigned int num_slave_channels; |
| 93 | struct pl08x_channel_data memcpy_channel; | 112 | enum pl08x_burst_size memcpy_burst_size; |
| 113 | enum pl08x_bus_width memcpy_bus_width; | ||
| 114 | bool memcpy_prot_buff; | ||
| 115 | bool memcpy_prot_cache; | ||
| 94 | int (*get_xfer_signal)(const struct pl08x_channel_data *); | 116 | int (*get_xfer_signal)(const struct pl08x_channel_data *); |
| 95 | void (*put_xfer_signal)(const struct pl08x_channel_data *, int); | 117 | void (*put_xfer_signal)(const struct pl08x_channel_data *, int); |
| 96 | u8 lli_buses; | 118 | u8 lli_buses; |
diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h index 4d57bbaaa1bf..30f945329818 100644 --- a/include/linux/raid/pq.h +++ b/include/linux/raid/pq.h | |||
| @@ -142,6 +142,7 @@ int raid6_select_algo(void); | |||
| 142 | extern const u8 raid6_gfmul[256][256] __attribute__((aligned(256))); | 142 | extern const u8 raid6_gfmul[256][256] __attribute__((aligned(256))); |
| 143 | extern const u8 raid6_vgfmul[256][32] __attribute__((aligned(256))); | 143 | extern const u8 raid6_vgfmul[256][32] __attribute__((aligned(256))); |
| 144 | extern const u8 raid6_gfexp[256] __attribute__((aligned(256))); | 144 | extern const u8 raid6_gfexp[256] __attribute__((aligned(256))); |
| 145 | extern const u8 raid6_gflog[256] __attribute__((aligned(256))); | ||
| 145 | extern const u8 raid6_gfinv[256] __attribute__((aligned(256))); | 146 | extern const u8 raid6_gfinv[256] __attribute__((aligned(256))); |
| 146 | extern const u8 raid6_gfexi[256] __attribute__((aligned(256))); | 147 | extern const u8 raid6_gfexi[256] __attribute__((aligned(256))); |
| 147 | 148 | ||
