lkml.org 
[lkml]   [2023]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH V2] dmaengine: sprd: add dma mask interface in probe
Hi Baolin, I am sorry that didn't add and commit my changes in PATCH
V2. I have added the changes in PATCH V3, please check the new email,
thank you.

On Tue, Sep 19, 2023 at 11:23 AM Baolin Wang
<baolin.wang@linux.alibaba.com> wrote:
>
>
>
> On 9/19/2023 10:30 AM, Kaiwei Liu wrote:
> > In the probe of DMA, the default addressing range is 32 bits,
> > while the actual DMA hardware addressing range used is 36 bits.
> > So add dma_set_mask_and_coherent function to match DMA
> > addressing range.
> >
> > Signed-off-by: Kaiwei Liu <kaiwei.liu@unisoc.com>
> > ---
> > Change in V2:
> > -Change subject line.
> > -Modify error message to make it more readable.
>
> Have you modified the error message against v1? I did not see it.
>
> https://lore.kernel.org/all/20230807052014.2781-1-kaiwei.liu@unisoc.com/
>
> > ---
> > drivers/dma/sprd-dma.c | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
> > index 20c3cb1ef2f5..0e146550dfbb 100644
> > --- a/drivers/dma/sprd-dma.c
> > +++ b/drivers/dma/sprd-dma.c
> > @@ -1115,6 +1115,15 @@ static int sprd_dma_probe(struct platform_device *pdev)
> > u32 chn_count;
> > int ret, i;
> >
> > + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(36));
> > + if (ret) {
> > + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
> > + if (ret) {
> > + dev_err(&pdev->dev, "dma_set_mask_and_coherent failed\n");
> > + return ret;
> > + }
> > + }
> > +
> > /* Parse new and deprecated dma-channels properties */
> > ret = device_property_read_u32(&pdev->dev, "dma-channels", &chn_count);
> > if (ret)

\
 
 \ /
  Last update: 2023-09-19 10:53    [W:0.243 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site