Skip to content

Commit 09a173a

Browse files
plbossartbroonie
authored andcommitted
ASoC: SOF: Intel: ipc: don't check for HIPCCTL register value
The HIPCCTL register controls the IPC interrupts. It can be set or cleared to mask or enable these interrupts, but it makes no sense to read and test its fields in an interrupt (which can only executed if its fields are set). Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 66e6533 commit 09a173a

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

‎sound/soc/sof/intel/cnl.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ static irqreturn_t cnl_ipc_irq_thread(int irq, void *context)
3131
{
3232
struct snd_sof_dev *sdev = context;
3333
u32 hipci;
34-
u32 hipcctl;
3534
u32 hipcida;
3635
u32 hipctdr;
3736
u32 hipctdd;
@@ -40,14 +39,12 @@ static irqreturn_t cnl_ipc_irq_thread(int irq, void *context)
4039
bool ipc_irq = false;
4140

4241
hipcida = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCIDA);
43-
hipcctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCCTL);
4442
hipctdr = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCTDR);
4543
hipctdd = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCTDD);
4644
hipci = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCIDR);
4745

4846
/* reply message from DSP */
49-
if (hipcida & CNL_DSP_REG_HIPCIDA_DONE &&
50-
hipcctl & CNL_DSP_REG_HIPCCTL_DONE) {
47+
if (hipcida & CNL_DSP_REG_HIPCIDA_DONE) {
5148
msg_ext = hipci & CNL_DSP_REG_HIPCIDR_MSG_MASK;
5249
msg = hipcida & CNL_DSP_REG_HIPCIDA_MSG_MASK;
5350

‎sound/soc/sof/intel/hda-ipc.c‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ irqreturn_t hda_dsp_ipc_irq_thread(int irq, void *context)
135135
u32 hipcie;
136136
u32 hipct;
137137
u32 hipcte;
138-
u32 hipcctl;
139138
u32 msg;
140139
u32 msg_ext;
141140
bool ipc_irq = false;
@@ -144,13 +143,11 @@ irqreturn_t hda_dsp_ipc_irq_thread(int irq, void *context)
144143
hipcie = snd_sof_dsp_read(sdev, HDA_DSP_BAR,
145144
HDA_DSP_REG_HIPCIE);
146145
hipct = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCT);
147-
hipcctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCCTL);
148146
hipci = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCI);
149147
hipcte = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCTE);
150148

151149
/* is this a reply message from the DSP */
152-
if (hipcie & HDA_DSP_REG_HIPCIE_DONE &&
153-
hipcctl & HDA_DSP_REG_HIPCCTL_DONE) {
150+
if (hipcie & HDA_DSP_REG_HIPCIE_DONE) {
154151
msg = hipci & HDA_DSP_REG_HIPCI_MSG_MASK;
155152
msg_ext = hipcie & HDA_DSP_REG_HIPCIE_MSG_MASK;
156153

@@ -196,8 +193,7 @@ irqreturn_t hda_dsp_ipc_irq_thread(int irq, void *context)
196193
}
197194

198195
/* is this a new message from DSP */
199-
if (hipct & HDA_DSP_REG_HIPCT_BUSY &&
200-
hipcctl & HDA_DSP_REG_HIPCCTL_BUSY) {
196+
if (hipct & HDA_DSP_REG_HIPCT_BUSY) {
201197
msg = hipct & HDA_DSP_REG_HIPCT_MSG_MASK;
202198
msg_ext = hipcte & HDA_DSP_REG_HIPCTE_MSG_MASK;
203199

0 commit comments

Comments
 (0)