From: David Brownell <[email protected]> Decouple ASP clk_*() calls from pinmmux for DM355 and DM6446. This removes the need for dm355_psc_mux(), and is a net minor source and runtime code shrink.
Note that this keeps the ASoC-related board setup code together, but unfortunately that still doesn't live in mach-davinci with all the other board setup logic. On my DM6446 EVM this muxing is needed; u-boot doesn't. On the DM355 EVM, it isn't needed; u-boot sets that up. I have no idea if SFFSDR boards need it. Signed-off-by: David Brownell <[email protected]> --- arch/arm/mach-davinci/psc.c | 39 -------------------------------------- sound/soc/davinci/davinci-evm.c | 7 ++++++ 2 files changed, 8 insertions(+), 38 deletions(-) --- a/arch/arm/mach-davinci/psc.c +++ b/arch/arm/mach-davinci/psc.c @@ -60,9 +60,6 @@ static void dm6446_psc_mux(unsigned int case DAVINCI_LPSC_I2C: davinci_cfg_reg(DM644X_I2C); break; - case DAVINCI_LPSC_McBSP: - davinci_cfg_reg(DM644X_MCBSP); - break; case DAVINCI_LPSC_VLYNQ: davinci_cfg_reg(DM644X_VLYNQEN); davinci_cfg_reg(DM644X_VLYNQWD); @@ -72,40 +69,6 @@ static void dm6446_psc_mux(unsigned int } } -#define DM355_ARM_PINMUX3 0x0c -#define DM355_ARM_PINMUX4 0x10 -#define DM355_ARM_INTMUX 0x18 -#define DM355_EDMA_EVTMUX 0x1c - -static void dm355_psc_mux(unsigned int id) -{ - u32 tmp; - void __iomem *base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE); - - /* REVISIT mixing pinmux with PSC setup seems pretty dubious, - * especially in cases like ASP0 where there are valid partial - * functionality use cases ... like half duplex links. Best - * probably to do all this as part of platform_device setup, - * while declaring what pins/irqs/edmas/... we care about. - */ - switch (id) { - case DM355_LPSC_McBSP1: /* ASP1 */ - /* our ASoC code currently doesn't use these IRQs */ -#if 0 - /* deliver ASP1_XINT and ASP1_RINT */ - tmp = __raw_readl(base + DM355_ARM_INTMUX); - tmp |= BIT(6) | BIT(5); - __raw_writel(tmp, base + DM355_ARM_INTMUX); -#endif - - /* support EDMA for ASP1_RX and ASP1_TX */ - tmp = __raw_readl(base + DM355_EDMA_EVTMUX); - tmp &= ~(BIT(1) | BIT(0)); - __raw_writel(tmp, base + DM355_EDMA_EVTMUX); - break; - } -} - static void nop_psc_mux(unsigned int id) { /* nothing */ @@ -175,7 +138,7 @@ void __init davinci_psc_init(void) if (cpu_is_davinci_dm644x() || cpu_is_davinci_dm646x()) { davinci_psc_mux = dm6446_psc_mux; } else if (cpu_is_davinci_dm355()) { - davinci_psc_mux = dm355_psc_mux; + davinci_psc_mux = nop_psc_mux; } else { pr_err("PSC: no PSC mux hooks for this CPU\n"); davinci_psc_mux = nop_psc_mux; --- a/sound/soc/davinci/davinci-evm.c +++ b/sound/soc/davinci/davinci-evm.c @@ -24,6 +24,7 @@ #include <mach/asp.h> #include <mach/edma.h> +#include <mach/mux.h> #include "../codecs/tlv320aic3x.h" #include "davinci-pcm.h" @@ -202,10 +203,16 @@ static int __init evm_init(void) int ret; if (machine_is_davinci_evm()) { + davinci_cfg_reg(DM644X_MCBSP); + resources = evm_snd_resources; data = &evm_snd_data; index = 0; } else if (machine_is_davinci_dm355_evm()) { + /* we don't use ASP1 IRQs, or we'd need to mux them ... */ + davinci_cfg_reg(DM355_EVT8_ASP1_TX); + davinci_cfg_reg(DM355_EVT9_ASP1_RX); + resources = dm335evm_snd_resources; data = &dm335evm_snd_data; index = 1; _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
