From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Curtis Malainey <cujomalainey@google.com>
Cc: alsa-devel@alsa-project.org, Ross Zwisler <zwisler@google.com>,
Fletcher Woodruff <fletcherw@google.com>,
Liam Girdwood <liam.r.girdwood@intel.com>,
dmaengine@vger.kernel.org,
Pierre-louis Bossart <pierre-louis.bossart@intel.com>
Subject: Re: DW-DMA: Probe failures on broadwell
Date: Tue, 9 Jul 2019 16:14:01 +0300 [thread overview]
Message-ID: <20190709131401.GA9224@smile.fi.intel.com> (raw)
In-Reply-To: <CAOReqxhxHiJ-4UYC-j4Quuuy5YP9ywohe_JwiLpCxqCvP-7ypg@mail.gmail.com>
(I think this is okay to go on public here)
+Cc: Pierre, Liam, DMA Engine ML, ASoC ML
On Mon, Jul 08, 2019 at 01:50:07PM -0700, Curtis Malainey wrote:
> Hello Andy,
>
> I am reaching out to you as you are the main author for
> drivers/dma/dw/core.c and we are seeing a failure in there on some of
> our samus devices. On certain device we are seeing the following
> failure (debugging enabled in this log.)
>
> [ 3.587515] sst-acpi INT3438:00: DW_PARAMS: 0x00000000
AFAIK, when Synopsys DesignWare DMA IP is in use in Intel, we almost always
(yes, I know couple of exceptions), enable auto configuration block. Thus, the
*private* DMA controllers used in Broadwell are actually Intel iDMA 32-bit.
Nowadays the differences can be seen in drivers/dma/dw/idma32.c.
Note, DMA in the driver is used solely for firmware load, simplest workaround
is to disable DMA. Though, personally, for sake of test coverage, I would like
to see how it works in DMA case.
> [ 3.587519] haswell-pcm-audio haswell-pcm-audio: error: DMA device
> register failed
> [ 3.587524] haswell-pcm-audio haswell-pcm-audio: sst_dma_new failed -22
> [ 3.598010] bdw-rt5677 bdw-rt5677: ASoC: failed to init link System PCM
>
> I don't have the datasheets for this component but I am wondering if
> you could help us troubleshoot this bug it would be greatly
> appreciated if possible. I am not sure if we are seeing a hardware
> boot failure or a boot race. I was hoping you could shed some light on
> this and if it is a boot race help us recover from it. I know Intel
> relies on no defers typically but it would be nice to see if we can
> fix this. Below is where I have traced the error source to in core.c.
So, the correct fix is to provide a platform data, like it's done in
drivers/dma/dw/pci.c::idma32_pdata, in the sst-firmware.c::dw_probe(), and call
idma32_dma_probe() with idma32_dma_remove() respectively on removal stage.
(It will require latest patches to be applied, which are material for v5.x)
> dw_params = dma_readl(dw, DW_PARAMS);
> dev_dbg(chip->dev, "DW_PARAMS: 0x%08x\n", dw_params);
>
> autocfg = dw_params >> DW_PARAMS_EN & 1;
> if (!autocfg) {
> err = -EINVAL;
> goto err_pdata;
> }
> Let me know if you have any ideas on how to mitigate this, thanks.
--
With Best Regards,
Andy Shevchenko
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Curtis Malainey <cujomalainey@google.com>
Cc: Ross Zwisler <zwisler@google.com>,
Fletcher Woodruff <fletcherw@google.com>,
dmaengine@vger.kernel.org, alsa-devel@alsa-project.org,
Pierre-louis Bossart <pierre-louis.bossart@intel.com>,
Liam Girdwood <liam.r.girdwood@intel.com>
Subject: Re: DW-DMA: Probe failures on broadwell
Date: Tue, 9 Jul 2019 16:14:01 +0300 [thread overview]
Message-ID: <20190709131401.GA9224@smile.fi.intel.com> (raw)
In-Reply-To: <CAOReqxhxHiJ-4UYC-j4Quuuy5YP9ywohe_JwiLpCxqCvP-7ypg@mail.gmail.com>
(I think this is okay to go on public here)
+Cc: Pierre, Liam, DMA Engine ML, ASoC ML
On Mon, Jul 08, 2019 at 01:50:07PM -0700, Curtis Malainey wrote:
> Hello Andy,
>
> I am reaching out to you as you are the main author for
> drivers/dma/dw/core.c and we are seeing a failure in there on some of
> our samus devices. On certain device we are seeing the following
> failure (debugging enabled in this log.)
>
> [ 3.587515] sst-acpi INT3438:00: DW_PARAMS: 0x00000000
AFAIK, when Synopsys DesignWare DMA IP is in use in Intel, we almost always
(yes, I know couple of exceptions), enable auto configuration block. Thus, the
*private* DMA controllers used in Broadwell are actually Intel iDMA 32-bit.
Nowadays the differences can be seen in drivers/dma/dw/idma32.c.
Note, DMA in the driver is used solely for firmware load, simplest workaround
is to disable DMA. Though, personally, for sake of test coverage, I would like
to see how it works in DMA case.
> [ 3.587519] haswell-pcm-audio haswell-pcm-audio: error: DMA device
> register failed
> [ 3.587524] haswell-pcm-audio haswell-pcm-audio: sst_dma_new failed -22
> [ 3.598010] bdw-rt5677 bdw-rt5677: ASoC: failed to init link System PCM
>
> I don't have the datasheets for this component but I am wondering if
> you could help us troubleshoot this bug it would be greatly
> appreciated if possible. I am not sure if we are seeing a hardware
> boot failure or a boot race. I was hoping you could shed some light on
> this and if it is a boot race help us recover from it. I know Intel
> relies on no defers typically but it would be nice to see if we can
> fix this. Below is where I have traced the error source to in core.c.
So, the correct fix is to provide a platform data, like it's done in
drivers/dma/dw/pci.c::idma32_pdata, in the sst-firmware.c::dw_probe(), and call
idma32_dma_probe() with idma32_dma_remove() respectively on removal stage.
(It will require latest patches to be applied, which are material for v5.x)
> dw_params = dma_readl(dw, DW_PARAMS);
> dev_dbg(chip->dev, "DW_PARAMS: 0x%08x\n", dw_params);
>
> autocfg = dw_params >> DW_PARAMS_EN & 1;
> if (!autocfg) {
> err = -EINVAL;
> goto err_pdata;
> }
> Let me know if you have any ideas on how to mitigate this, thanks.
--
With Best Regards,
Andy Shevchenko
next parent reply other threads:[~2019-07-09 13:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAOReqxhxHiJ-4UYC-j4Quuuy5YP9ywohe_JwiLpCxqCvP-7ypg@mail.gmail.com>
2019-07-09 13:14 ` Andy Shevchenko [this message]
2019-07-09 13:14 ` DW-DMA: Probe failures on broadwell Andy Shevchenko
2019-07-09 13:29 ` Andy Shevchenko
2019-07-09 13:29 ` Andy Shevchenko
2019-07-09 13:34 ` Andy Shevchenko
2019-07-09 13:34 ` Andy Shevchenko
2019-07-09 13:38 ` Andy Shevchenko
2019-07-09 13:38 ` Andy Shevchenko
2019-07-09 19:27 ` Curtis Malainey
2019-07-09 19:27 ` Curtis Malainey
2019-07-10 16:43 ` Andy Shevchenko
2019-07-10 16:43 ` Andy Shevchenko
2019-07-10 21:24 ` Curtis Malainey
2019-07-10 21:24 ` Curtis Malainey
2019-07-11 13:12 ` Andy Shevchenko
2019-07-11 13:12 ` Andy Shevchenko
2019-07-11 18:15 ` Curtis Malainey
2019-07-11 18:15 ` Curtis Malainey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190709131401.GA9224@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=cujomalainey@google.com \
--cc=dmaengine@vger.kernel.org \
--cc=fletcherw@google.com \
--cc=liam.r.girdwood@intel.com \
--cc=pierre-louis.bossart@intel.com \
--cc=zwisler@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.