Skip to content

Commit

Permalink
soundwire: cadence_master: add kernel parameter to override interrupt…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Pierre-Louis Bossart authored and Vinod Koul committed Aug 21, 2019
1 parent 50302fc commit 04592dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/soundwire/cadence_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
#include "bus.h"
#include "cadence_master.h"

static int interrupt_mask;
module_param_named(cnds_mcp_int_mask, interrupt_mask, int, 0444);
MODULE_PARM_DESC(cdns_mcp_int_mask, "Cadence MCP IntMask");

#define CDNS_MCP_CONFIG 0x0

#define CDNS_MCP_CONFIG_MCMD_RETRY GENMASK(27, 24)
Expand Down Expand Up @@ -668,6 +672,9 @@ static int _cdns_enable_interrupt(struct sdw_cdns *cdns)
*/
mask |= CDNS_MCP_INT_IRQ;

if (interrupt_mask) /* parameter override */
mask = interrupt_mask;

cdns_writel(cdns, CDNS_MCP_INTMASK, mask);

return 0;
Expand Down

0 comments on commit 04592dc

Please sign in to comment.