summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire/cadence_master.c
Commit message (Collapse)AuthorAgeFilesLines
* soundwire: cadence_master: fix definitions for INTSTAT0/1Pierre-Louis Bossart2019-08-021-2/+2
| | | | | | | | | 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>
* soundwire: cadence_master: fix register definition for SLAVE_STATEPierre-Louis Bossart2019-08-021-2/+2
| | | | | | | | 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>
* soundwire: cadence_master: check the number of bidir PDIsPierre-Louis Bossart2019-05-271-0/+2
| | | | | | | | | | 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>
* soundwire: cadence_master: log Slave status mask on errorsPierre-Louis Bossart2019-05-271-2/+3
| | | | | | | | | | | | | 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>
* soundwire: cadence_master: use rate_limited dynamic debugPierre-Louis Bossart2019-05-271-12/+12
| | | | | | | | | | 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>
* soundwire: cdns: Fix compilation error on arm64Jan Kotas2019-05-271-0/+1
| | | | | | | | | | | 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>
* soundwire: cadence: remove empty line after bracesVinod Koul2019-05-021-1/+0Star
| | | | | | | | | | | | 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>
* soundwire: add missing newlines in dynamic debug logsPierre-Louis Bossart2019-05-021-6/+6
| | | | | | | | | 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>
* soundwire: cadence_master: remove spurious newlinePierre-Louis Bossart2019-05-021-1/+0Star
| | | | | | | | 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>
* soundwire: cadence_master: fix boolean comparisonsPierre-Louis Bossart2019-05-021-2/+2
| | | | | | | | 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>
* soundwire: cadence_master: balance parenthesesPierre-Louis Bossart2019-05-021-1/+2
| | | | | | | | | 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>
* soundwire: cadence_master: fix alignment issuesPierre-Louis Bossart2019-05-021-39/+40
| | | | | | | | Use Linux style 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>
* soundwire: cdns: Add stream routinesVinod Koul2018-05-111-0/+195
| | | | | | | | | Add support for Cadence stream initialization and implement stream APIs. Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com> Signed-off-by: Shreyas NC <shreyas.nc@intel.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
* soundwire: cdns: Add port routinesVinod Koul2018-05-111-0/+243
| | | | | | | | | Add support for Cadence port management and implement master port ops. Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com> Signed-off-by: Shreyas NC <shreyas.nc@intel.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
* soundwire: Remove cdns_master_opsShreyas NC2018-05-111-11/+6Star
| | | | | | | | | There can be instances where drivers using Cadence IP might want to set sdw_master_ops differently per instance of it's use, so remove the cdns_master_ops and export the APIs. Signed-off-by: Shreyas NC <shreyas.nc@intel.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
* soundwire: cdns: Add sdw_master_ops and IO transfer supportSanyog Kale2017-12-191-0/+320
| | | | | | | | | | | | | | Implement sdw_master_ops with support for xfer_msg, xfer_msg_defer and reset_page_addr. Since Cadence module doesn't know the systems it will be used, set the read_prop to the bus helper. Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com> Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Acked-By: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* soundwire: cdns: Add cadence libraryVinod Koul2017-12-191-0/+431
Cadence IP implements SoundWire Master. Add base cadence library initialization and interrupt handling Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com> Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Acked-By: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>