From fb1bf8cd13bfa7ed0364ab0d82f717fc020d35f6 Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Mon, 4 Jan 2010 16:30:58 +0800 Subject: [ARM] pxa: introduce processor specific pxa27x_assert_ac97reset() This is really pxa27x specific and should be kept in pxa27x.c. With this newly introduced function, the original set_resetgpio_mode() is deprecated. Cc: Dmitry Eremin-Solenikov Cc: Mark Brown Signed-off-by: Eric Miao --- arch/arm/mach-pxa/pxa27x.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 6a0b731..7c53543 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -40,6 +40,25 @@ void pxa27x_clear_otgph(void) } EXPORT_SYMBOL(pxa27x_clear_otgph); +static unsigned long ac97_reset_config[] = { + GPIO95_AC97_nRESET, + GPIO95_GPIO, + GPIO113_AC97_nRESET, + GPIO113_GPIO, +}; + +void pxa27x_assert_ac97reset(int reset_gpio, int on) +{ + if (reset_gpio == 113) + pxa2xx_mfp_config(on ? &ac97_reset_config[0] : + &ac97_reset_config[1], 1); + + if (reset_gpio == 95) + pxa2xx_mfp_config(on ? &ac97_reset_config[2] : + &ac97_reset_config[3], 1); +} +EXPORT_SYMBOL_GPL(pxa27x_assert_ac97reset); + /* Crystal clock: 13MHz */ #define BASE_CLK 13000000 -- cgit v1.1