summaryrefslogtreecommitdiff
path: root/sound/arm
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2006-02-01 19:25:58 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-02-01 19:25:58 +0000
commitf27f218cdfb12c9d2b285ec4a0bce588b5c531d3 (patch)
tree38e2663bb2cfe2f4af663b837288d6d6b069bafb /sound/arm
parenta6df590dd8b7644c8e298e3b13442bcd6ceeb739 (diff)
downloadlwn-f27f218cdfb12c9d2b285ec4a0bce588b5c531d3.tar.gz
lwn-f27f218cdfb12c9d2b285ec4a0bce588b5c531d3.zip
[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: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'sound/arm')
-rw-r--r--sound/arm/aaci.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index 54147c1f6361..149feb410654 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -882,14 +882,20 @@ static int __devinit aaci_probe(struct amba_device *dev, void *id)
writel(0x1fff, aaci->base + AACI_INTCLR);
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);
-
- ret = aaci_probe_ac97(aaci);
- if (ret)
+ if (aaci->fifosize & 15) {
+ printk(KERN_WARNING "AACI: fifosize = %d not supported\n",
+ aaci->fifosize);
+ ret = -ENODEV;
goto out;
+ }
ret = aaci_init_pcm(aaci);
if (ret)