Skip to content

Commit

Permalink
[ARM] 4690/1: PXA: fix CKEN corruption in PXA27x AC97 cold reset code
Browse files Browse the repository at this point in the history
Fix CKEN register corruption in the PXA27x cold reset code
located in sound/arm/pxa27x-ac97.c. The problem has been
introduced with a pxa_set_cken() function change in linux 2.6.23.
This patch is based on patch 4527/1 that fixes the same problem in
the ASoC PXA-AC97 driver. Additionally a definition for the CKEN
index value is added and applied to both PXA AC97 drivers.

Signed-off-by: Michael Brunner <mibru@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Michael Brunner authored and Russell King committed Dec 8, 2007
1 parent a0113a9 commit 03d14a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions include/asm-arm/arch-pxa/pxa-regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1784,6 +1784,7 @@
#define CCCR_M_MASK 0x0060 /* Memory Frequency to Run Mode Frequency Multiplier */
#define CCCR_L_MASK 0x001f /* Crystal Frequency to Memory Frequency Multiplier */

#define CKEN_AC97CONF (31) /* AC97 Controller Configuration */
#define CKEN_CAMERA (24) /* Camera Interface Clock Enable */
#define CKEN_SSP1 (23) /* SSP1 Unit Clock Enable */
#define CKEN_MEMC (22) /* Memory Controller Clock Enable */
Expand Down
4 changes: 2 additions & 2 deletions sound/arm/pxa2xx-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ static void pxa2xx_ac97_reset(struct snd_ac97 *ac97)
gsr_bits = 0;
#ifdef CONFIG_PXA27x
/* PXA27x Developers Manual section 13.5.2.2.1 */
pxa_set_cken(1 << 31, 1);
pxa_set_cken(CKEN_AC97CONF, 1);
udelay(5);
pxa_set_cken(1 << 31, 0);
pxa_set_cken(CKEN_AC97CONF, 0);
GCR = GCR_COLD_RST;
udelay(50);
#else
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/pxa/pxa2xx-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ static void pxa2xx_ac97_cold_reset(struct snd_ac97 *ac97)
gsr_bits = 0;
#ifdef CONFIG_PXA27x
/* PXA27x Developers Manual section 13.5.2.2.1 */
pxa_set_cken(31, 1);
pxa_set_cken(CKEN_AC97CONF, 1);
udelay(5);
pxa_set_cken(31, 0);
pxa_set_cken(CKEN_AC97CONF, 0);
GCR = GCR_COLD_RST;
udelay(50);
#else
Expand Down

0 comments on commit 03d14a5

Please sign in to comment.