Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f27f218c authored by Catalin Marinas's avatar Catalin Marinas Committed by Russell King
Browse files

[ARM] 3290/1: Fix the FIFO size detection



Patch from Catalin Marinas

AACI reports TX FIFO full after the first write to it if the AC97 is not
enabled. This patch enables the AC97 probing before the check for the TX
FIFO size. The patch also adds a warning if the TX FIFO size is not
multiple of 16.

Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent a6df590d
Loading
Loading
Loading
Loading
+10 −4
Original line number Original line Diff line number Diff line
@@ -882,14 +882,20 @@ static int __devinit aaci_probe(struct amba_device *dev, void *id)
	writel(0x1fff, aaci->base + AACI_INTCLR);
	writel(0x1fff, aaci->base + AACI_INTCLR);
	writel(aaci->maincr, aaci->base + AACI_MAINCR);
	writel(aaci->maincr, aaci->base + AACI_MAINCR);


	ret = aaci_probe_ac97(aaci);
	if (ret)
		goto out;

	/*
	/*
	 * Size the FIFOs.
	 * Size the FIFOs (must be multiple of 16).
	 */
	 */
	aaci->fifosize = aaci_size_fifo(aaci);
	aaci->fifosize = aaci_size_fifo(aaci);

	if (aaci->fifosize & 15) {
	ret = aaci_probe_ac97(aaci);
		printk(KERN_WARNING "AACI: fifosize = %d not supported\n",
	if (ret)
		       aaci->fifosize);
		ret = -ENODEV;
		goto out;
		goto out;
	}


	ret = aaci_init_pcm(aaci);
	ret = aaci_init_pcm(aaci);
	if (ret)
	if (ret)