Re: [PATCH] dmaengine: dma_slave_caps: remove sg entries
On Mon, Sep 02, 2013 at 07:10:52PM +0200, Lars-Peter Clausen wrote: > On 09/02/2013 06:12 PM, Vinod Koul wrote: > > On Mon, Sep 02, 2013 at 04:52:06PM +0200, Lars-Peter Clausen wrote: > >> On 09/02/2013 02:21 PM, Vinod Koul wrote: > >>> As pointed by Russell in [1], the sg properties are already availble in > >>> struct device, > >>> so no need to duplicate here. > >>> > >>> [1]: http://marc.info/?l=linux-omap=137416733628831 > >> > >> Hm, I guess that will work as well, but shouldn't we update the drivers > >> that > >> already implementing this interface first? > > Well thats why I cced you :). I have fixed up the pl330 driver. Have you > > used > > these values in any of the ASoC drivers? > > Not in upstream yet, if the pl330 is fixed we are good. Thanks for the confirmation. I had a week old Takashi's tree, didnt find anything there, but still wanted your ack. Now on pl330 here is the update --- From: Vinod Koul Date: Mon, 2 Sep 2013 21:54:48 +0530 Subject: [PATCH] dmaengine: pl330: use dma_set_max_seg_size to set the sg limit Signed-off-by: Vinod Koul --- compile tested only drivers/dma/pl330.c | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 36ed301..a562d24 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2886,13 +2886,6 @@ static int pl330_dma_device_slave_caps(struct dma_chan *dchan, caps->cmd_pause = false; caps->cmd_terminate = true; - /* -* This is the limit for transfers with a buswidth of 1, larger -* buswidths will have larger limits. -*/ - caps->max_sg_len = 1900800; - caps->max_sg_nr = 0; - return 0; } @@ -3017,6 +3010,14 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) "unable to register DMA to the generic DT DMA helpers\n"); } } + /* +* This is the limit for transfers with a buswidth of 1, larger +* buswidths will have larger limits. +*/ + ret = dma_set_max_seg_size(>dev, 1900800); + if (ret) + dev_err(>dev, "unable to set the seg size\n"); + dev_info(>dev, "Loaded driver for PL330 DMAC-%d\n", adev->periphid); -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dmaengine: dma_slave_caps: remove sg entries
On 09/02/2013 06:12 PM, Vinod Koul wrote: > On Mon, Sep 02, 2013 at 04:52:06PM +0200, Lars-Peter Clausen wrote: >> On 09/02/2013 02:21 PM, Vinod Koul wrote: >>> As pointed by Russell in [1], the sg properties are already availble in >>> struct device, >>> so no need to duplicate here. >>> >>> [1]: http://marc.info/?l=linux-omap=137416733628831 >> >> Hm, I guess that will work as well, but shouldn't we update the drivers that >> already implementing this interface first? > Well thats why I cced you :). I have fixed up the pl330 driver. Have you used > these values in any of the ASoC drivers? Not in upstream yet, if the pl330 is fixed we are good. - Lars -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dmaengine: dma_slave_caps: remove sg entries
On Mon, Sep 02, 2013 at 04:52:06PM +0200, Lars-Peter Clausen wrote: > On 09/02/2013 02:21 PM, Vinod Koul wrote: > > As pointed by Russell in [1], the sg properties are already availble in > > struct device, > > so no need to duplicate here. > > > > [1]: http://marc.info/?l=linux-omap=137416733628831 > > Hm, I guess that will work as well, but shouldn't we update the drivers that > already implementing this interface first? Well thats why I cced you :). I have fixed up the pl330 driver. Have you used these values in any of the ASoC drivers? ~Vinod -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dmaengine: dma_slave_caps: remove sg entries
On 09/02/2013 02:21 PM, Vinod Koul wrote: > As pointed by Russell in [1], the sg properties are already availble in > struct device, > so no need to duplicate here. > > [1]: http://marc.info/?l=linux-omap=137416733628831 Hm, I guess that will work as well, but shouldn't we update the drivers that already implementing this interface first? - Lars -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] dmaengine: dma_slave_caps: remove sg entries
As pointed by Russell in [1], the sg properties are already availble in struct device, so no need to duplicate here. [1]: http://marc.info/?l=linux-omap=137416733628831 Signed-off-by: Vinod Koul --- include/linux/dmaengine.h |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 5692bc3..4310b89 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -380,11 +380,6 @@ struct dma_slave_config { * should be checked by controller as well * @cmd_pause: true, if pause and thereby resume is supported * @cmd_terminate: true, if terminate cmd is supported - * - * @max_sg_nr: maximum number of SG segments supported - * 0 for no maximum - * @max_sg_len: maximum length of a SG segment supported - * 0 for no maximum */ struct dma_slave_caps { u32 src_addr_widths; @@ -392,9 +387,6 @@ struct dma_slave_caps { u32 directions; bool cmd_pause; bool cmd_terminate; - - u32 max_sg_nr; - u32 max_sg_len; }; static inline const char *dma_chan_name(struct dma_chan *chan) -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] dmaengine: dma_slave_caps: remove sg entries
As pointed by Russell in [1], the sg properties are already availble in struct device, so no need to duplicate here. [1]: http://marc.info/?l=linux-omapm=137416733628831 Signed-off-by: Vinod Koul vinod.k...@intel.com --- include/linux/dmaengine.h |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 5692bc3..4310b89 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -380,11 +380,6 @@ struct dma_slave_config { * should be checked by controller as well * @cmd_pause: true, if pause and thereby resume is supported * @cmd_terminate: true, if terminate cmd is supported - * - * @max_sg_nr: maximum number of SG segments supported - * 0 for no maximum - * @max_sg_len: maximum length of a SG segment supported - * 0 for no maximum */ struct dma_slave_caps { u32 src_addr_widths; @@ -392,9 +387,6 @@ struct dma_slave_caps { u32 directions; bool cmd_pause; bool cmd_terminate; - - u32 max_sg_nr; - u32 max_sg_len; }; static inline const char *dma_chan_name(struct dma_chan *chan) -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dmaengine: dma_slave_caps: remove sg entries
On 09/02/2013 02:21 PM, Vinod Koul wrote: As pointed by Russell in [1], the sg properties are already availble in struct device, so no need to duplicate here. [1]: http://marc.info/?l=linux-omapm=137416733628831 Hm, I guess that will work as well, but shouldn't we update the drivers that already implementing this interface first? - Lars -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dmaengine: dma_slave_caps: remove sg entries
On Mon, Sep 02, 2013 at 04:52:06PM +0200, Lars-Peter Clausen wrote: On 09/02/2013 02:21 PM, Vinod Koul wrote: As pointed by Russell in [1], the sg properties are already availble in struct device, so no need to duplicate here. [1]: http://marc.info/?l=linux-omapm=137416733628831 Hm, I guess that will work as well, but shouldn't we update the drivers that already implementing this interface first? Well thats why I cced you :). I have fixed up the pl330 driver. Have you used these values in any of the ASoC drivers? ~Vinod -- -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dmaengine: dma_slave_caps: remove sg entries
On 09/02/2013 06:12 PM, Vinod Koul wrote: On Mon, Sep 02, 2013 at 04:52:06PM +0200, Lars-Peter Clausen wrote: On 09/02/2013 02:21 PM, Vinod Koul wrote: As pointed by Russell in [1], the sg properties are already availble in struct device, so no need to duplicate here. [1]: http://marc.info/?l=linux-omapm=137416733628831 Hm, I guess that will work as well, but shouldn't we update the drivers that already implementing this interface first? Well thats why I cced you :). I have fixed up the pl330 driver. Have you used these values in any of the ASoC drivers? Not in upstream yet, if the pl330 is fixed we are good. - Lars -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] dmaengine: dma_slave_caps: remove sg entries
On Mon, Sep 02, 2013 at 07:10:52PM +0200, Lars-Peter Clausen wrote: On 09/02/2013 06:12 PM, Vinod Koul wrote: On Mon, Sep 02, 2013 at 04:52:06PM +0200, Lars-Peter Clausen wrote: On 09/02/2013 02:21 PM, Vinod Koul wrote: As pointed by Russell in [1], the sg properties are already availble in struct device, so no need to duplicate here. [1]: http://marc.info/?l=linux-omapm=137416733628831 Hm, I guess that will work as well, but shouldn't we update the drivers that already implementing this interface first? Well thats why I cced you :). I have fixed up the pl330 driver. Have you used these values in any of the ASoC drivers? Not in upstream yet, if the pl330 is fixed we are good. Thanks for the confirmation. I had a week old Takashi's tree, didnt find anything there, but still wanted your ack. Now on pl330 here is the update --- From: Vinod Koul vinod.k...@intel.com Date: Mon, 2 Sep 2013 21:54:48 +0530 Subject: [PATCH] dmaengine: pl330: use dma_set_max_seg_size to set the sg limit Signed-off-by: Vinod Koul vinod.k...@intel.com --- compile tested only drivers/dma/pl330.c | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 36ed301..a562d24 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2886,13 +2886,6 @@ static int pl330_dma_device_slave_caps(struct dma_chan *dchan, caps-cmd_pause = false; caps-cmd_terminate = true; - /* -* This is the limit for transfers with a buswidth of 1, larger -* buswidths will have larger limits. -*/ - caps-max_sg_len = 1900800; - caps-max_sg_nr = 0; - return 0; } @@ -3017,6 +3010,14 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) unable to register DMA to the generic DT DMA helpers\n); } } + /* +* This is the limit for transfers with a buswidth of 1, larger +* buswidths will have larger limits. +*/ + ret = dma_set_max_seg_size(adev-dev, 1900800); + if (ret) + dev_err(adev-dev, unable to set the seg size\n); + dev_info(adev-dev, Loaded driver for PL330 DMAC-%d\n, adev-periphid); -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/