Commit 0cb3a12f authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus

parents 4368c276 9986943e
...@@ -31,23 +31,24 @@ static int rsnd_cmd_init(struct rsnd_mod *mod, ...@@ -31,23 +31,24 @@ static int rsnd_cmd_init(struct rsnd_mod *mod,
struct rsnd_mod *mix = rsnd_io_to_mod_mix(io); struct rsnd_mod *mix = rsnd_io_to_mod_mix(io);
struct device *dev = rsnd_priv_to_dev(priv); struct device *dev = rsnd_priv_to_dev(priv);
u32 data; u32 data;
u32 path[] = {
[1] = 1 << 0,
[5] = 1 << 8,
[6] = 1 << 12,
[9] = 1 << 15,
};
if (!mix && !dvc) if (!mix && !dvc)
return 0; return 0;
if (ARRAY_SIZE(path) < rsnd_mod_id(mod) + 1)
return -ENXIO;
if (mix) { if (mix) {
struct rsnd_dai *rdai; struct rsnd_dai *rdai;
struct rsnd_mod *src; struct rsnd_mod *src;
struct rsnd_dai_stream *tio; struct rsnd_dai_stream *tio;
int i; int i;
u32 path[] = {
[0] = 0,
[1] = 1 << 0,
[2] = 0,
[3] = 0,
[4] = 0,
[5] = 1 << 8
};
/* /*
* it is assuming that integrater is well understanding about * it is assuming that integrater is well understanding about
...@@ -70,16 +71,19 @@ static int rsnd_cmd_init(struct rsnd_mod *mod, ...@@ -70,16 +71,19 @@ static int rsnd_cmd_init(struct rsnd_mod *mod,
} else { } else {
struct rsnd_mod *src = rsnd_io_to_mod_src(io); struct rsnd_mod *src = rsnd_io_to_mod_src(io);
u32 path[] = { u8 cmd_case[] = {
[0] = 0x30000, [0] = 0x3,
[1] = 0x30001, [1] = 0x3,
[2] = 0x40000, [2] = 0x4,
[3] = 0x10000, [3] = 0x1,
[4] = 0x20000, [4] = 0x2,
[5] = 0x40100 [5] = 0x4,
[6] = 0x1,
[9] = 0x2,
}; };
data = path[rsnd_mod_id(src)]; data = path[rsnd_mod_id(src)] |
cmd_case[rsnd_mod_id(src)] << 16;
} }
dev_dbg(dev, "ctu/mix path = 0x%08x", data); dev_dbg(dev, "ctu/mix path = 0x%08x", data);
......
...@@ -454,6 +454,20 @@ static u32 rsnd_dmapp_read(struct rsnd_dma *dma, u32 reg) ...@@ -454,6 +454,20 @@ static u32 rsnd_dmapp_read(struct rsnd_dma *dma, u32 reg)
return ioread32(rsnd_dmapp_addr(dmac, dma, reg)); return ioread32(rsnd_dmapp_addr(dmac, dma, reg));
} }
static void rsnd_dmapp_bset(struct rsnd_dma *dma, u32 data, u32 mask, u32 reg)
{
struct rsnd_mod *mod = rsnd_mod_get(dma);
struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
struct rsnd_dma_ctrl *dmac = rsnd_priv_to_dmac(priv);
void __iomem *addr = rsnd_dmapp_addr(dmac, dma, reg);
u32 val = ioread32(addr);
val &= ~mask;
val |= (data & mask);
iowrite32(val, addr);
}
static int rsnd_dmapp_stop(struct rsnd_mod *mod, static int rsnd_dmapp_stop(struct rsnd_mod *mod,
struct rsnd_dai_stream *io, struct rsnd_dai_stream *io,
struct rsnd_priv *priv) struct rsnd_priv *priv)
...@@ -461,10 +475,10 @@ static int rsnd_dmapp_stop(struct rsnd_mod *mod, ...@@ -461,10 +475,10 @@ static int rsnd_dmapp_stop(struct rsnd_mod *mod,
struct rsnd_dma *dma = rsnd_mod_to_dma(mod); struct rsnd_dma *dma = rsnd_mod_to_dma(mod);
int i; int i;
rsnd_dmapp_write(dma, 0, PDMACHCR); rsnd_dmapp_bset(dma, 0, PDMACHCR_DE, PDMACHCR);
for (i = 0; i < 1024; i++) { for (i = 0; i < 1024; i++) {
if (0 == rsnd_dmapp_read(dma, PDMACHCR)) if (0 == (rsnd_dmapp_read(dma, PDMACHCR) & PDMACHCR_DE))
return 0; return 0;
udelay(1); udelay(1);
} }
......
...@@ -64,7 +64,11 @@ static int rsnd_ssiu_init(struct rsnd_mod *mod, ...@@ -64,7 +64,11 @@ static int rsnd_ssiu_init(struct rsnd_mod *mod,
mask1 = (1 << 4) | (1 << 20); /* mask sync bit */ mask1 = (1 << 4) | (1 << 20); /* mask sync bit */
mask2 = (1 << 4); /* mask sync bit */ mask2 = (1 << 4); /* mask sync bit */
val1 = val2 = 0; val1 = val2 = 0;
if (rsnd_ssi_is_pin_sharing(io)) { if (id == 8) {
/*
* SSI8 pin is sharing with SSI7, nothing to do.
*/
} else if (rsnd_ssi_is_pin_sharing(io)) {
int shift = -1; int shift = -1;
switch (id) { switch (id) {
......
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