Commit da57d706 authored by David Brownell's avatar David Brownell Committed by Kevin Hilman

more clock/mux splitting: ASP/ASoC

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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
parent 52bad106
......@@ -60,9 +60,6 @@ static void dm6446_psc_mux(unsigned int id)
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 id)
}
}
#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 */
......@@ -172,7 +135,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;
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment