ALT Linux kernel packages development
 help / color / mirror / Atom feed
* [d-kernel] [PATCH] Revert "(BROKEN) dwc-i2s: support Baikal-M SoC"
@ 2023-06-10 13:58 Vitaly Chikunov
  0 siblings, 0 replies; only message in thread
From: Vitaly Chikunov @ 2023-06-10 13:58 UTC (permalink / raw)
  To: devel-kernel

Conflicts with upstream commit ab6ecfbf40fc ("ASoC: dwc: limit the
number of overrun messages").

This reverts commit 843884b7313d3976054b6a697e41203be5d75ffc.

Cc: Alexey Sheplyakov <asheplyakov@basealt.ru>
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
---
 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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-10 13:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-10 13:58 [d-kernel] [PATCH] Revert "(BROKEN) dwc-i2s: support Baikal-M SoC" Vitaly Chikunov

ALT Linux kernel packages development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
		devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
	public-inbox-index devel-kernel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git