History log of /openbmc/linux/drivers/soundwire/cadence_master.c (Results 76 – 100 of 106)
Revision Date Author Comments
# 9e3d47fb 22-Oct-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: intel/cadence: add flag for interrupt enable

Prepare for future PM support and fix error handling by disabling
interrupts as needed.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bos

soundwire: intel/cadence: add flag for interrupt enable

Prepare for future PM support and fix error handling by disabling
interrupts as needed.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191022235448.17586-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 675d4c9a 22-Oct-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: add hw_reset capability in debugfs

Provide debugfs capability to kick link and devices into hard-reset
(as defined by MIPI). This capability is really useful when some
dev

soundwire: cadence_master: add hw_reset capability in debugfs

Provide debugfs capability to kick link and devices into hard-reset
(as defined by MIPI). This capability is really useful when some
devices are no longer responsive and/or to check the software handling
of resynchronization.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191022235448.17586-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 49ea07d3 22-Oct-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: intel/cadence: fix startup sequence

Multiple changes squashed in single patch to avoid tick-tock effect
and avoid breaking compilation/bisect

1. Per the hardware documentation, all chang

soundwire: intel/cadence: fix startup sequence

Multiple changes squashed in single patch to avoid tick-tock effect
and avoid breaking compilation/bisect

1. Per the hardware documentation, all changes to MCP_CONFIG,
MCP_CONTROL, MCP_CMDCTRL and MCP_PHYCTRL need to be validated with a
self-clearing write to MCP_CONFIG_UPDATE. Add a helper and do the
update when the CONFIG is changed.

2. Move interrupt enable after interrupt handler registration

3. Add a new helper to start the hardware bus reset with maximum duration
to make sure the Slave(s) correctly detect the reset pattern and to
ensure electrical conflicts can be resolved.

4. flush command FIFOs

Better error handling will be provided after interrupt disable is
provided in follow-up patches.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191022235448.17586-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 1b53385e 16-Sep-2019 Bard Liao <yung-chuan.liao@linux.intel.com>

soundwire: cadence_master: improve PDI allocation

PDI number should match dai->id, there is no need to track if a PDI is
allocated or not.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>

soundwire: cadence_master: improve PDI allocation

PDI number should match dai->id, there is no need to track if a PDI is
allocated or not.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190916192348.467-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 807c15bc 16-Sep-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: intel: don't filter out PDI0/1

PDI0/1 are reserved for Bulk and filtered out in the existing code.
That leads to endless confusions on whether the index is the raw or
corrected one. In ad

soundwire: intel: don't filter out PDI0/1

PDI0/1 are reserved for Bulk and filtered out in the existing code.
That leads to endless confusions on whether the index is the raw or
corrected one. In addition we will need support for Bulk at some point
so it's just simpler to expose those PDIs and not use it for now than
try to be smart unless we have to remove the smarts.

This patch requires a topology change to use PDIs starting at offset 2
explicitly.

Note that there is a known discrepancy between hardware documentation
and what ALH stream works in practice, future fixes are likely.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190916192348.467-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 57a34790 16-Sep-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence/intel: simplify PDI/port mapping

The existing Linux code uses a 1:1 mapping between ports and PDIs, but
still has an independent allocation of ports and PDIs.

Let's simplify the

soundwire: cadence/intel: simplify PDI/port mapping

The existing Linux code uses a 1:1 mapping between ports and PDIs, but
still has an independent allocation of ports and PDIs.

Let's simplify the code and remove the port layer by only using PDIs.

This patch does not change any functionality, just removes unnecessary
code.

This will also allow for further simplifications where the PDIs are
not dynamically allocated but instead described in a topology file.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190916192348.467-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# aa85066e 21-Aug-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: add debugfs register dump

Add debugfs file to dump the Cadence master registers.

Credits: this patch is based on an earlier internal contribution by
Vinod Koul, Sanyog Ka

soundwire: cadence_master: add debugfs register dump

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.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Sanyog Kale <sanyog.r.kale@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190821185821.12690-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 183c7687 05-Aug-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: intel: move shutdown() callback and don't export symbol

All DAI callbacks are in intel.c except for shutdown. Move and remove
export symbol

Signed-off-by: Pierre-Louis Bossart <pierre-lo

soundwire: intel: move shutdown() callback and don't export symbol

All DAI callbacks are in intel.c except for shutdown. Move and remove
export symbol

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190806005522.22642-18-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 04592dce 05-Aug-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: add kernel parameter to override interrupt mask

The code has a set of defaults which may not be relevant in all cases,
add kernel parameter as a helper - mostly for early

soundwire: cadence_master: add kernel parameter to override interrupt mask

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 <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190806005522.22642-17-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# a50954e2 05-Aug-2019 Rander Wang <rander.wang@linux.intel.com>

soundwire: cadence_master: fix divider setting in clock register

The existing code uses an OR operation which would mix the original
divider setting with the new one, resulting in an invalid
configu

soundwire: cadence_master: fix divider setting in clock register

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 definition and use cdns_updatel to update divider

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190806005522.22642-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 3859872f 05-Aug-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: make use of mclk_freq property

Now that the prototype and Intel implementation are enabled, use this
property to avoid hard-coded values.

For example for ICL the mclk_fre

soundwire: cadence_master: make use of mclk_freq property

Now that the prototype and Intel implementation are enabled, use this
property to avoid hard-coded values.

For example for ICL the mclk_freq value is 38.4 MHz while on CNL/CML
it's 24 MHz. The mclk_freq should not be confused with the
max_clk_freq, which si the maximum bus clock. The mclk_freq 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 <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190806005522.22642-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 05be59ac 05-Aug-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: use firmware defaults for frame shape

Remove hard-coding and use firmware (BIOS/DT) values. If they are
wrong use default 48x2 frame shape.

Signed-off-by: Pierre-Louis Bo

soundwire: cadence_master: use firmware defaults for frame shape

Remove hard-coding and use firmware (BIOS/DT) values. If they are
wrong use default 48x2 frame shape.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190806005522.22642-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 9b5884a0 05-Aug-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: revisit interrupt settings

Adding missing interrupt masks (parity, etc) and missing checks.
Clarify which masks are for which usage.

Signed-off-by: Bard Liao <yung-chuan.

soundwire: cadence_master: revisit interrupt settings

Adding missing interrupt masks (parity, etc) and missing checks.
Clarify which masks are for which usage.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190806005522.22642-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 664b1658 25-Jul-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: fix definitions for INTSTAT0/1

Two off-by-one errors: INTSTAT0 missed BIT(31) and INTSTAT1 is only
defined on first 16 bits.

Signed-off-by: Pierre-Louis Bossart <pierre-l

soundwire: cadence_master: fix definitions for INTSTAT0/1

Two off-by-one errors: INTSTAT0 missed BIT(31) and INTSTAT1 is only
defined on first 16 bits.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190725234032.21152-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# b07dd9b4 25-Jul-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: fix register definition for SLAVE_STATE

wrong prefix and wrong macro.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel

soundwire: cadence_master: fix register definition for SLAVE_STATE

wrong prefix and wrong macro.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190725234032.21152-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 68acd859 25-Jul-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: simplify bus clash interrupt clear

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 whe

soundwire: cadence_master: simplify bus clash interrupt clear

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 <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190725234032.21152-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 2d35526d 22-May-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: check the number of bidir PDIs

There is an assumption that the first two PDIs are reserved for Bulk,
so we need to make sure the number of bidir PDIs is indeed larger than

soundwire: cadence_master: check the number of bidir PDIs

There is an assumption that the first two PDIs are reserved for Bulk,
so we need to make sure the number of bidir PDIs is indeed larger than
two. If the configuration provided is incorrect, this could lead to
allocating a huge amount of memory.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# a78b32d9 22-May-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: log Slave status mask on errors

The Slave status mask exposes 4 sticky bits. When the device loses
sync, the IP will report two status but the log will only show that
the

soundwire: cadence_master: log Slave status mask on errors

The Slave status mask exposes 4 sticky bits. When the device loses
sync, the IP will report two status but the log will only show that
the device lost sync. The status mask has all the information needed
so let's report it instead.

Also change the resolution of the mask, using 64 bits is not needed
when you need 4.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# eb7df4c8 22-May-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: use rate_limited dynamic debug

When commands start failing, e.g. due to a bad electrical connection
or bus conflicts, the dmesg log is flooded. This should not happen for

soundwire: cadence_master: use rate_limited dynamic debug

When commands start failing, e.g. due to a bad electrical connection
or bus conflicts, the dmesg log is flooded. This should not happen for
production devices but it's quite frequent when bringing-up a new
platform.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 18de65d9 04-Apr-2019 Jan Kotas <jank@cadence.com>

soundwire: cdns: Fix compilation error on arm64

On arm64 the cadence_master.c file doesn't compile.

readl and writel are undefined.
This patch fixes that by including io.h.

Signed-off-by: Jan Kota

soundwire: cdns: Fix compilation error on arm64

On arm64 the cadence_master.c file doesn't compile.

readl and writel are undefined.
This patch fixes that by including io.h.

Signed-off-by: Jan Kotas <jank@cadence.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>

show more ...


# 4415b443 02-May-2019 Vinod Koul <vkoul@kernel.org>

soundwire: cadence: remove empty line after braces

Linux code style doesn't expect empty lines after braces and
gives warning:

CHECK: Blank lines aren't necessary after an open brace '{'

Remove th

soundwire: cadence: remove empty line after braces

Linux code style doesn't expect empty lines after braces and
gives warning:

CHECK: Blank lines aren't necessary after an open brace '{'

Remove the empty line in cadence lib

Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

show more ...


# 17ed5bef 01-May-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: add missing newlines in dynamic debug logs

For some reason the newlines are not used everywhere. Fix as needed.

Reported-by: Joe Perches <joe@perches.com>
Reviewed-by: Takashi Iwai <tiwa

soundwire: add missing newlines in dynamic debug logs

For some reason the newlines are not used everywhere. Fix as needed.

Reported-by: Joe Perches <joe@perches.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

show more ...


# 5d2ab7e9 01-May-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: remove spurious newline

Extra newline does not improve readability.

Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@li

soundwire: cadence_master: remove spurious newline

Extra newline does not improve readability.

Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

show more ...


# 4c568602 01-May-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: fix boolean comparisons

No need for explicit test against true

Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.i

soundwire: cadence_master: fix boolean comparisons

No need for explicit test against true

Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

show more ...


# f6e20967 01-May-2019 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

soundwire: cadence_master: balance parentheses

While not strictly necessary, balanced parentheses help with code
readability.

Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis B

soundwire: cadence_master: balance parentheses

While not strictly necessary, balanced parentheses help with code
readability.

Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

show more ...


12345