From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Vitaly Chikunov To: devel-kernel@lists.altlinux.org Date: Sat, 10 Jun 2023 16:58:16 +0300 Message-Id: <20230610135816.3290408-1-vt@altlinux.org> X-Mailer: git-send-email 2.33.8 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [d-kernel] [PATCH] Revert "(BROKEN) dwc-i2s: support Baikal-M SoC" X-BeenThere: devel-kernel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux kernel packages development List-Id: ALT Linux kernel packages development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jun 2023 13:58:20 -0000 Archived-At: List-Archive: List-Post: Conflicts with upstream commit ab6ecfbf40fc ("ASoC: dwc: limit the number of overrun messages"). This reverts commit 843884b7313d3976054b6a697e41203be5d75ffc. Cc: Alexey Sheplyakov Signed-off-by: Vitaly Chikunov --- sound/soc/dwc/dwc-i2s.c | 36 ++++++++++-------------------------- sound/soc/dwc/local.h | 1 - 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c index 1568d82166f3..7f7dd07c63b2 100644 --- a/sound/soc/dwc/dwc-i2s.c +++ b/sound/soc/dwc/dwc-i2s.c @@ -100,7 +100,6 @@ static inline void i2s_enable_irqs(struct dw_i2s_dev *dev, u32 stream, static irqreturn_t i2s_irq_handler(int irq, void *dev_id) { - unsigned int rxor_count; struct dw_i2s_dev *dev = dev_id; bool irq_valid = false; u32 isr[4]; @@ -137,13 +136,9 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id) irq_valid = true; } - /* Error Handling: RX */ + /* Error Handling: TX */ if (isr[i] & ISR_RXFO) { - rxor_count = READ_ONCE(dev->rx_overrun_count); - if (!(rxor_count & 0x3ff)) - dev_dbg(dev->dev, "RX overrun (ch_id=%d)\n", i); - rxor_count++; - WRITE_ONCE(dev->rx_overrun_count, rxor_count); + dev_err(dev->dev, "RX overrun (ch_id=%d)\n", i); irq_valid = true; } } @@ -635,8 +630,7 @@ static int dw_i2s_probe(struct platform_device *pdev) const struct i2s_platform_data *pdata = pdev->dev.platform_data; struct dw_i2s_dev *dev; struct resource *res; - int ret, irq, irq_count; - unsigned idx; + int ret, irq; struct snd_soc_dai_driver *dw_i2s_dai; const char *clk_id; @@ -656,23 +650,13 @@ static int dw_i2s_probe(struct platform_device *pdev) dev->dev = &pdev->dev; - irq_count = platform_irq_count(pdev); - if (irq_count < 0) /* - EPROBE_DEFER */ - return irq_count; - else if (!irq_count) { - dev_err(&pdev->dev, "no IRQs found for device\n"); - return -ENODEV; - } - - for (idx = 0; idx < (unsigned)irq_count; idx++) { - irq = platform_get_irq_optional(pdev, idx); - if (irq >= 0) { - ret = devm_request_irq(&pdev->dev, irq, i2s_irq_handler, 0, - pdev->name, dev); - if (ret < 0) { - dev_err(&pdev->dev, "failed to request irq\n"); - return ret; - } + irq = platform_get_irq_optional(pdev, 0); + if (irq >= 0) { + ret = devm_request_irq(&pdev->dev, irq, i2s_irq_handler, 0, + pdev->name, dev); + if (ret < 0) { + dev_err(&pdev->dev, "failed to request irq\n"); + return ret; } } diff --git a/sound/soc/dwc/local.h b/sound/soc/dwc/local.h index 1d6b6fd870ca..1c361eb6127e 100644 --- a/sound/soc/dwc/local.h +++ b/sound/soc/dwc/local.h @@ -117,7 +117,6 @@ struct dw_i2s_dev { bool *period_elapsed); unsigned int tx_ptr; unsigned int rx_ptr; - unsigned int rx_overrun_count; }; #if IS_ENABLED(CONFIG_SND_DESIGNWARE_PCM) -- 2.33.8