dw_dmac: introduce generic DMA binding for DT
Subsystems (8)
cover dw_dmac: introduce generic DMA binding for DT
Hi Vinod,
As Andy pointed out today, we don't have a good solution for the dw_dmac DT binding in linux-next yet. I have posted my series once before and then got distracted after getting feedback from Viresh, Andy and Russell. I have now updated my earlier patch based on the feedback and rebased on your tree without any of the arm-soc patches mixed in.
Unfortunately the patches have never been tested on real hardware so I don't think it's a good idea to use them in v3.9 on the spear platform. However, your dma-slave tree still contains Viresh's earlier patches, causing a few problems:
* With those patches, the spear3xx platform currently does not build. (this one would be easy to fix though)
* There is a conflict between those patches and my spear multiplatform series, which I have not yet queued up for 3.9 because of this, since that would have meant that Stephen Rothwell would have to discard either the arm-soc tree or the dma-slave tree from linux-next.
* I really don't want the broken binding to appear in 3.9.
I believe the best way out at this point is this series, which first first reverts the patch f9965aa2 "ARM: SPEAr13xx: Pass DW DMAC platform data from DT" from your tree and then adds my update.
This will give us the right DT binding for dw-dmac but no in-tree users, which means that nothing should break if I get it slightly wrong. Please apply the first two patches from these set, and optionally the two patches that based on this convert the pl011 uart and pl022 spi controller drivers.
I can then decide with Olof whether or not to take the spear multiplatform changes that no longer conflict with the dma slave tree as a "late" branch into 3.9 or wait until 3.10, but that is something you don't need to worry about then. Also the conversion of spear to use the new binding (patch 5 of my original series) can go through the arm-soc tree for 3.10 after the ST folks have tested that it works.
Arnd
Arnd Bergmann (4):
Revert "ARM: SPEAr13xx: Pass DW DMAC platform data from DT"
dmaengine: dw_dmac: move to generic DMA binding
spi: pl022: use generic DMA slave configuration if possible
serial: pl011: use generic DMA slave configuration if possible
.../devicetree/bindings/arm/primecell.txt | 19 ++- Documentation/devicetree/bindings/dma/snps-dma.txt | 70 ++++++----- Documentation/devicetree/bindings/serial/pl011.txt | 17 +++ .../devicetree/bindings/spi/spi_pl022.txt | 36 ++++++ arch/arm/boot/dts/spear1340.dtsi | 19 --- arch/arm/boot/dts/spear13xx.dtsi | 38 ------ arch/arm/mach-spear13xx/include/mach/spear.h | 2 + arch/arm/mach-spear13xx/spear1310.c | 5 +- arch/arm/mach-spear13xx/spear1340.c | 33 +++-- arch/arm/mach-spear13xx/spear13xx.c | 55 ++++++++- drivers/dma/dw_dmac.c | 137 ++++++++++----------- drivers/dma/dw_dmac_regs.h | 8 +- drivers/spi/spi-pl022.c | 43 ++++++- drivers/tty/serial/amba-pl011.c | 62 ++++++---- include/linux/dw_dmac.h | 5 - 15 files changed, 333 insertions(+), 216 deletions(-) create mode 100644 Documentation/devicetree/bindings/serial/pl011.txt
Signature · 1 line
1.8.1.2
PATCH 1/4 Revert "ARM: SPEAr13xx: Pass DW DMAC platform data from DT"
This reverts commit f9965aa20706860077cfa093d04a6351c0c1e940.
--- arch/arm/boot/dts/spear1340.dtsi | 19 ---------- arch/arm/boot/dts/spear13xx.dtsi | 38 ------------------- arch/arm/mach-spear13xx/include/mach/spear.h | 2 + arch/arm/mach-spear13xx/spear1310.c | 5 ++- arch/arm/mach-spear13xx/spear1340.c | 33 ++++++++++++----- arch/arm/mach-spear13xx/spear13xx.c | 55 ++++++++++++++++++++++++++-- 6 files changed, 80 insertions(+), 72 deletions(-)
arch/arm/boot/dts/spear1340.dtsi +0 -19
@@ -88,25 +88,6 @@ status = "disabled"; }; - dma at ea800000 { - slave_info { - uart1_tx { - bus_id = "uart1_tx"; - cfg_hi = <0x6000>; /* 0xC << 11 */ - cfg_lo = <0>; - src_master = <0>; - dst_master = <1>; - }; - uart1_tx { - bus_id = "uart1_tx"; - cfg_hi = <0x680>; /* 0xD << 7 */ - cfg_lo = <0>; - src_master = <1>; - dst_master = <0>; - }; - }; - }; - spi1: spi at 5d400000 { compatible = "arm,pl022", "arm,primecell"; reg = <0x5d400000 0x1000>;
arch/arm/boot/dts/spear13xx.dtsi +0 -38
@@ -105,37 +105,6 @@ reg = <0xea800000 0x1000>; interrupts = <0 19 0x4>; status = "disabled"; - - nr_channels = <8>; - chan_allocation_order = <1>; - chan_priority = <1>; - block_size = <0xfff>; - nr_masters = <2>; - data_width = <3 3 0 0>; - - slave_info { - ssp0_tx { - bus_id = "ssp0_tx"; - cfg_hi = <0x2000>; /* 0x4 << 11 */ - cfg_lo = <0>; - src_master = <0>; - dst_master = <0>; - }; - ssp0_rx { - bus_id = "ssp0_rx"; - cfg_hi = <0x280>; /* 0x5 << 7 */ - cfg_lo = <0>; - src_master = <0>; - dst_master = <0>; - }; - cf { - bus_id = "cf"; - cfg_hi = <0>; - cfg_lo = <0>; - src_master = <0>; - dst_master = <0>; - }; - }; }; dma at eb000000 {
@@ -143,13 +112,6 @@ reg = <0xeb000000 0x1000>; interrupts = <0 59 0x4>; status = "disabled"; - - nr_channels = <8>; - chan_allocation_order = <1>; - chan_priority = <1>; - block_size = <0xfff>; - nr_masters = <2>; - data_width = <3 3 0 0>; }; fsmc: flash at b0000000 {
arch/arm/mach-spear13xx/include/mach/spear.h +2 -0
@@ -43,6 +43,8 @@#define VA_L2CC_BASE IOMEM(UL(0xFB000000))/* others */ +#define DMAC0_BASE UL(0xEA800000) +#define DMAC1_BASE UL(0xEB000000)#define MCIF_CF_BASE UL(0xB2800000)/* Debug uart for linux, will be used for debug and uncompress messages */
arch/arm/mach-spear13xx/spear1310.c +4 -1
@@ -36,7 +36,7 @@static struct arasan_cf_pdata cf_pdata = { .cf_if_clk =CF_IF_CLK_166M , .quirk =CF_BROKEN_UDMA , - .dma_priv ="cf" , + .dma_priv = &cf_dma_priv, };/* ssp device registration */
@@ -47,7 +47,10 @@ static struct pl022_ssp_controller ssp1_plat_data = {/* Add SPEAr1310 auxdata to pass platform data */ static struct of_dev_auxdata spear1310_auxdata_lookup[]__initdata = {OF_DEV_AUXDATA ("arasan,cf-spear1340" ,MCIF_CF_BASE ,NULL , &cf_pdata), +OF_DEV_AUXDATA ("snps,dma-spear1340" ,DMAC0_BASE ,NULL , &dmac_plat_data), +OF_DEV_AUXDATA ("snps,dma-spear1340" ,DMAC1_BASE ,NULL , &dmac_plat_data),OF_DEV_AUXDATA ("arm,pl022" ,SSP_BASE ,NULL , &pl022_plat_data), +OF_DEV_AUXDATA ("arm,pl022" ,SPEAR1310_SSP1_BASE ,NULL , &ssp1_plat_data), {} };
arch/arm/mach-spear13xx/spear1340.c +23 -10
@@ -18,9 +18,9 @@#include <linux/delay.h> #include <linux/dw_dmac.h> #include <linux/of_platform.h> -#include <linux/pata_arasan_cf_data.h> #include <asm/hardware/gic.h> #include <asm/mach/arch.h> +#include <mach/dma.h> #include <mach/generic.h> #include <mach/spear.h>
@@ -78,16 +78,26 @@ (SPEAR1340_MIPHY_OSC_BYPASS_EXT | \ SPEAR1340_MIPHY_PLL_RATIO_TOP(25)) -static struct amba_pl011_data uart1_data = { - .dma_filter = dw_dma_generic_filter, - .dma_tx_param ="uart1_tx" , - .dma_rx_param ="uart1_rx" , +static struct dw_dma_slave uart1_dma_param[] = { + { +/* Tx */ + .cfg_hi =DWC_CFGH_DST_PER (SPEAR1340_DMA_REQ_UART1_TX ), + .cfg_lo =0 , + .src_master =DMA_MASTER_MEMORY , + .dst_master =SPEAR1340_DMA_MASTER_UART1 , + }, { +/* Rx */ + .cfg_hi =DWC_CFGH_SRC_PER (SPEAR1340_DMA_REQ_UART1_RX ), + .cfg_lo =0 , + .src_master =SPEAR1340_DMA_MASTER_UART1 , + .dst_master =DMA_MASTER_MEMORY , + } }; -static struct arasan_cf_pdata cf_pdata = { - .cf_if_clk =CF_IF_CLK_166M , - .quirk =CF_BROKEN_UDMA , - .dma_priv ="cf" , +static struct amba_pl011_data uart1_data = { + .dma_filter = dw_dma_filter, + .dma_tx_param = &uart1_dma_param[0 ], + .dma_rx_param = &uart1_dma_param[1 ], };/* SATA device registration */
@@ -148,8 +158,11 @@ static struct ahci_platform_data sata_pdata = {/* Add SPEAr1340 auxdata to pass platform data */ static struct of_dev_auxdata spear1340_auxdata_lookup[]__initdata = { -OF_DEV_AUXDATA ("arasan,cf-spear1340" ,MCIF_CF_BASE ,NULL , &cf_pdata), +OF_DEV_AUXDATA ("arasan,cf-spear1340" ,MCIF_CF_BASE ,NULL , &cf_dma_priv), +OF_DEV_AUXDATA ("snps,dma-spear1340" ,DMAC0_BASE ,NULL , &dmac_plat_data), +OF_DEV_AUXDATA ("snps,dma-spear1340" ,DMAC1_BASE ,NULL , &dmac_plat_data),OF_DEV_AUXDATA ("arm,pl022" ,SSP_BASE ,NULL , &pl022_plat_data), +OF_DEV_AUXDATA ("snps,spear-ahci" ,SPEAR1340_SATA_BASE ,NULL , &sata_pdata),OF_DEV_AUXDATA ("arm,pl011" ,SPEAR1340_UART1_BASE ,NULL , &uart1_data),
arch/arm/mach-spear13xx/spear13xx.c +51 -4
67 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 2/4 dmaengine: dw_dmac: move to generic DMA binding
In reply to Arnd BergmannThe original device tree binding for this driver, from Viresh Kumar unfortunately conflicted with the generic DMA binding, and did not allow to completely seperate slave device configuration from the controller.
This is an attempt to replace it with an implementation of the generic binding, but it is currently completely untested, because I do not have any hardware with this particular controller.
The patch applies on top of linux-next, which contains both the base support for the generic DMA binding, as well as the earlier attempt from Viresh. Both of these are currently not merged upstream however.
There are a couple of TODO items that are left remaining and are open for ideas from other people.
--- Documentation/devicetree/bindings/dma/snps-dma.txt | 70 ++++++----- drivers/dma/dw_dmac.c | 137 ++++++++++----------- drivers/dma/dw_dmac_regs.h | 8 +- include/linux/dw_dmac.h | 5 - 4 files changed, 104 insertions(+), 116 deletions(-)
Documentation/devicetree/bindings/dma/snps-dma.txt +36 -34
@@ -3,59 +3,61 @@ Required properties: - compatible: "snps,dma-spear1340" - reg: Address range of the DMAC registers -- interrupt-parent: Should be the phandle for the interrupt controller - that services interrupts for this device - interrupt: Should contain the DMAC interrupt number -- nr_channels: Number of channels supported by hardware -- is_private: The device channels should be marked as private and not for by the - general purpose DMA channel allocator. False if not passed. +- dma-channels: Number of channels supported by hardware +- dma-requests: Number of DMA request lines supported, up to 16 +- dma-masters: Number of AHB masters supported by the controller +- #dma-cells: must be <3> - chan_allocation_order: order of allocation of channel, 0 (default): ascending, 1: descending - chan_priority: priority of channels. 0 (default): increase from chan 0->n, 1: increase from chan n->0 - block_size: Maximum block size supported by the controller -- nr_masters: Number of AHB masters supported by the controller - data_width: Maximum data width supported by hardware per AHB master (0 - 8bits, 1 - 16bits, ..., 5 - 256bits) -- slave_info: - - bus_id: name of this device channel, not just a device name since - devices may have more than one channel e.g. "foo_tx". For using the - dw_generic_filter(), slave drivers must pass exactly this string as - param to filter function. - - cfg_hi: Platform-specific initializer for the CFG_HI register - - cfg_lo: Platform-specific initializer for the CFG_LO register - - src_master: src master for transfers on allocated channel. - - dst_master: dest master for transfers on allocated channel. + + +Optional properties: +- interrupt-parent: Should be the phandle for the interrupt controller + that services interrupts for this device +- is_private: The device channels should be marked as private and not for by the + general purpose DMA channel allocator. False if not passed. Example: - dma at fc000000 { + dmahost: dma at fc000000 { compatible = "snps,dma-spear1340"; reg = <0xfc000000 0x1000>; interrupt-parent = <&vic1>; interrupts = <12>; - nr_channels = <8>; + dma-channels = <8>; + dma-requests = <16>; + dma-masters = <2>; + #dma-cells = <3>; chan_allocation_order = <1>; chan_priority = <1>; block_size = <0xfff>; - nr_masters = <2>; data_width = <3 3 0 0>; + }; - slave_info { - uart0-tx { - bus_id = "uart0-tx"; - cfg_hi = <0x4000>; /* 0x8 << 11 */ - cfg_lo = <0>; - src_master = <0>; - dst_master = <1>; - }; - spi0-tx { - bus_id = "spi0-tx"; - cfg_hi = <0x2000>; /* 0x4 << 11 */ - cfg_lo = <0>; - src_master = <0>; - dst_master = <0>; - }; - }; +DMA clients connected to the Designware DMA controller must use the format +described in the dma.txt file, using a five-cell specifier for each channel. +The four cells in order are: + +1. A phandle pointing to the DMA controller +2. The DMA request line number +3. Source master for transfers on allocated channel +4. Destination master for transfers on allocated channel + +Example: + + serial at e0000000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0xe0000000 0x1000>; + interrupts = <0 35 0x4>; + status = "disabled"; + dmas = <&dmahost 12 0 1>, + <&dmahost 13 0 1 0>; + dma-names = "rx", "rx"; };
drivers/dma/dw_dmac.c +64 -73
205 lines not on this page · raw message
drivers/dma/dw_dmac_regs.h +4 -4
@@ -213,6 +213,10 @@ struct dw_dma_chan {/* configuration passed via DMA_SLAVE_CONFIG */ struct dma_slave_config dma_sconfig; +/* slave configuration from DT */ +unsigned int req; +struct dw_dma_slave slave; +/* backlink to dw_dma */ struct dw_dma *dw; };
@@ -239,10 +243,6 @@ struct dw_dma {struct tasklet_struct tasklet;struct clk *clk; -/* slave information */ -struct dw_dma_slave *sd; -unsigned int sd_count; -u8 all_chan_mask;/* hardware configuration */
include/linux/dw_dmac.h +0 -5
@@ -27,7 +27,6 @@*/ struct dw_dma_slave {struct device *dma_dev; -const char *bus_id;u32 cfg_hi;u32 cfg_lo;u8 src_master;
@@ -60,9 +59,6 @@ struct dw_dma_platform_data {unsigned short block_size;unsigned char nr_masters;unsigned char data_width[4 ]; - -struct dw_dma_slave *sd; -unsigned int sd_count; };/* bursts size */
@@ -114,6 +110,5 @@ void dw_dma_cyclic_stop(struct dma_chan *chan);dma_addr_t dw_dma_get_src_addr (struct dma_chan *chan);dma_addr_t dw_dma_get_dst_addr (struct dma_chan *chan); -bool dw_dma_generic_filter (struct dma_chan *chan,void *param);#endif /* DW_DMAC_H */
Signature · 1 line
1.8.1.2
Re: [PATCH 2/4] dmaengine: dw_dmac: move to generic DMA binding
Documentation/devicetree/bindings/dma/snps-dma.txt line 45
Quoted 5 lines · Arnd Bergmann
Documentation/devicetree/bindings/dma/snps-dma.txt +3
-0+- #dma-cells: must be <3> +DMA clients connected to the Designware DMA controller must use the format +described in the dma.txt file, using a five-cell specifier for each channel.
s/five/four ?
Quoted 8 lines
Documentation/devicetree/bindings/dma/snps-dma.txt +6
-0+The four cells in order are: + +1. A phandle pointing to the DMA controller +2. The DMA request line number +3. Source master for transfers on allocated channel +4. Destination master for transfers on allocated channel
drivers/dma/dw_dmac.c static void dwc_free_chan_resources(struct dma_chan *chan) · line 1209
Quoted 6 lines
drivers/dma/dw_dmac.c +3
-0+static bool dw_dma_generic_filter (struct dma_chan *chan,void *param) { + dws->cfg_hi =0xffffffff ; + dws->cfg_lo =0xffffffff ;
s/0xffffffff/-1 ?
Quoted 62 lines
drivers/dma/dw_dmac.c +33
-10+ dws->src_master = fargs->src; + dws->dst_master = fargs->dst; + dwc->req = fargs->req; -return true; - } - } + chan->private = dws; + +return true; +} + +static struct dma_chan *dw_dma_xlate (struct of_phandle_args *dma_spec, +struct of_dma *ofdma) +{ +struct dw_dma *dw = ofdma->of_dma_data; +struct dw_dma_filter_args fargs = { + .dw = dw, + }; +dma_cap_mask_t cap; + +if (dma_spec->args_count !=3 ) +return NULL ; + + fargs.req =be32_to_cpup (dma_spec->args+0 ); + fargs.src =be32_to_cpup (dma_spec->args+1 ); + fargs.dst =be32_to_cpup (dma_spec->args+2 ); + +if (WARN_ON (fargs.req >=16 || fargs.src >=2 || fargs.dst >=2 )) +return NULL ; - last_dw = dw; - last_bus_id = param; -return false; +dma_cap_zero (cap); +dma_cap_set (DMA_SLAVE , cap); + +/* TODO: there should be a simpler way to do this */ +return dma_request_channel (cap, dw_dma_generic_filter, &dma_spec->args[0 ]); } -EXPORT_SYMBOL (dw_dma_generic_filter);/* --------------------- Cyclic DMA API extensions -------------------- */ @@ -1510,9 +1529,8 @@ static void dw_dma_off(struct dw_dma *dw)static struct dw_dma_platform_data *dw_dma_parse_dt (struct platform_device *pdev) { -struct device_node *sn, *cn, *np = pdev->dev.of_node; +struct device_node *np = pdev->dev.of_node;struct dw_dma_platform_data *pdata; -struct dw_dma_slave *sd;u32 tmp, arr[4 ];if (!np) {@@ -1524,7 +1542,7 @@ dw_dma_parse_dt(struct platform_device *pdev)if (!pdata)return NULL ; -if (of_property_read_u32 (np,"nr_channels" , &pdata->nr_channels)) +if (of_property_read_u32 (np,"dma-channels" , &pdata->nr_channels))return NULL ;
Re: [PATCH 2/4] dmaengine: dw_dmac: move to generic DMA binding
Quoted 8 lines · Viresh Kumar
Documentation/devicetree/bindings/dma/snps-dma.txt line 45
Quoted 5 lines · Arnd Bergmann
Documentation/devicetree/bindings/dma/snps-dma.txt +3
-0+- #dma-cells: must be <3> +DMA clients connected to the Designware DMA controller must use the format +described in the dma.txt file, using a five-cell specifier for each channel.s/five/four ?
Right. I thought I had fixed up all instances.
Quoted 7 lines
Documentation/devicetree/bindings/dma/snps-dma.txt
Quoted 5 lines
Documentation/devicetree/bindings/dma/snps-dma.txt +3
-0+static bool dw_dma_generic_filter(struct dma_chan *chan, void *param) { + dws->cfg_hi = 0xffffffff; + dws->cfg_lo = 0xffffffff;s/0xffffffff/-1 ?
It's an 'unsigned int'. While -1 would work here, I always find it a little odd to rely on that feature of the C language.
Thannks for the review.
Arnd
Re: [PATCH 2/4] dmaengine: dw_dmac: move to generic DMA binding
Quoted 5 lines · Arnd Bergmann
Quoted 4 lines · Viresh Kumar
Quoted 2 lines · Arnd Bergmann
+static bool
dw_dma_generic_filter(struct dma_chan *chan, void *param)
{
Quoted 7 lines
Quoted 4 lines
drivers/dma/dw_dmac.c static void dwc_free_chan_resources(struct dma_chan *chan) · line 1209
Quoted 2 lines
drivers/dma/dw_dmac.c +2
-0+ dws->cfg_hi =0xffffffff ; + dws->cfg_lo =0xffffffff ;s/0xffffffff/-1 ?
It's an 'unsigned int'. While -1 would work here, I always find it a little odd to rely on that feature of the C language.
However, relying on an 'int' being 32-bits is also rather odd, and probably much more dubious too. If you want to set all bits in an int, the portable way to do that is ~0.
Re: [PATCH 2/4] dmaengine: dw_dmac: move to generic DMA binding
Quoted 9 lines · Russell King - ARM Linux
Quoted 8 lines · Arnd Bergmann
Quoted 7 lines · Viresh Kumar
Quoted 5 lines · Arnd Bergmann
drivers/dma/dw_dmac.c +3
-0+static bool dw_dma_generic_filter (struct dma_chan *chan,void *param) { + dws->cfg_hi =0xffffffff ; + dws->cfg_lo =0xffffffff ;
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
s/0xffffffff/-1 ?
It's an 'unsigned int'. While -1 would work here, I always find it a little odd to rely on that feature of the C language.
However, relying on an 'int' being 32-bits is also rather odd, and probably much more dubious too. If you want to set all bits in an int, the portable way to do that is ~0.
Right, I can do that, too. All I really need here though is to make sure I use the same value in this place and when comparing it in dwc_initialize, and it needs to be something that cannot be a valid register setting.
Thanks,
Arnd
Re: [PATCH 2/4] dmaengine: dw_dmac: move to generic DMA binding
In reply to Arnd BergmannQuoted 19 lines · Arnd Bergmann
The original device tree binding for this driver, from Viresh Kumar unfortunately conflicted with the generic DMA binding, and did not allow to completely seperate slave device configuration from the controller.
This is an attempt to replace it with an implementation of the generic binding, but it is currently completely untested, because I do not have any hardware with this particular controller.
The patch applies on top of linux-next, which contains both the base support for the generic DMA binding, as well as the earlier attempt from Viresh. Both of these are currently not merged upstream however.
There are a couple of TODO items that are left remaining and are open for ideas from other people.
drivers/dma/dw_dmac.c static void dwc_initialize(struct dw_dma_chan *dwc) · line 177
Quoted 10 lines
drivers/dma/dw_dmac.c +6
-1@@ -168,7 +169,13 @@ static void dwc_initialize(struct dw_dma_chan *dwc)if (dwc->initialized == true)return ; -if (dws) { +if (dws && dws->cfg_hi ==0xffffffff && dws->cfg_lo ==0xffffffff ) { +/* autoconfigure based on request line from DT */ +if (dwc->dma_sconfig.direction ==DMA_MEM_TO_DEV ) + cfghi =DWC_CFGH_DST_PER (dwc->req); +else if (dwc->dma_sconfig.direction ==DMA_DEV_TO_MEM ) + cfghi =DWC_CFGH_SRC_PER (dwc->req);
Please, use dwc->direction instead of field in the slave_config. If I remember correctly it's marked like obsoleted/deprecated.
drivers/dma/dw_dmac.c static void dwc_free_chan_resources(struct dma_chan *chan) · line 1191
Quoted 8 lines
drivers/dma/dw_dmac.c +3
-1@@ -1179,49 +1186,61 @@ static void dwc_free_chan_resources(struct dma_chan *chan)dev_vdbg (chan2dev (chan),"%s: done\n" , __func__); } -bool dw_dma_generic_filter (struct dma_chan *chan,void *param) +struct dw_dma_filter_args { +struct dw_dma *dw; +u32 req;
Why this is u32 and not unsigned int?
drivers/dma/dw_dmac.c static void dwc_free_chan_resources(struct dma_chan *chan) · line 1193
Quoted 2 lines
drivers/dma/dw_dmac.c +2
-0+u32 src; +u32 dst;
And this could be also just unsigned int.
drivers/dma/dw_dmac.c static void dwc_free_chan_resources(struct dma_chan *chan) · line 1209
Quoted 5 lines
drivers/dma/dw_dmac.c +3
-0+static bool dw_dma_generic_filter (struct dma_chan *chan,void *param) { + dws->cfg_hi =0xffffffff ; + dws->cfg_lo =0xffffffff ;
Agree with Russell about ~0.
Quoted 5 lines
drivers/dma/dw_dmac.c +5
-0+static struct dma_chan *dw_dma_xlate (struct of_phandle_args *dma_spec, +struct of_dma *ofdma) +{ +struct dw_dma *dw = ofdma->of_dma_data; +struct dw_dma_filter_args fargs = {
drivers/dma/dw_dmac.c static void dwc_free_chan_resources(struct dma_chan *chan) · line 1233
Quoted 10 lines
drivers/dma/dw_dmac.c +10
-0+ .dw = dw, + }; +dma_cap_mask_t cap; + +if (dma_spec->args_count !=3 ) +return NULL ; + + fargs.req =be32_to_cpup (dma_spec->args+0 ); + fargs.src =be32_to_cpup (dma_spec->args+1 ); + fargs.dst =be32_to_cpup (dma_spec->args+2 );
You could cast them to usual C types like unsigned int. I see u32 in rare cases in the driver like for reading/writting from/to hw and when API contains it. Here I doubt we have to leave them as u32.
drivers/dma/dw_dmac.c static void dwc_free_chan_resources(struct dma_chan *chan) · line 1236
Quoted 3 lines
drivers/dma/dw_dmac.c +3
-0+ +if (WARN_ON (fargs.req >=16 || fargs.src >=2 || fargs.dst >=2 )) +return NULL ;
16 here is a magic number for me. I would like to see something like #define DW_MAX_REQUEST_LINES 16 in the dw_dmac_regs.h.
Besides of that, what 2 does come from?
drivers/dma/dw_dmac.c static int dw_probe(struct platform_device *pdev) · line 1756
Quoted 7 lines
drivers/dma/dw_dmac.c +3
-0@@ -1765,6 +1751,10 @@ static int dw_probe(struct platform_device *pdev)dma_async_device_register (&dw->dma); + err =of_dma_controller_register (pdev->dev.of_node, dw_dma_xlate, dw); +if (err) +dev_err (&pdev->dev,"could not register of_dma_controller\n" );
It's not an error, dev_dbg. Consider case when !CONFIG_OF.
drivers/dma/dw_dmac_regs.h struct dw_dma_chan { · line 217
Quoted 8 lines
drivers/dma/dw_dmac_regs.h +2
-0@@ -213,6 +213,10 @@ struct dw_dma_chan {/* configuration passed via DMA_SLAVE_CONFIG */ struct dma_slave_config dma_sconfig; +/* slave configuration from DT */ +unsigned int req;
Could you use here full name like "request_line"? And I think the better place for it in subsection "hardware configuration" (consider non-DT cases of use).
drivers/dma/dw_dmac_regs.h struct dw_dma_chan { · line 222
Quoted 3 lines
drivers/dma/dw_dmac_regs.h +0
-0/* backlink to dw_dma */ struct dw_dma *dw; };
We should not have this in linux-next. Are you sure you rebased it on top of recent one?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH 2/4] dmaengine: dw_dmac: move to generic DMA binding
Quoted 6 lines · Andy Shevchenko
Quoted 4 lines · Arnd Bergmann
drivers/dma/dw_dmac.c +0
-0@@ -168,7 +169,13 @@ static void dwc_initialize(struct dw_dma_chan *dwc)if (dwc->initialized == true)return ;
Quoted 10 lines
drivers/dma/dw_dmac.c static void dwc_initialize(struct dw_dma_chan *dwc) · line 177
Quoted 7 lines
drivers/dma/dw_dmac.c +6
-1-if (dws) { +if (dws && dws->cfg_hi ==0xffffffff && dws->cfg_lo ==0xffffffff ) { +/* autoconfigure based on request line from DT */ +if (dwc->dma_sconfig.direction ==DMA_MEM_TO_DEV ) + cfghi =DWC_CFGH_DST_PER (dwc->req); +else if (dwc->dma_sconfig.direction ==DMA_DEV_TO_MEM ) + cfghi =DWC_CFGH_SRC_PER (dwc->req);Please, use
dwc->directioninstead of field in theslave_config. If I remember correctly it's marked like obsoleted/deprecated.
Ok, that's easy to change. I was copying from the code you added a few lines below, but was using an older version than the one where you had made the change to use dwc->direction.
Quoted 11 lines
drivers/dma/dw_dmac.c static void dwc_free_chan_resources(struct dma_chan *chan) · line 1191
Quoted 8 lines
drivers/dma/dw_dmac.c +3
-1@@ -1179,49 +1186,61 @@ static void dwc_free_chan_resources(struct dma_chan *chan)dev_vdbg (chan2dev (chan),"%s: done\n" , __func__); } -bool dw_dma_generic_filter (struct dma_chan *chan,void *param) +struct dw_dma_filter_args { +struct dw_dma *dw; +u32 req;Why this is u32 and not unsigned int?
Quoted 4 lines
drivers/dma/dw_dmac.c static void dwc_free_chan_resources(struct dma_chan *chan) · line 1193
Quoted 2 lines
drivers/dma/dw_dmac.c +2
-0+u32 src; +u32 dst;And this could be also just unsigned int.
I was using u32 since I copied the values from a 32 bit DT property value. I'll change it to unsigned int.
Quoted 7 lines
drivers/dma/dw_dmac.c static void dwc_free_chan_resources(struct dma_chan *chan) · line 1209
Quoted 5 lines
drivers/dma/dw_dmac.c +3
-0+static bool dw_dma_generic_filter (struct dma_chan *chan,void *param) { + dws->cfg_hi =0xffffffff ; + dws->cfg_lo =0xffffffff ;Agree with Russell about ~0.
ok.
Quoted 11 lines
Quoted 11 lines
drivers/dma/dw_dmac.c +11
-0+static struct dma_chan *dw_dma_xlate (struct of_phandle_args *dma_spec, +struct of_dma *ofdma) +{ +struct dw_dma *dw = ofdma->of_dma_data; +struct dw_dma_filter_args fargs = { + .dw = dw, + }; +dma_cap_mask_t cap; + +if (dma_spec->args_count !=3 ) +return NULL ;
Quoted 8 lines
drivers/dma/dw_dmac.c static void dwc_free_chan_resources(struct dma_chan *chan) · line 1233
Quoted 4 lines
drivers/dma/dw_dmac.c +4
-0+ + fargs.req =be32_to_cpup (dma_spec->args+0 ); + fargs.src =be32_to_cpup (dma_spec->args+1 ); + fargs.dst =be32_to_cpup (dma_spec->args+2 );You could cast them to usual C types like unsigned int. I see u32 in rare cases in the driver like for reading/writting from/to hw and when API contains it. Here I doubt we have to leave them as u32.
Right.
Quoted 5 lines
drivers/dma/dw_dmac.c static void dwc_free_chan_resources(struct dma_chan *chan) · line 1236
Quoted 2 lines
drivers/dma/dw_dmac.c +2
-0+if (WARN_ON (fargs.req >=16 || fargs.src >=2 || fargs.dst >=2 )) +return NULL ;16 here is a magic number for me. I would like to see something like #define
DW_MAX_REQUEST_LINES16 in thedw_dmac_regs.h.
Ok.
Quoted 1 line
Besides of that, what 2 does come from?
I thought that Viresh had commented that there could only be two masters. It's probably best to compare against dw->nr_masters here.
Quoted 9 lines
drivers/dma/dw_dmac.c static int dw_probe(struct platform_device *pdev) · line 1756
Quoted 7 lines
drivers/dma/dw_dmac.c +3
-0@@ -1765,6 +1751,10 @@ static int dw_probe(struct platform_device *pdev)dma_async_device_register (&dw->dma); + err =of_dma_controller_register (pdev->dev.of_node, dw_dma_xlate, dw); +if (err) +dev_err (&pdev->dev,"could not register of_dma_controller\n" );It's not an error,
dev_dbg. Consider case when !CONFIG_OF.
Ah right. I expected of_dma_controller_register to return 0 in that case, but it returns -ENODEV. How about I change this to this?
if (pdev->dev.of_node) err = of_dma_controller_register(pdev->dev.of_node, dw_dma_xlate, dw); if (err && err != -ENODEV) dev_err(&pdev->dev, "could not register of_dma_controller\n");
That would warn only when we have a dw_dmac device that was registered from device tree but does not follow the binding or gets an -ENOMEM.
Quoted 6 lines
Quoted 6 lines
drivers/dma/dw_dmac_regs.h +0
-0@@ -213,6 +213,10 @@ struct dw_dma_chan {/* configuration passed via DMA_SLAVE_CONFIG */ struct dma_slave_config dma_sconfig;
Quoted 6 lines
drivers/dma/dw_dmac_regs.h struct dw_dma_chan { · line 217
Quoted 2 lines
drivers/dma/dw_dmac_regs.h +2
-0+/* slave configuration from DT */ +unsigned int req;Could you use here full name like "
request_line"? And I think the better place for it in subsection "hardware configuration" (consider non-DT cases of use).
Ok
Quoted 7 lines
drivers/dma/dw_dmac_regs.h struct dw_dma_chan { · line 222
Quoted 4 lines
drivers/dma/dw_dmac_regs.h +0
-0/* backlink to dw_dma */ struct dw_dma *dw; };We should not have this in linux-next. Are you sure you rebased it on top of recent one?
I was basing on the earliest commit that had Viresh's changes in it. I'll rebase on top of Vinod's branch now.
Thanks for your review!
Arnd
Re: [PATCH 2/4] dmaengine: dw_dmac: move to generic DMA binding
Quoted 9 lines · Arnd Bergmann
Quoted 7 lines · Andy Shevchenko
drivers/dma/dw_dmac.c static void dwc_free_chan_resources(struct dma_chan *chan) · line 1236
Quoted 2 lines · Arnd Bergmann
drivers/dma/dw_dmac.c +2
-0+if (WARN_ON (fargs.req >=16 || fargs.src >=2 || fargs.dst >=2 )) +return NULL ;16 here is a magic number for me. I would like to see something like #define
DW_MAX_REQUEST_LINES16 in thedw_dmac_regs.h.
Quoted 6 lines
Ok.
Quoted 1 line
Besides of that, what 2 does come from?
I thought that Viresh had commented that there could only be two masters. It's probably best to compare against
dw->nr_mastershere.
Right.
Quoted 13 lines
Quoted 9 lines
drivers/dma/dw_dmac.c static int dw_probe(struct platform_device *pdev) · line 1756
Quoted 7 lines
drivers/dma/dw_dmac.c +3
-0@@ -1765,6 +1751,10 @@ static int dw_probe(struct platform_device *pdev)dma_async_device_register (&dw->dma); + err =of_dma_controller_register (pdev->dev.of_node, dw_dma_xlate, dw); +if (err) +dev_err (&pdev->dev,"could not register of_dma_controller\n" );It's not an error,
dev_dbg. Consider case when !CONFIG_OF.Ah right. I expected
of_dma_controller_registerto return 0 in that case, but it returns-ENODEV. How about I change this to this?
Quoted 7 lines
if (pdev->dev.of_node) err = of_dma_controller_register(pdev->dev.of_node, dw_dma_xlate, dw); if (err && err != -ENODEV) dev_err(&pdev->dev, "could not register of_dma_controller\n");That would warn only when we have a
dw_dmacdevice that was registered from device tree but does not follow the binding or gets an-ENOMEM.
I'm okay with it.
Quoted 1 line
Thanks for your review!
Thanks for the patch!
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH v3 2/4 dmaengine: dw_dmac: move to generic DMA binding
The original device tree binding for this driver, from Viresh Kumar unfortunately conflicted with the generic DMA binding, and did not allow to completely seperate slave device configuration from the controller.
This is an attempt to replace it with an implementation of the generic binding, but it is currently completely untested, because I do not have any hardware with this particular controller.
The patch applies on top of the slave-dma tree, which contains both the base support for the generic DMA binding, as well as the earlier attempt from Viresh. Both of these are currently not merged upstream however.
This version incorporates feedback from Viresh Kumar, Andy Shevchenko and Russell King.
Acked: Viresh Kumar <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Vinod Koul <[email protected]>
Cc: devicetree-discuss at lists.ozlabs.org
Cc: linux-arm-kernel at lists.infradead.org
--- Documentation/devicetree/bindings/dma/snps-dma.txt | 70 +++++----- drivers/dma/dw_dmac.c | 142 ++++++++++----------- drivers/dma/dw_dmac_regs.h | 11 +- include/linux/dw_dmac.h | 5 - 4 files changed, 112 insertions(+), 116 deletions(-)
Documentation/devicetree/bindings/dma/snps-dma.txt +36 -34
@@ -3,59 +3,61 @@ Required properties: - compatible: "snps,dma-spear1340" - reg: Address range of the DMAC registers -- interrupt-parent: Should be the phandle for the interrupt controller - that services interrupts for this device - interrupt: Should contain the DMAC interrupt number -- nr_channels: Number of channels supported by hardware -- is_private: The device channels should be marked as private and not for by the - general purpose DMA channel allocator. False if not passed. +- dma-channels: Number of channels supported by hardware +- dma-requests: Number of DMA request lines supported, up to 16 +- dma-masters: Number of AHB masters supported by the controller +- #dma-cells: must be <3> - chan_allocation_order: order of allocation of channel, 0 (default): ascending, 1: descending - chan_priority: priority of channels. 0 (default): increase from chan 0->n, 1: increase from chan n->0 - block_size: Maximum block size supported by the controller -- nr_masters: Number of AHB masters supported by the controller - data_width: Maximum data width supported by hardware per AHB master (0 - 8bits, 1 - 16bits, ..., 5 - 256bits) -- slave_info: - - bus_id: name of this device channel, not just a device name since - devices may have more than one channel e.g. "foo_tx". For using the - dw_generic_filter(), slave drivers must pass exactly this string as - param to filter function. - - cfg_hi: Platform-specific initializer for the CFG_HI register - - cfg_lo: Platform-specific initializer for the CFG_LO register - - src_master: src master for transfers on allocated channel. - - dst_master: dest master for transfers on allocated channel. + + +Optional properties: +- interrupt-parent: Should be the phandle for the interrupt controller + that services interrupts for this device +- is_private: The device channels should be marked as private and not for by the + general purpose DMA channel allocator. False if not passed. Example: - dma at fc000000 { + dmahost: dma at fc000000 { compatible = "snps,dma-spear1340"; reg = <0xfc000000 0x1000>; interrupt-parent = <&vic1>; interrupts = <12>; - nr_channels = <8>; + dma-channels = <8>; + dma-requests = <16>; + dma-masters = <2>; + #dma-cells = <3>; chan_allocation_order = <1>; chan_priority = <1>; block_size = <0xfff>; - nr_masters = <2>; data_width = <3 3 0 0>; + }; - slave_info { - uart0-tx { - bus_id = "uart0-tx"; - cfg_hi = <0x4000>; /* 0x8 << 11 */ - cfg_lo = <0>; - src_master = <0>; - dst_master = <1>; - }; - spi0-tx { - bus_id = "spi0-tx"; - cfg_hi = <0x2000>; /* 0x4 << 11 */ - cfg_lo = <0>; - src_master = <0>; - dst_master = <0>; - }; - }; +DMA clients connected to the Designware DMA controller must use the format +described in the dma.txt file, using a four-cell specifier for each channel. +The four cells in order are: + +1. A phandle pointing to the DMA controller +2. The DMA request line number +3. Source master for transfers on allocated channel +4. Destination master for transfers on allocated channel + +Example: + + serial at e0000000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0xe0000000 0x1000>; + interrupts = <0 35 0x4>; + status = "disabled"; + dmas = <&dmahost 12 0 1>, + <&dmahost 13 0 1 0>; + dma-names = "rx", "rx"; };
drivers/dma/dw_dmac.c +69 -73
210 lines not on this page · raw message
drivers/dma/dw_dmac_regs.h +7 -4
@@ -13,6 +13,7 @@#include <linux/dw_dmac.h> #define DW_DMA_MAX_NR_CHANNELS 8 +#define DW_DMA_MAX_NR_REQUESTS 16/* flow controller */ enum dw_dma_fc {
@@ -211,9 +212,15 @@ struct dw_dma_chan {/* hardware configuration */ unsigned int block_size;bool nollp; +unsigned int request_line; +struct dw_dma_slave slave; +/* configuration passed via DMA_SLAVE_CONFIG */ struct dma_slave_config dma_sconfig; + +/* backlink to dw_dma */ +struct dw_dma *dw; }; static inline struct dw_dma_chan_regs __iomem *
@@ -239,10 +246,6 @@ struct dw_dma {struct tasklet_struct tasklet;struct clk *clk; -/* slave information */ -struct dw_dma_slave *sd; -unsigned int sd_count; -u8 all_chan_mask;/* hardware configuration */
include/linux/dw_dmac.h +0 -5
@@ -27,7 +27,6 @@*/ struct dw_dma_slave {struct device *dma_dev; -const char *bus_id;u32 cfg_hi;u32 cfg_lo;u8 src_master;
@@ -60,9 +59,6 @@ struct dw_dma_platform_data {unsigned short block_size;unsigned char nr_masters;unsigned char data_width[4 ]; - -struct dw_dma_slave *sd; -unsigned int sd_count; };/* bursts size */
@@ -114,6 +110,5 @@ void dw_dma_cyclic_stop(struct dma_chan *chan);dma_addr_t dw_dma_get_src_addr (struct dma_chan *chan);dma_addr_t dw_dma_get_dst_addr (struct dma_chan *chan); -bool dw_dma_generic_filter (struct dma_chan *chan,void *param);#endif /* DW_DMAC_H */
Signature · 1 line
1.8.1.2
Re: [PATCHv3 2/4] dmaengine: dw_dmac: move to generic DMA binding
Quoted 8 lines · Arnd Bergmann
The original device tree binding for this driver, from Viresh Kumar unfortunately conflicted with the generic DMA binding, and did not allow to completely seperate slave device configuration from the controller.
This is an attempt to replace it with an implementation of the generic binding, but it is currently completely untested, because I do not have any hardware with this particular controller.
Quoted 6 lines
The patch applies on top of the slave-dma tree, which contains both the base support for the generic DMA binding, as well as the earlier attempt from Viresh. Both of these are currently not merged upstream however.
This version incorporates feedback from Viresh Kumar, Andy Shevchenko and Russell King.
Sorry, few comments below.
After addressing them take my Acked-by: Andy Shevchenko <[email protected]>
drivers/dma/dw_dmac.c static int dw_probe(struct platform_device *pdev) · line 1832
Quoted 13 lines
drivers/dma/dw_dmac.c +5
-0@@ -1836,6 +1825,12 @@ static int dw_probe(struct platform_device *pdev)dma_async_device_register (&dw->dma); +if (pdev->dev.of_node) + err =of_dma_controller_register (pdev->dev.of_node, + dw_dma_xlate, dw); +if (err && err != -ENODEV ) +dev_err (&pdev->dev,"could not register of_dma_controller\n" );
I believe we may make it as
if (...of_node) {
err = ...register();
if (err...)
dev_err();
}
drivers/dma/dw_dmac_regs.h struct dw_dma_chan { · line 217
Quoted 10 lines
drivers/dma/dw_dmac_regs.h +3
-0@@ -211,9 +212,15 @@ struct dw_dma_chan {/* hardware configuration */ unsigned int block_size;bool nollp; +unsigned int request_line; +struct dw_dma_slave slave; +
Do we really need an extra empty line here?
drivers/dma/dw_dmac_regs.h struct dw_dma_chan { · line 223
Quoted 6 lines
drivers/dma/dw_dmac_regs.h +3
-0/* configuration passed via DMA_SLAVE_CONFIG */ struct dma_slave_config dma_sconfig; + +/* backlink to dw_dma */ +struct dw_dma *dw;
Seems it's not needed and came from rebase?
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH v4 2/4 dmaengine: dw_dmac: move to generic DMA binding
The original device tree binding for this driver, from Viresh Kumar unfortunately conflicted with the generic DMA binding, and did not allow to completely seperate slave device configuration from the controller.
This is an attempt to replace it with an implementation of the generic binding, but it is currently completely untested, because I do not have any hardware with this particular controller.
The patch applies on top of the slave-dma tree, which contains both the base support for the generic DMA binding, as well as the earlier attempt from Viresh. Both of these are currently not merged upstream however.
This version incorporates feedback from Viresh Kumar, Andy Shevchenko and Russell King.
--- Documentation/devicetree/bindings/dma/snps-dma.txt | 70 +++++----- drivers/dma/dw_dmac.c | 145 ++++++++++----------- drivers/dma/dw_dmac_regs.h | 7 +- include/linux/dw_dmac.h | 5 - 4 files changed, 111 insertions(+), 116 deletions(-)
Documentation/devicetree/bindings/dma/snps-dma.txt +36 -34
@@ -3,59 +3,61 @@ Required properties: - compatible: "snps,dma-spear1340" - reg: Address range of the DMAC registers -- interrupt-parent: Should be the phandle for the interrupt controller - that services interrupts for this device - interrupt: Should contain the DMAC interrupt number -- nr_channels: Number of channels supported by hardware -- is_private: The device channels should be marked as private and not for by the - general purpose DMA channel allocator. False if not passed. +- dma-channels: Number of channels supported by hardware +- dma-requests: Number of DMA request lines supported, up to 16 +- dma-masters: Number of AHB masters supported by the controller +- #dma-cells: must be <3> - chan_allocation_order: order of allocation of channel, 0 (default): ascending, 1: descending - chan_priority: priority of channels. 0 (default): increase from chan 0->n, 1: increase from chan n->0 - block_size: Maximum block size supported by the controller -- nr_masters: Number of AHB masters supported by the controller - data_width: Maximum data width supported by hardware per AHB master (0 - 8bits, 1 - 16bits, ..., 5 - 256bits) -- slave_info: - - bus_id: name of this device channel, not just a device name since - devices may have more than one channel e.g. "foo_tx". For using the - dw_generic_filter(), slave drivers must pass exactly this string as - param to filter function. - - cfg_hi: Platform-specific initializer for the CFG_HI register - - cfg_lo: Platform-specific initializer for the CFG_LO register - - src_master: src master for transfers on allocated channel. - - dst_master: dest master for transfers on allocated channel. + + +Optional properties: +- interrupt-parent: Should be the phandle for the interrupt controller + that services interrupts for this device +- is_private: The device channels should be marked as private and not for by the + general purpose DMA channel allocator. False if not passed. Example: - dma at fc000000 { + dmahost: dma at fc000000 { compatible = "snps,dma-spear1340"; reg = <0xfc000000 0x1000>; interrupt-parent = <&vic1>; interrupts = <12>; - nr_channels = <8>; + dma-channels = <8>; + dma-requests = <16>; + dma-masters = <2>; + #dma-cells = <3>; chan_allocation_order = <1>; chan_priority = <1>; block_size = <0xfff>; - nr_masters = <2>; data_width = <3 3 0 0>; + }; - slave_info { - uart0-tx { - bus_id = "uart0-tx"; - cfg_hi = <0x4000>; /* 0x8 << 11 */ - cfg_lo = <0>; - src_master = <0>; - dst_master = <1>; - }; - spi0-tx { - bus_id = "spi0-tx"; - cfg_hi = <0x2000>; /* 0x4 << 11 */ - cfg_lo = <0>; - src_master = <0>; - dst_master = <0>; - }; - }; +DMA clients connected to the Designware DMA controller must use the format +described in the dma.txt file, using a four-cell specifier for each channel. +The four cells in order are: + +1. A phandle pointing to the DMA controller +2. The DMA request line number +3. Source master for transfers on allocated channel +4. Destination master for transfers on allocated channel + +Example: + + serial at e0000000 { + compatible = "arm,pl011", "arm,primecell"; + reg = <0xe0000000 0x1000>; + interrupts = <0 35 0x4>; + status = "disabled"; + dmas = <&dmahost 12 0 1>, + <&dmahost 13 0 1 0>; + dma-names = "rx", "rx"; };
drivers/dma/dw_dmac.c +72 -73
213 lines not on this page · raw message
drivers/dma/dw_dmac_regs.h +3 -4
@@ -13,6 +13,7 @@#include <linux/dw_dmac.h> #define DW_DMA_MAX_NR_CHANNELS 8 +#define DW_DMA_MAX_NR_REQUESTS 16/* flow controller */ enum dw_dma_fc {
@@ -211,6 +212,8 @@ struct dw_dma_chan {/* hardware configuration */ unsigned int block_size;bool nollp; +unsigned int request_line; +struct dw_dma_slave slave;/* configuration passed via DMA_SLAVE_CONFIG */ struct dma_slave_config dma_sconfig;
@@ -239,10 +242,6 @@ struct dw_dma {struct tasklet_struct tasklet;struct clk *clk; -/* slave information */ -struct dw_dma_slave *sd; -unsigned int sd_count; -u8 all_chan_mask;/* hardware configuration */
include/linux/dw_dmac.h +0 -5
@@ -27,7 +27,6 @@*/ struct dw_dma_slave {struct device *dma_dev; -const char *bus_id;u32 cfg_hi;u32 cfg_lo;u8 src_master;
@@ -60,9 +59,6 @@ struct dw_dma_platform_data {unsigned short block_size;unsigned char nr_masters;unsigned char data_width[4 ]; - -struct dw_dma_slave *sd; -unsigned int sd_count; };/* bursts size */
@@ -114,6 +110,5 @@ void dw_dma_cyclic_stop(struct dma_chan *chan);dma_addr_t dw_dma_get_src_addr (struct dma_chan *chan);dma_addr_t dw_dma_get_dst_addr (struct dma_chan *chan); -bool dw_dma_generic_filter (struct dma_chan *chan,void *param);#endif /* DW_DMAC_H */
Signature · 1 line
1.8.1.2
Re: [PATCHv3 2/4] dmaengine: dw_dmac: move to generic DMA binding
In reply to Andy ShevchenkoQuoted 14 lines · Andy Shevchenko
drivers/dma/dw_dmac.c static int dw_probe(struct platform_device *pdev) · line 1832
Quoted 9 lines
drivers/dma/dw_dmac.c +5
-0@@ -1836,6 +1825,12 @@ static int dw_probe(struct platform_device *pdev)dma_async_device_register (&dw->dma); +if (pdev->dev.of_node) + err =of_dma_controller_register (pdev->dev.of_node, + dw_dma_xlate, dw); +if (err && err != -ENODEV ) +dev_err (&pdev->dev,"could not register of_dma_controller\n" );I believe we may make it as
if (...of_node) {
err = ...register();
if (err...)
Quoted 2 lines
dev_err();}
I thing the two are equivalent because we only get to the first if() when err is 0. However, I agree that your version is a bit clearer, so I'll change it.
Quoted 12 lines
drivers/dma/dw_dmac_regs.h struct dw_dma_chan { · line 217
Quoted 10 lines
drivers/dma/dw_dmac_regs.h +3
-0@@ -211,9 +212,15 @@ struct dw_dma_chan {/* hardware configuration */ unsigned int block_size;bool nollp; +unsigned int request_line; +struct dw_dma_slave slave; +Do we really need an extra empty line here?
No, that was an accident.
Quoted 7 lines
drivers/dma/dw_dmac_regs.h struct dw_dma_chan { · line 223
Quoted 5 lines
drivers/dma/dw_dmac_regs.h +3
-0/* configuration passed via DMA_SLAVE_CONFIG */ struct dma_slave_config dma_sconfig; + +/* backlink to dw_dma */ +struct dw_dma *dw;Seems it's not needed and came from rebase?
Probably. It certainly was not intentional.
Arnd
PATCH 1/1 dmaengine: dw_dmac: simplify master selection
In reply to Andy ShevchenkoThe patch to add the common DMA binding added a dummy dw_dma_slave structure into the dw_dma_chan structure in order to configure the masters correctly. It turns out that this can be simplified if we pick the DMA masters in the dwc_alloc_chan_resources function instead and save them in the dw_dma_chan structure directly.
This could be simplified further once all users that today use dw_dma_slave for configuration get converted to device tree based setup instead.
This is just a proof of concept patch and should not get merged in 3.9, but I hope that Andy and Viresh find it useful and submit it for 3.10 after testing and refining it.
--- drivers/dma/dw_dmac.c | 96 ++++++++++++++++------------------------------ drivers/dma/dw_dmac_regs.h | 4 +- 2 files changed, 36 insertions(+), 64 deletions(-)
drivers/dma/dw_dmac.c +34 -62
@@ -37,40 +37,10 @@* The driver has currently been tested only with the Atmel AT32AP7000, * which does not support descriptor writeback. */ - -static inline unsigned int dwc_get_dms (struct dw_dma_slave *slave) -{ -return slave ? slave->dst_master :0 ; -} - -static inline unsigned int dwc_get_sms (struct dw_dma_slave *slave) -{ -return slave ? slave->src_master :1 ; -} - -#define SRC_MASTER 0 -#define DST_MASTER 1 - -static inline unsigned int dwc_get_master (struct dma_chan *chan,int master) -{ -struct dw_dma *dw =to_dw_dma (chan->device); -struct dw_dma_slave *dws = chan->private; -unsigned int m; - -if (master ==SRC_MASTER ) - m =dwc_get_sms (dws); -else - m =dwc_get_dms (dws); - - return min_t(unsigned int, dw->nr_masters - 1, m); -} -#define DWC_DEFAULT_CTLLO (_chan) ({ \ struct dw_dma_chan *_dwc = to_dw_dma_chan(_chan); \ struct dma_slave_config *_sconfig = &_dwc->dma_sconfig; \ bool _is_slave = is_slave_direction(_dwc->direction); \ - int _dms = dwc_get_master(_chan, DST_MASTER); \ - int _sms = dwc_get_master(_chan, SRC_MASTER); \ u8 _smsize = _is_slave ? _sconfig->src_maxburst : \ DW_DMA_MSIZE_16; \ u8 _dmsize = _is_slave ? _sconfig->dst_maxburst : \
@@ -80,8 +50,8 @@ static inline unsigned int dwc_get_master(struct dma_chan *chan, int master) | DWC_CTLL_SRC_MSIZE(_smsize) \ |DWC_CTLL_LLP_D_EN \ |DWC_CTLL_LLP_S_EN \ - |DWC_CTLL_DMS (_dms) \ - | DWC_CTLL_SMS(_sms)); \ + |DWC_CTLL_DMS (_dwc->dst_master) \ + | DWC_CTLL_SMS(_dwc->src_master)); \ })/*
@@ -91,13 +61,6 @@ static inline unsigned int dwc_get_master(struct dma_chan *chan, int master)*/ #define NR_DESCS_PER_CHANNEL 64 -static inline unsigned int dwc_get_data_width (struct dma_chan *chan,int master) -{ -struct dw_dma *dw =to_dw_dma (chan->device); - -return dw->data_width[dwc_get_master (chan, master)]; -} -/*----------------------------------------------------------------------*/ static struct device *chan2dev (struct dma_chan *chan)
@@ -171,13 +134,7 @@ static void dwc_initialize(struct dw_dma_chan *dwc)if (dwc->initialized == true)return ; -if (dws && dws->cfg_hi == ~0 && dws->cfg_lo == ~0 ) { -/* autoconfigure based on request line from DT */ -if (dwc->direction ==DMA_MEM_TO_DEV ) - cfghi =DWC_CFGH_DST_PER (dwc->request_line); -else if (dwc->direction ==DMA_DEV_TO_MEM ) - cfghi =DWC_CFGH_SRC_PER (dwc->request_line); - }else if (dws) { +if (dws) {/* * We need controller-specific data to set up slave * transfers.
@@ -187,10 +144,12 @@ static void dwc_initialize(struct dw_dma_chan *dwc) cfghi = dws->cfg_hi; cfglo |= dws->cfg_lo & ~DWC_CFGL_CH_PRIOR_MASK ; }else { +unsigned int request_line = (dwc->request_line != ~0 ) ? + dwc->request_line : dwc->dma_sconfig.slave_id;if (dwc->direction ==DMA_MEM_TO_DEV ) - cfghi =DWC_CFGH_DST_PER (dwc->dma_sconfig.slave_id); + cfghi =DWC_CFGH_DST_PER (request_line);else if (dwc->direction ==DMA_DEV_TO_MEM ) - cfghi =DWC_CFGH_SRC_PER (dwc->dma_sconfig.slave_id); + cfghi =DWC_CFGH_SRC_PER (request_line); }channel_writel (dwc,CFG_LO , cfglo);
@@ -743,6 +702,7 @@ static struct dma_async_tx_descriptor * dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, size_t len, unsigned long flags) { + struct dw_dma *dw = to_dw_dma(chan->device);struct dw_dma_chan *dwc =to_dw_dma_chan (chan);struct dw_desc *desc;struct dw_desc *first;
@@ -766,8 +726,7 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, dwc->direction =DMA_MEM_TO_MEM ; - data_width = min_t(unsigned int, dwc_get_data_width(chan, SRC_MASTER), -dwc_get_data_width (chan,DST_MASTER )); + data_width =min (dw->data_width[dwc->src_master], dw->data_width[dwc->dst_master]); src_width = dst_width = min_t(unsigned int, data_width,dwc_fast_fls (src | dest | len));
@@ -824,6 +783,7 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, unsigned int sg_len, enum dma_transfer_direction direction, unsigned long flags, void *context) { + struct dw_dma *dw = to_dw_dma(chan->device);struct dw_dma_chan *dwc =to_dw_dma_chan (chan);struct dma_slave_config *sconfig = &dwc->dma_sconfig;struct dw_desc *prev;
@@ -858,7 +818,7 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, ctllo |= sconfig->device_fc ?DWC_CTLL_FC (DW_DMA_FC_P_M2P ) :DWC_CTLL_FC (DW_DMA_FC_D_M2P ); - data_width =dwc_get_data_width (chan,SRC_MASTER ); + data_width = dw->data_width[dwc->src_master];for_each_sg (sgl, sg, sg_len, i) {struct dw_desc *desc;
@@ -918,7 +878,7 @@ slave_sg_todev_fill_desc: ctllo |= sconfig->device_fc ?DWC_CTLL_FC (DW_DMA_FC_P_P2M ) :DWC_CTLL_FC (DW_DMA_FC_D_P2M ); - data_width =dwc_get_data_width (chan,DST_MASTER ); + data_width = dw->data_width[dwc->dst_master];for_each_sg (sgl, sg, sg_len, i) {struct dw_desc *desc;
@@ -1139,6 +1099,7 @@ static void dwc_issue_pending(struct dma_chan *chan)static int dwc_alloc_chan_resources (struct dma_chan *chan) {struct dw_dma_chan *dwc =to_dw_dma_chan (chan); +struct dw_dma_slave *dws = chan->private;struct dw_dma *dw =to_dw_dma (chan->device);struct dw_desc *desc;int i;
@@ -1153,6 +1114,17 @@ static int dwc_alloc_chan_resources(struct dma_chan *chan) }dma_cookie_init (chan); +/* masters may be set up from dws, from DT or autoconfigured here */ +if (dws) { + dwc->src_master = dws->src_master; + dwc->dst_master = dws->dst_master; + } +/* if unconfigured, default to source 1 dest 0 */ +if (dwc->src_master == ~0 ) + dwc->src_master =1 ; +if (dwc->dst_master == ~0 ) + dwc->dst_master =0 ; +/* * NOTE: some controllers may have additional features that we
@@ -1218,6 +1190,10 @@ static void dwc_free_chan_resources(struct dma_chan *chan) dwc->descs_allocated =0 ; dwc->initialized = false; +/* invalidate slave configuration */ + dwc->request_line = ~0 ; + dwc->src_master = dwc->dst_master = ~0 ; +/* Disable interrupts */ channel_clear_bit (dw,MASK .XFER, dwc->mask);channel_clear_bit (dw,MASK .ERROR, dwc->mask);
@@ -1242,23 +1218,15 @@ struct dw_dma_filter_args {static bool dw_dma_generic_filter (struct dma_chan *chan,void *param) {struct dw_dma_chan *dwc =to_dw_dma_chan (chan); -struct dw_dma *dw =to_dw_dma (chan->device);struct dw_dma_filter_args *fargs = param; -struct dw_dma_slave *dws = &dwc->slave;/* ensure the device matches our channel */ if (chan->device != &fargs->dw->dma)return false; - dws->dma_dev = dw->dma.dev; - dws->cfg_hi = ~0 ; - dws->cfg_lo = ~0 ; - dws->src_master = fargs->src; - dws->dst_master = fargs->dst; - dwc->request_line = fargs->req; - - chan->private = dws; + dwc->src_master = fargs->src; + dwc->dst_master = fargs->dst;return true; }
@@ -1767,6 +1735,10 @@ static int dw_probe(struct platform_device *pdev) dwc->direction =DMA_TRANS_NONE ; +/* invalidate slave configuration */ + dwc->request_line = ~0 ; + dwc->src_master = dwc->dst_master = ~0 ; +/* hardware configuration */ if (autocfg) {unsigned int dwc_params;
drivers/dma/dw_dmac_regs.h +2 -2
@@ -213,8 +213,8 @@ struct dw_dma_chan {unsigned int block_size;bool nollp;unsigned int request_line; -struct dw_dma_slave slave; - +unsigned char src_master; +unsigned char dst_master;/* configuration passed via DMA_SLAVE_CONFIG */ struct dma_slave_config dma_sconfig;
Signature · 1 line
1.8.1.2
PATCH 3/4 spi: pl022: use generic DMA slave configuration if possible
In reply to Arnd BergmannWith the new OF DMA binding, it is possible to completely avoid the need for platform_data for configuring a DMA channel. In cases where the platform has already been converted, calling dma_request_slave_channel should get all the necessary information from the device tree.
Like the patch that converts the dw_dma controller, this is completely untested and is looking for someone to try it out.
--- .../devicetree/bindings/spi/spi_pl022.txt | 36 ++++++++++++++++++ drivers/spi/spi-pl022.c | 43 +++++++++++++++++++++- 2 files changed, 77 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/spi/spi_pl022.txt +36 -0
@@ -16,6 +16,11 @@ Optional properties: device will be suspended immediately - pl022,rt : indicates the controller should run the message pump with realtime priority to minimise the transfer latency on the bus (boolean) +- dmas : Two or more DMA channel specifiers following the convention outlined + in bindings/dma/dma.txt +- dma-names: Names for the dma channels, if present. There must be at + least one channel named "tx" for transmit and named "rx" for + receive. SPI slave nodes must be children of the SPI master node and can
@@ -32,3 +37,34 @@ contain the following properties. - pl022,wait-state : Microwire interface: Wait state - pl022,duplex : Microwire interface: Full/Half duplex + +Example: + + spi at e0100000 { + compatible = "arm,pl022", "arm,primecell"; + reg = <0xe0100000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = <0 31 0x4>; + dmas = <&dma-controller 23 1>, + <&dma-controller 24 0>; + dma-names = "rx", "tx"; + + m25p80 at 1 { + compatible = "st,m25p80"; + reg = <1>; + spi-max-frequency = <12000000>; + spi-cpol; + spi-cpha; + pl022,hierarchy = <0>; + pl022,interface = <0>; + pl022,slave-tx-disable; + pl022,com-mode = <0x2>; + pl022,rx-level-trig = <0>; + pl022,tx-level-trig = <0>; + pl022,ctrl-len = <0x11>; + pl022,wait-state = <0>; + pl022,duplex = <0>; + }; + }; +
drivers/spi/spi-pl022.c +41 -2
61 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 4/4 serial: pl011: use generic DMA slave configuration if possible
In reply to Arnd BergmannWith the new OF DMA binding, it is possible to completely avoid the need for platform_data for configuring a DMA channel. In cases where the platform has already been converted, calling dma_request_slave_channel should get all the necessary information from the device tree.
This also adds a binding document specific to the pl011 controller, and extends the generic primecell binding to mention "dmas" and other common properties.
Like the patch that converts the dw_dma controller, this is completely untested and is looking for someone to try it out.
--- .../devicetree/bindings/arm/primecell.txt | 19 ++++++- Documentation/devicetree/bindings/serial/pl011.txt | 17 ++++++ drivers/tty/serial/amba-pl011.c | 62 +++++++++++++--------- 3 files changed, 72 insertions(+), 26 deletions(-) create mode 100644 Documentation/devicetree/bindings/serial/pl011.txt
Documentation/devicetree/bindings/arm/primecell.txt +18 -1
@@ -16,14 +16,31 @@ Optional properties: - clocks : From common clock binding. First clock is phandle to clock for apb pclk. Additional clocks are optional and specific to those peripherals. - clock-names : From common clock binding. Shall be "apb_pclk" for first clock. +- dmas : From common DMA binding. If present, refers to one or more dma channels. +- dma-names : From common DMA binding, needs to match the 'dmas' property. + Devices with exactly one receive and transmit channel shall name + these "rx" and "tx", respectively. +- pinctrl-<n> : Pinctrl states as described in bindings/pinctrl/pinctrl-bindings.txt +- pinctrl-names : Names corresponding to the numbered pinctrl states +- interrupts : one or more interrupt specifiers +- interrupt-names : names corresponding to the interrupts properties Example: serial at fff36000 { compatible = "arm,pl011", "arm,primecell"; arm,primecell-periphid = <0x00341011>; + clocks = <&pclk>; clock-names = "apb_pclk"; - + + dmas = <&dma-controller 4>, <&dma-controller 5>; + dma-names = "rx", "tx"; + + pinctrl-0 = <&uart0_default_mux>, <&uart0_default_mode>; + pinctrl-1 = <&uart0_sleep_mode>; + pinctrl-names = "default","sleep"; + + interrupts = <0 11 0x4>; };
Documentation/devicetree/bindings/serial/pl011.txt new file +17 -0
@@ -0,0 +1,17 @@ +* ARM AMBA Primecell PL011 serial UART + +Required properties: +- compatible: must be "arm,primecell", "arm,pl011" +- reg: exactly one register range with length 0x1000 +- interrupts: exactly one interrupt specifier + +Optional properties: +- pinctrl: When present, must have one state named "sleep" + and one state named "default" +- clocks: When present, must refer to exactly one clock named + "apb_pclk" +- dmas: When present, may have one or two dma channels. + The first one must be named "rx", the second one + must be named "tx". + +See also bindings/arm/primecell.txt
drivers/tty/serial/amba-pl011.c +37 -25
121 lines not on this page · raw message
Signature · 1 line
1.8.1.2
Quoted 6 lines · Arnd Bergmann
As Andy pointed out today, we don't have a good solution for the
dw_dmacDT binding in linux-next yet. I have posted my series once before and then got distracted after getting feedback from Viresh, Andy and Russell. I have now updated my earlier patch based on the feedback and rebased on your tree without any of the arm-soc patches mixed in.
Quoted 26 lines · Arnd Bergmann
Hi Vinod,
As Andy pointed out today, we don't have a good solution for the
dw_dmacDT binding in linux-next yet. I have posted my series once before and then got distracted after getting feedback from Viresh, Andy and Russell. I have now updated my earlier patch based on the feedback and rebased on your tree without any of the arm-soc patches mixed in.Unfortunately the patches have never been tested on real hardware so I don't think it's a good idea to use them in v3.9 on the spear platform. However, your dma-slave tree still contains Viresh's earlier patches, causing a few problems:
* With those patches, the spear3xx platform currently does not build. (this one would be easy to fix though)
* There is a conflict between those patches and my spear multiplatform series, which I have not yet queued up for 3.9 because of this, since that would have meant that Stephen Rothwell would have to discard either the arm-soc tree or the dma-slave tree from linux-next.
* I really don't want the broken binding to appear in 3.9.I believe the best way out at this point is this series, which first first reverts the patch
f9965aa2"ARM: SPEAr13xx: Pass DW DMAC platform data from DT" from your tree and then adds my update.
Quoted 5 lines
This will give us the right DT binding for dw-dmac but no in-tree users, which means that nothing should break if I get it slightly wrong. Please apply the first two patches from these set, and optionally the two patches that based on this convert the pl011 uart and pl022 spi controller drivers.
Arnd,
Since there is still churn, would it make sense if I just revert the SPEAr13xx patch (your first patch) and send a pull request to Linus.
Since there are no users and not much testing has been done, I think we can push these to 3.10 via arm-soc/slave-dma tree.
Gives more testing and usage will go along as well.
Since merge window is open, I would like my pull to go soonish and not churn the tree much.
--
~Vinod
Quoted 37 lines
I can then decide with Olof whether or not to take the spear multiplatform changes that no longer conflict with the dma slave tree as a "late" branch into 3.9 or wait until 3.10, but that is something you don't need to worry about then. Also the conversion of spear to use the new binding (patch 5 of my original series) can go through the arm-soc tree for 3.10 after the ST folks have tested that it works.
Arnd
Arnd Bergmann (4):
Revert "ARM: SPEAr13xx: Pass DW DMAC platform data from DT"
dmaengine:dw_dmac: move to generic DMA binding
spi: pl022: use generic DMA slave configuration if possible
serial: pl011: use generic DMA slave configuration if possible.../devicetree/bindings/arm/primecell.txt | 19 ++- Documentation/devicetree/bindings/dma/snps-dma.txt | 70 ++++++----- Documentation/devicetree/bindings/serial/pl011.txt | 17 +++ .../devicetree/bindings/spi/spi_pl022.txt | 36 ++++++ arch/arm/boot/dts/spear1340.dtsi | 19 --- arch/arm/boot/dts/spear13xx.dtsi | 38 ------ arch/arm/mach-spear13xx/include/mach/spear.h | 2 + arch/arm/mach-spear13xx/spear1310.c | 5 +- arch/arm/mach-spear13xx/spear1340.c | 33 +++-- arch/arm/mach-spear13xx/spear13xx.c | 55 ++++++++- drivers/dma/dw_dmac.c | 137 ++++++++++----------- drivers/dma/dw_dmac_regs.h | 8 +- drivers/spi/spi-pl022.c | 43 ++++++- drivers/tty/serial/amba-pl011.c | 62 ++++++---- include/linux/dw_dmac.h | 5 - 15 files changed, 333 insertions(+), 216 deletions(-) create mode 100644 Documentation/devicetree/bindings/serial/pl011.txtSignature · 1 line
1.8.1.2
Quoted 8 lines · Vinod Koul
Since there is still churn, would it make sense if I just revert the SPEAr13xx patch (your first patch) and send a pull request to Linus.
Since there are no users and not much testing has been done, I think we can push these to 3.10 via arm-soc/slave-dma tree.Gives more testing and usage will go along as well.
Since merge window is open, I would like my pull to go soonish and not churn the tree much.
Reverting the SPEAr13xx would definitely help, yes. The reason why I'd also like to see the second patch get merged is so that we can do the SPEAr changes in 3.10 without having an interdependency between the trees. I tried very hard to make the patch have a minimal impact on the non-DT code path to avoid regressions.
Maybe you can send your tree now with just the revert applied, and then send the other one separately next week along with any bug fixes that may have accumulated by then?
Arnd
Quoted 6 lines · Arnd Bergmann
Quoted 5 lines · Vinod Koul
Since there is still churn, would it make sense if I just revert the SPEAr13xx patch (your first patch) and send a pull request to Linus.
Since there are no users and not much testing has been done, I think we can push these to 3.10 via arm-soc/slave-dma tree.
Quoted 8 lines
Quoted 3 lines
Gives more testing and usage will go along as well.
Since merge window is open, I would like my pull to go soonish and not churn the tree much.Reverting the SPEAr13xx would definitely help, yes. The reason why I'd also like to see the second patch get merged is so that we can do the SPEAr changes in 3.10 without having an interdependency between the trees. I tried very hard to make the patch have a minimal impact on the non-DT code path to avoid regressions.
Ok, i have applied your revert patch. Will send the PULL to linus by friday.
Quoted 3 lines
Maybe you can send your tree now with just the revert applied, and then send the other one separately next week along with any bug fixes that may have accumulated by then?
And then makes sense to send second PULL with fixes accumulated and the second patch, so that 3.10 is easier for all. think we can compact() patch is second request as well
--
~Vinod
Quoted 11 lines · Vinod Koul
Quoted 10 lines · Arnd Bergmann
Quoted 8 lines · Vinod Koul
Since there is still churn, would it make sense if I just revert the SPEAr13xx patch (your first patch) and send a pull request to Linus.
Since there are no users and not much testing has been done, I think we can push these to 3.10 via arm-soc/slave-dma tree.Gives more testing and usage will go along as well.
Since merge window is open, I would like my pull to go soonish and not churn the tree much.
Quoted 5 lines
Quoted 4 lines
Reverting the SPEAr13xx would definitely help, yes. The reason why I'd also like to see the second patch get merged is so that we can do the SPEAr changes in 3.10 without having an interdependency between the trees. I tried very hard to make the patch have a minimal impact on the non-DT code path to avoid regressions.
Ok, i have applied your revert patch. Will send the PULL to linus by friday.
Ok, thanks.
Quoted 6 lines
Quoted 3 lines
Maybe you can send your tree now with just the revert applied, and then send the other one separately next week along with any bug fixes that may have accumulated by then?
And then makes sense to send second PULL with fixes accumulated and the second patch, so that 3.10 is easier for all. think we can
compact()patch is second request as well
Yes, sounds good.
Arnd