|
From: <bob...@us...> - 2006-11-17 08:18:11
|
Revision: 675
http://svn.sourceforge.net/hackndev/?rev=675&view=rev
Author: bobofdoom
Date: 2006-11-17 00:18:03 -0800 (Fri, 17 Nov 2006)
Log Message:
-----------
l4p: Applying pxa2xx-ac97 errata fix E54 to all pxa27x devices and some minor cosmetic changes.
Modified Paths:
--------------
linux4palm/linux/trunk/sound/arm/pxa2xx-ac97.c
Modified: linux4palm/linux/trunk/sound/arm/pxa2xx-ac97.c
===================================================================
--- linux4palm/linux/trunk/sound/arm/pxa2xx-ac97.c 2006-11-16 21:29:19 UTC (rev 674)
+++ linux4palm/linux/trunk/sound/arm/pxa2xx-ac97.c 2006-11-17 08:18:03 UTC (rev 675)
@@ -63,30 +63,32 @@
gsr_bits = 0;
val = *reg_addr;
-// cris: dunno if it will work with all PXA27x so it's active only for the TX
-//#ifdef CONFIG_PXA27x
-#ifdef CONFIG_MACH_PALMTX
- // recommended procedure for reg 0x54 (see PXA27x Specification Update: 28007109.pdf sec.: E54)
- if (reg == AC97_GPIO_STATUS){
- if (wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_CDONE, 1) <= 0 &&
- !((GSR | gsr_bits) & GSR_CDONE)) {
- printk(KERN_ERR "%s: read error (ac97_reg=%d GSR=%#lx)\n",
- __FUNCTION__, reg, GSR | gsr_bits);
+#ifdef CONFIG_PXA27x
+ /* recommended procedure for reg 0x54
+ (see PXA27x Specification Update: 28007109.pdf sec.: E54) */
+ if (reg == AC97_GPIO_STATUS)
+ {
+ if (wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_CDONE,
+ 1) <= 0 && !((GSR | gsr_bits) & GSR_CDONE)) {
+ printk(KERN_ERR "%s: read error (ac97_reg=%d "
+ "GSR=%#lx)\n", __FUNCTION__,
+ reg, GSR | gsr_bits);
val = -1;
goto out;
}
GSR = GSR_CDONE | GSR_SDONE;
-
}
- else {
+ else
#else
- if (reg == AC97_GPIO_STATUS)
+ if (reg == AC97_GPIO_STATUS)
goto out;
#endif
- if (wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_SDONE, 1) <= 0 &&
- !((GSR | gsr_bits) & GSR_SDONE)) {
+
+ if (wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_SDONE, 1) <= 0
+ && !((GSR | gsr_bits) & GSR_SDONE))
+ {
printk(KERN_ERR "%s: read error (ac97_reg=%d GSR=%#lx)\n",
- __FUNCTION__, reg, GSR | gsr_bits);
+ __FUNCTION__, reg, GSR | gsr_bits);
val = -1;
goto out;
}
@@ -115,20 +117,21 @@
GSR = GSR_CDONE | GSR_SDONE;
gsr_bits = 0;
*reg_addr = val;
-//#ifdef CONFIG_PXA27x
-#ifdef CONFIG_MACH_PALMTX
- // recommended procedure for reg 0x54 (see PXA27x Specification Update: 28007109.pdf sec.: E54)
- if (reg == AC97_GPIO_STATUS){
+
+#ifdef CONFIG_PXA27x
+ /* recommended procedure for reg 0x54
+ (see PXA27x Specification Update: 28007109.pdf sec.: E54) */
+ if (reg == AC97_GPIO_STATUS) {
udelay(50);
- }
- else {
+ } else {
#endif
- if (wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_CDONE, 1) <= 0 &&
- !((GSR | gsr_bits) & GSR_CDONE))
- printk(KERN_ERR "%s: write error (ac97_reg=%d GSR=%#lx)\n",
- __FUNCTION__, reg, GSR | gsr_bits);
-//#ifdef CONFIG_PXA27x
-#ifdef CONFIG_MACH_PALMTX
+ if (wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_CDONE,
+ 1) <= 0 && !((GSR | gsr_bits) & GSR_CDONE)) {
+ printk(KERN_ERR "%s: write error (ac97_reg=%d "
+ "GSR=%#lx)\n", __FUNCTION__,
+ reg, GSR | gsr_bits);
+ }
+#ifdef CONFIG_PXA27x
}
#endif
mutex_unlock(&car_mutex);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|