Add debugfs file to dump the Intel SoundWire registers
Credits: this patch is based on an earlier internal contribution by
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. The main change
is the use of scnprintf to avoid known issues with snprintf.
Signed-off-by: Pierre-Louis Bossart
Two off-by-one errors: INTSTAT0 missed BIT(31) and INTSTAT1 is only
defined on first 16 bits.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soundwire/cadence_master.c
b/drivers
Not sure why the existing code would enable interrupts without the
ability to deal with them.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index
Add a prefix for common tables and export 2 helpers to set the frame
shapes based on row/col values.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/bus.h| 7 +--
drivers/soundwire/stream.c | 14 --
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a
alternate banks.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/stream.c | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index 53f5e790fcd7..75b9ad1fb1a6 100644
--- a/drivers/soundwire/stream.c
The use of clock stop is not a requirement, the IP can e.g. be
completely power gated and not detect any wakes while in s2idle/deep
sleep.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 15 ---
drivers/soundwire/cadence_master.h | 2 +-
drivers
Assigning a device number to a Slave will result in additional events
when it reports its status in a PING frame. There is no point in
dealing with all the other devices in a loop, this can be done when a
non-device0 event happens.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/bus.c
: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 38 ++
1 file changed, 38 insertions(+)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index db7bf2912767..1394a2322553 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/soundwire/cadence_master.h
b/drivers/soundwire/cadence_master.h
index c0bf6ff00a44..d375bbfead18 100644
--- a/drivers/soundwire/cadence_master.h
+++ b
All DAI callbacks are in intel.c except for shutdown. Move and remove
export symbol
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 14 --
drivers/soundwire/cadence_master.h | 2 --
drivers/soundwire/intel.c | 17 +++--
3 files
: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/soundwire/cadence_master.c
b/drivers/soundwire/cadence_master.c
index 10ebcef2e84e..18c6ac026e85 100644
--- a/drivers/soundwire/cadence_master.c
+++ b
Not all platforms support runtime_pm for now, let's use runtime_pm
only when enabled.
Suggested-by: Srinivas Kandagatla
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/bus.c | 25 -
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/dr
arg is almost always a bug
+ group->rates = krealloc(group->rates,
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/Makefile | 2 +-
drivers/soundwire/algo_dynamic_allocation.c | 403
drivers/soundwire
From: Bard liao
Reported-by: kbuild test robot
Signed-off-by: Bard liao
Signed-off-by: Pierre-Louis Bossart
---
include/linux/soundwire/sdw.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h
index a49028e9d666..31d1e8acf25b
OS with an
Intel-specific _DSD property. The same capability will be added to
revisions of the MIPI DisCo specification.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 26 ++
include/linux/soundwire/sdw.h | 2 ++
2 files changed, 24 insertions
Remove hard-coding and use BIOS values. If they are wrong use default
48x2 frame shape.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 19 +--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/soundwire/cadence_master.c
b
Move code to helper for reuse in power management routines
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index c40ab443e723
Add debugfs file to dump the Cadence master registers
Credits: this patch is based on an earlier internal contribution by
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. The main change
is the use of scnprintf to avoid known issues with snprintf.
Signed-off-by: Pierre-Louis Bossart
wrong prefix and wrong macro.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soundwire/cadence_master.c
b/drivers/soundwire/cadence_master.c
index 0f3b9c160b01..d9d9e3d964dd 100644
--- a
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 42 +-
drivers/soundwire/cadence_master.h | 2 +-
drivers/soundwire/intel.c | 6 +++--
3 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/drivers/soundwire
When a Slave reports multiple status in the sticky bits, find the
latest configuration from the mirror of the PING frame status and
update the status directly.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 34 --
1 file changed, 28
update comments to provide better understanding of enumeration flows.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/bus.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index bca378806d00..2354675ef104 100644
SQUASHME
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soundwire/cadence_master.c
b/drivers/soundwire/cadence_master.c
index 91e8bacb83e3..9f611a1fff0a 100644
--- a/drivers/soundwire
This should not happen in production systems but we should test for
all callback arguments before invoking the config_stream callback.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soundwire/intel.c
The BIOS provides an Intel-specific property, let's use it to avoid
hard-coded clock dividers.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 26 ++
drivers/soundwire/intel.c | 26 ++
include/linux/soun
PDI2 reports an invalid count, force the correct hardware-supported
value
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 497879dd9c0d..51990b192dc0 100644
Adding missing interrupt masks (parity, etc) and missing checks.
Clarify which masks are for which usage.
Signed-off-by: Bard Liao
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 25 ++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 1477c35f616f..a976480d6f36 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
re so when they expose a connector.
Add a module parameter to filter out such links, e.g. adding the
following config to a file in /etc/modprobe.d will select the second
and third links only.
options soundwire_intel_init sdw_link_mask=0x6
Signed-off-by: Pierre-Louis Bossart
---
drivers/soun
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 9 +++--
drivers/soundwire/cadence_master.h | 1 +
drivers/soundwire/intel.c | 4
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/soundwire/cadence_master.c
b/drivers/soundwire
attachment does not generate any
interrupt, despite the status showing them being attached.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 35 +-
1 file changed, 30 insertions(+), 5 deletions(-)
diff --git a/drivers/soundwire
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. The main change
is the use of scnprintf to avoid known issues with snprintf.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/Makefile| 4 +-
drivers/soundwire/bus.c | 6 ++
drivers/soundwire/bus.h | 24 ++
drivers
the values passed by all existing BIOS are fine, let's use them as is.
The existing code must have been needed only on early prototypes.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/drivers/soundwire/inte
Now that we've removed the update config, there's no need for a wrapper.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/soundwire/cadence_master.c
b/drivers
update
when the CONFIG is changed.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 29 +
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/drivers/soundwire/cadence_master.c
b/drivers/soundwire/cadence_master.c
index 9f611a1fff0a
This is to kick devices into reset and see what software does
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/drivers/soundwire/cadence_master.c
b/drivers/soundwire/cadence_master.c
index
We have a conceptual issue on restart: the interaction with the slaves
can start before (re) enumeration is complete. Add a delay for now but
we will need to have an async notification that all devices are back
on the bus.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 5
The code has a set of defaults which may not be relevant in all cases,
add kernel parameter as a helper - mostly for early board bring-up.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/soundwire
The bus clash interrupts are generated when the status is one, and
also cleared by writing a one. It's overkill/useless to use an OR when
the bit is already set.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 2 --
1 file changed, 2 deletions(-)
diff --
Implement suspend/resume capabilities (not runtime_pm for now)
Credits: this patch is based on an earlier internal contribution by
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 102
@@ -758,15 +774,9 @@ static int _cdns_enable_interrupt(struct sdw_cdns
*cdns)
*/
int sdw_cdns_enable_interrupt(struct sdw_cdns *cdns)
{
- int ret;
-
_cdns_enable_interrupt(cdns);
- ret = cdns_clear_bit(cdns, CDNS_MCP_CONFIG_UPDATE,
- CDNS_MCP_CONFIG_UPDATE_BI
On 7/25/19 5:15 PM, Guennadi Liakhovetski wrote:
Hi Pierre,
A couple of nitpicks:
Thanks for the feedback!
create mode 100644 drivers/soundwire/debugfs.c
[snip]
diff --git a/drivers/soundwire/bus.h b/drivers/soundwire/bus.h
index 3048ca153f22..06ac4adb0074 100644
--- a/drivers/sound
Thanks for the feedback Cezary.
+static ssize_t sdw_slave_reg_read(struct file *file, char __user
*user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct sdw_slave *slave = file->private_data;
+ unsigned int reg;
+ char *buf;
+ ssize_t ret;
+ int i, j;
+
+ buf =
On 7/26/19 4:38 AM, Cezary Rojewski wrote:
On 2019-07-26 01:39, Pierre-Louis Bossart wrote:
SQUASHME
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soundwire/cadence_master.c
b
On 7/26/19 4:35 AM, Cezary Rojewski wrote:
On 2019-07-26 01:39, Pierre-Louis Bossart wrote:
+static void intel_debugfs_init(struct sdw_intel *sdw)
+{
+ struct dentry *root = sdw->cdns.bus.debugfs;
+
+ if (!root)
+ return;
+
+ sdw->fs = debugfs_create_dir("intel
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 68832e613b1e..497879dd9c0d 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -509,7 +509,7 @@ static int intel_config_stream(struct sdw_intel *sdw,
struct snd_soc_dai *dai,
@@ -943,7 +953,10 @@ int sdw_cdns_init(struct sdw_cdns *cdns)
cdns_writel(cdns, CDNS_MCP_CONFIG, val);
- return 0;
+ /* commit changes */
+ ret = cdns_update_config(cdns);
+
+ return ret;
+ return cdns_update_config(cdns);
yes, will fix. thanks!
diff --git a/drivers/soundwire/cadence_master.c
b/drivers/soundwire/cadence_master.c
index 889fa2cd49ae..25d5c7267c15 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire/cadence_master.c
@@ -643,13 +643,35 @@ static int cdns_update_slave_status(struct sdw_cdns *cdns,
+static int do_reset(struct sdw_cdns *cdns)
+{
+ int ret;
+
+ /* program maximum length reset to be safe */
+ cdns_updatel(cdns, CDNS_MCP_CONTROL,
+CDNS_MCP_CONTROL_RST_DELAY,
+CDNS_MCP_CONTROL_RST_DELAY);
+
+ /* use hardware gener
On 7/26/19 5:04 AM, Cezary Rojewski wrote:
On 2019-07-26 01:40, Pierre-Louis Bossart wrote:
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/soundwire/cadence_master.h
b/drivers/soundwire
On 7/26/19 5:14 AM, Cezary Rojewski wrote:
On 2019-07-26 01:40, Pierre-Louis Bossart wrote:
- return do_bank_switch(stream);
+ ret = do_bank_switch(stream);
+ if (ret < 0) {
+ dev_err(bus->dev, "Bank switch failed: %d\n", ret);
+ return ret;
+ }
+
+
On 7/26/19 5:20 AM, Cezary Rojewski wrote:
On 2019-07-26 01:40, Pierre-Louis Bossart wrote:
+static u32 cdns_set_default_frame_shape(int n_rows, int n_cols)
+{
+ u32 val;
+ int c;
+ int r;
+
+ r = sdw_find_row_index(n_rows);
+ c = sdw_find_col_index(n_cols);
+
+ val = (r
On 7/26/19 12:19 AM, Bard liao wrote:
On 7/26/2019 7:40 AM, Pierre-Louis Bossart wrote:
From: Rander Wang
The existing code uses an OR operation which would mix the original
divider setting with the new one, resulting in an invalid
configuration that can make codecs hang.
Add the mask
On 8/2/19 6:53 AM, Vinod Koul wrote:
On 25-07-19, 18:39, Pierre-Louis Bossart wrote:
Not sure why the existing code would enable interrupts without the
ability to deal with them.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 4 ++--
1 file changed, 2 insertions
On 8/2/19 6:55 AM, Vinod Koul wrote:
On 25-07-19, 18:39, Pierre-Louis Bossart wrote:
This should not happen in production systems but we should test for
all callback arguments before invoking the config_stream callback.
so you are saying callback arg is mandatory, if so please document
On 8/2/19 6:57 AM, Vinod Koul wrote:
On 25-07-19, 18:39, Pierre-Louis Bossart wrote:
PDI2 reports an invalid count, force the correct hardware-supported
value
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 9 +
1 file changed, 9 insertions(+)
diff --git a
On 8/2/19 7:03 AM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
int sdw_cdns_enable_interrupt(struct sdw_cdns *cdns)
{
- int ret;
-
_cdns_enable_interrupt(cdns);
- ret = cdns_clear_bit(cdns, CDNS_MCP_CONFIG_UPDATE
@@ -761,10 +769,21 @@ int sdw_cdns_enable_interrupt(struct sdw_cdns *cdns)
cdns_writel(cdns, CDNS_MCP_SLAVE_INTMASK1,
CDNS_MCP_SLAVE_INTMASK1_MASK);
+ /* enable detection of slave state changes */
mask = CDNS_MCP_INT_SLAVE_RSVD | CDNS_MCP_INT_SLAVE_ALERT
On 8/2/19 7:20 AM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
When a Slave reports multiple status in the sticky bits, find the
latest configuration from the mirror of the PING frame status and
update the status directly.
Signed-off-by: Pierre-Louis Bossart
On 8/2/19 11:01 AM, Vinod Koul wrote:
On 02-08-19, 10:29, Pierre-Louis Bossart wrote:
On 8/2/19 7:20 AM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
+ status[i] = SDW_SLAVE_UNATTACHED;
+ break
On 8/2/19 10:57 AM, Vinod Koul wrote:
On 02-08-19, 10:16, Pierre-Louis Bossart wrote:
On 8/2/19 6:55 AM, Vinod Koul wrote:
On 25-07-19, 18:39, Pierre-Louis Bossart wrote:
This should not happen in production systems but we should test for
all callback arguments before invoking the
On 8/2/19 11:58 AM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
Not all platforms support runtime_pm for now, let's use runtime_pm
only when enabled.
We discussed this with Ulf sometime back and it was a consensus the core
should handle it, but that may take a while
On 8/2/19 12:00 PM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
update comments to provide better understanding of enumeration flows.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/bus.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
On 8/2/19 12:03 PM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
Please do provide the changelog on why this change is needed.
not needed for now, will remove.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.h | 3 +++
1 file changed, 3
On 8/2/19 12:10 PM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
Remove hard-coding and use BIOS values. If they are wrong use default
BIOS :) this is cadence, am sure this can be used outside BIOS :D
It would be better to say firmware (ACPI/DT)
yes
48x2 frame
On 8/2/19 12:17 PM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
The BIOS provides an Intel-specific property, let's use it to avoid
hard-coded clock dividers.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c
On 8/2/19 12:19 PM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
From: Rander Wang
The existing code uses an OR operation which would mix the original
divider setting with the new one, resulting in an invalid
configuration that can make codecs hang.
This looked fine but
On 8/2/19 12:28 PM, Vinod Koul wrote:
On 26-07-19, 09:46, Pierre-Louis Bossart wrote:
On 7/26/19 5:38 AM, Cezary Rojewski wrote:
On 2019-07-26 01:40, Pierre-Louis Bossart wrote:
+void intel_shutdown(struct snd_pcm_substream *substream,
+ struct snd_soc_dai *dai)
+{
+ struct
On 8/2/19 12:30 PM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
Please add explanation why..
yes missed this
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/soundwire
On 8/2/19 12:31 PM, Vinod Koul wrote:
On 25-07-19, 18:40, Pierre-Louis Bossart wrote:
Here as well
I squashed this with earlier patches to fix the init sequence in one shot
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 9 +++--
drivers/soundwire
+static ssize_t cdns_reg_read(struct file *file, char __user *user_buf,
+size_t count, loff_t *ppos)
+{
+ struct sdw_cdns *cdns = file->private_data;
+ char *buf;
+ ssize_t ret;
+ int i, j;
+
+ buf = kzalloc(RD_BUF, GFP_KERNEL);
+
On 8/5/19 4:39 AM, Sanyog Kale wrote:
On Thu, Jul 25, 2019 at 06:40:13PM -0500, Pierre-Louis Bossart wrote:
Add a prefix for common tables and export 2 helpers to set the frame
shapes based on row/col values.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/bus.h| 7
On 8/5/19 4:56 AM, Sanyog Kale wrote:
On Thu, Jul 25, 2019 at 06:40:15PM -0500, Pierre-Louis Bossart wrote:
When we disable the stream and then call hw_free, two bank switches
will be handled and as a result we re-enable the stream on hw_free.
I didnt quite get why there will be two bank
On 8/5/19 5:28 AM, Sanyog Kale wrote:
On Thu, Jul 25, 2019 at 06:40:17PM -0500, Pierre-Louis Bossart wrote:
The BIOS provides an Intel-specific property, let's use it to avoid
hard-coded clock dividers.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c
@@ -988,9 +989,11 @@ int sdw_cdns_init(struct sdw_cdns *cdns)
/* Set clock divider */
divider = (prop->mclk_freq / prop->max_clk_freq) - 1;
val = cdns_readl(cdns, CDNS_MCP_CLK_CTRL0);
reg read of CLK_CTRL0 can be removed.
yes for both comments. Thanks for the review
+static int sdw_select_row_col(struct sdw_bus *bus, int clk_freq)
+{
+ struct sdw_master_prop *prop = &bus->prop;
+ int frame_int, frame_freq;
+ int r, c;
+
+ for (c = 0; c < SDW_FRAME_COLS; c++) {
+ for (r = 0; r < SDW_FRAME_ROWS; r++) {
+
On 8/5/19 11:32 AM, Sanyog Kale wrote:
On Mon, Aug 05, 2019 at 10:33:25AM -0500, Pierre-Louis Bossart wrote:
On 8/5/19 4:56 AM, Sanyog Kale wrote:
On Thu, Jul 25, 2019 at 06:40:15PM -0500, Pierre-Louis Bossart wrote:
When we disable the stream and then call hw_free, two bank switches
On 8/5/19 11:57 AM, Sanyog Kale wrote:
On Thu, Jul 25, 2019 at 06:40:20PM -0500, Pierre-Louis Bossart wrote:
On most hardware platforms, SoundWire interfaces are pin-muxed with
other interfaces (typically DMIC or I2S) and the status of each link
needs to be checked at boot time.
For Intel
Pierre-Louis Bossart (15):
soundwire: intel: prevent possible dereference in hw_params
soundwire: intel: fix channel number reported by hardware
soundwire: cadence_master: revisit interrupt settings
soundwire: bus: improve dynamic debug comments for enumeration
soundwire: export helpers to
update comments to provide better understanding of enumeration flows.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/bus.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index 89d5f1537d9b..40f7d0dc59a6 100644
On all released Intel controllers (CNL/CML/ICL), PDI2 reports an
invalid count, force the correct hardware-supported value
This may have to be revisited with platform-specific values if the
hardware changes, but for now this is good enough.
Signed-off-by: Pierre-Louis Bossart
---
drivers
The code has a set of defaults which may not be relevant in all cases,
add kernel parameter as a helper - mostly for early board bring-up.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/soundwire
modprobe.d will select the second
and third links only.
options soundwire_intel_init sdw_link_mask=0x6
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel_init.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/drivers/soundwire/intel_init.c b/drivers/soundwire/in
All DAI callbacks are in intel.c except for shutdown. Move and remove
export symbol
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 14 --
drivers/soundwire/cadence_master.h | 2 --
drivers/soundwire/intel.c | 17 +++--
3 files
A number of variables don't need to be initialized.
In a couple of cases where we loop on a list of runtimes, the code
handling of the 'bus' variable leads to warnings that it may not be
initialized. Add a specific error case to trap such cases.
Signed-off-by: Pierre-Louis Bossar
The BIOS provides an Intel-specific property, let's use it to avoid
hard-coded clock dividers.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 26 ++
1 file changed, 26 insertions(+)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/in
: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/soundwire/cadence_master.c
b/drivers/soundwire/cadence_master.c
index 049ecfad2c00..fb198a806efd 100644
--- a/drivers/soundwire/cadence_master.c
To help pass platform-specific values, add a new field that can either
be set by the Master driver or read from firmware (BIOS/DT).
Signed-off-by: Pierre-Louis Bossart
---
include/linux/soundwire/sdw.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/soundwire/sdw.h b/include
Adding missing interrupt masks (parity, etc) and missing checks.
Clarify which masks are for which usage.
Signed-off-by: Bard Liao
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 29 +
1 file changed, 25 insertions(+), 4 deletions
ct sdw_device_id *id);
^
Fix by adding the relevant include
Reported-by: kbuild test robot
Signed-off-by: Bard liao
Signed-off-by: Pierre-Louis Bossart
---
include/linux/soundwire/sdw.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/soundwire
alternate banks.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/stream.c | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index 53f5e790fcd7..75b9ad1fb1a6 100644
--- a/drivers/soundwire/stream.c
eq is
typically tied to the oscillator frequency and does not change between
platforms. The max_clk_freq value is linked to the maximum bandwidth
needed and topology/trace length.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 14 ++
1 file change
Remove hard-coding and use firmware (BIOS/DT) values. If they are
wrong use default 48x2 frame shape.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/cadence_master.c | 26 +++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/drivers/soundwire
OS with an
Intel-specific _DSD property. The same capability will be added to
revisions of the MIPI DisCo specification.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 26 ++
include/linux/soundwire/sdw.h | 2 ++
2 files changed, 24 insertions
following patch.
Signed-off-by: Pierre-Louis Bossart
---
drivers/soundwire/bus.h| 7 +--
drivers/soundwire/stream.c | 14 --
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/soundwire/bus.h b/drivers/soundwire/bus.h
index 648436a995a3..89e74adf96fa 100644
-off-by: Pierre-Louis Bossart
---
drivers/soundwire/intel.c | 6 --
include/linux/soundwire/sdw_intel.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 3d9ca6479e94..a906789c7f78 100644
--- a/drivers
On 7/26/19 2:08 PM, Andy Shevchenko wrote:
On Fri, Jul 26, 2019 at 01:08:57PM -0500, Pierre-Louis Bossart wrote:
This thread became unreadable with interleaved top-posting, allow me restate
the options and ask PM folks what they think
On 7/25/19 6:40 PM, Pierre-Louis Bossart wrote:
Not all
On 7/30/19 6:21 AM, Andy Shevchenko wrote:
On Mon, Jul 29, 2019 at 05:07:39PM -0500, Pierre-Louis Bossart wrote:
On 7/26/19 2:08 PM, Andy Shevchenko wrote:
On Fri, Jul 26, 2019 at 01:08:57PM -0500, Pierre-Louis Bossart wrote:
- if (ret < 0)
+ if (ret < 0 &&
On 8/6/19 10:27 AM, Cezary Rojewski wrote:
On 2019-08-06 02:55, Pierre-Louis Bossart wrote:
diff --git a/drivers/soundwire/cadence_master.c
b/drivers/soundwire/cadence_master.c
index 5d9729b4d634..89c55e4bb72c 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire
On 8/6/19 10:31 AM, Cezary Rojewski wrote:
On 2019-08-06 02:55, Pierre-Louis Bossart wrote:
@@ -1493,6 +1493,11 @@ static int _sdw_prepare_stream(struct
sdw_stream_runtime *stream)
}
}
+ if (!bus) {
+ pr_err("Configuration error in %s\n", __func__);
+
701 - 800 of 1237 matches
Mail list logo