aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Zhao <richard.zhao@freescale.com>2011-12-31 20:39:13 +0800
committerEric Miao <eric.miao@linaro.org>2012-01-11 21:53:25 +0800
commit01382574cc0f67e2c9652acacfb141df1eb29f4e (patch)
treea40ed6e99283760fe47e3c40d537a650af3f5ca8
parenteefd5d2c7e1a8853ca5427689b82fc196caca2b0 (diff)
downloadlinux-linaro-01382574cc0f67e2c9652acacfb141df1eb29f4e.tar.gz
make sgtl5000 work -- need to split to small patch
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
-rw-r--r--arch/arm/boot/dts/imx6q.dtsi2
-rw-r--r--arch/arm/mach-imx/clock-imx6q.c3
-rw-r--r--arch/arm/mach-imx/mach-imx6q.c12
-rw-r--r--arch/arm/plat-mxc/include/mach/dma.h3
-rw-r--r--drivers/dma/imx-sdma.c2
-rw-r--r--drivers/regulator/fixed.c2
-rw-r--r--sound/soc/imx/imx-sgtl5000.c8
7 files changed, 22 insertions, 10 deletions
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
index 56a626e4c32..21ae86c42af 100644
--- a/arch/arm/boot/dts/imx6q.dtsi
+++ b/arch/arm/boot/dts/imx6q.dtsi
@@ -422,7 +422,7 @@
compatible = "fsl,imx6q-sdma", "fsl,imx35-sdma";
reg = <0x020ec000 0x4000>;
interrupts = <0 2 0x04>;
- fsl,sdma-ram-script-name = "sdma-imx6q-to1.bin";
+ fsl,sdma-ram-script-name = "imx/sdma/sdma-imx6q-to1.bin";
};
};
diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c
index f29f3be8de2..48983636a23 100644
--- a/arch/arm/mach-imx/clock-imx6q.c
+++ b/arch/arm/mach-imx/clock-imx6q.c
@@ -1668,6 +1668,7 @@ static struct multiplexer cko1_mux = {
&pll2_bus,
&pll1_sys,
&pll5_video,
+ &dummy_clk,
&axi_clk,
&enfc_clk,
&ipu1_di0_clk,
@@ -1749,7 +1750,7 @@ static int _clk_set_parent(struct clk *clk, struct clk *parent)
break;
i++;
}
- if (!m->parents[i])
+ if (!m->parents[i] || m->parents[i] == &dummy_clk)
return -EINVAL;
val = readl_relaxed(m->reg);
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index d273c0ab189..7be60b27f13 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -35,6 +35,12 @@
#include <mach/mxc_vpu.h>
static iomux_v3_cfg_t imx6q_sabrelite_pads[] = {
+ /* AUDMUX */
+ MX6Q_PAD_SD2_DAT0__AUDMUX_AUD4_RXD,
+ MX6Q_PAD_SD2_DAT3__AUDMUX_AUD4_TXC,
+ MX6Q_PAD_SD2_DAT2__AUDMUX_AUD4_TXD,
+ MX6Q_PAD_SD2_DAT1__AUDMUX_AUD4_TXFS,
+
/* DISPLAY */
MX6Q_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK,
MX6Q_PAD_DI0_PIN15__IPU1_DI0_PIN15,
@@ -66,6 +72,11 @@ static iomux_v3_cfg_t imx6q_sabrelite_pads[] = {
MX6Q_PAD_DISP0_DAT23__IPU1_DISP0_DAT_23,
/* PWM1 */
MX6Q_PAD_SD1_CMD__PWM4_PWMO,
+ /* sgtl5000 clock */
+ MX6Q_PAD_GPIO_0__CCM_CLKO,
+ /* I2C1, SGTL5000 */
+ MX6Q_PAD_EIM_D21__I2C1_SCL, /* GPIO3[21] */
+ MX6Q_PAD_EIM_D28__I2C1_SDA, /* GPIO3[28] */
/* I2C2 */
MX6Q_PAD_KEY_COL3__I2C2_SCL,
MX6Q_PAD_KEY_ROW3__I2C2_SDA,
@@ -144,7 +155,6 @@ static int mx6_sabrelite_sgtl5000_init(void)
clk_put(clko);
return -1;
}
-
mx6_sabrelite_audio_data.sysclk = rate;
clk_set_rate(clko, rate);
clk_enable(clko);
diff --git a/arch/arm/plat-mxc/include/mach/dma.h b/arch/arm/plat-mxc/include/mach/dma.h
index dd41a6475be..2003f44fca5 100644
--- a/arch/arm/plat-mxc/include/mach/dma.h
+++ b/arch/arm/plat-mxc/include/mach/dma.h
@@ -67,8 +67,7 @@ static inline int imx_dma_is_ipu(struct dma_chan *chan)
static inline int imx_dma_is_general_purpose(struct dma_chan *chan)
{
- return !strcmp(dev_name(chan->device->dev), "imx31-sdma") ||
- !strcmp(dev_name(chan->device->dev), "imx35-sdma") ||
+ return strstr(dev_name(chan->device->dev), "sdma") ||
!strcmp(dev_name(chan->device->dev), "imx-dma");
}
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 3d3e75aeeab..248469b051b 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -403,6 +403,7 @@ static int sdma_run_channel(struct sdma_channel *sdmac)
init_completion(&sdmac->done);
+ wmb();
__raw_writel(1 << channel, sdma->regs + SDMA_H_START);
ret = wait_for_completion_timeout(&sdmac->done, HZ);
@@ -809,6 +810,7 @@ out:
static void sdma_enable_channel(struct sdma_engine *sdma, int channel)
{
+ wmb();
__raw_writel(1 << channel, sdma->regs + SDMA_H_START);
}
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 5a214b4c7c3..eedc9939632 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -244,7 +244,7 @@ static int __devinit reg_fixed_voltage_probe(struct platform_device *pdev)
}
drvdata->dev = regulator_register(&drvdata->desc, &pdev->dev,
- config->init_data, drvdata, NULL);
+ config->init_data, drvdata, pdev->dev.of_node);
if (IS_ERR(drvdata->dev)) {
ret = PTR_ERR(drvdata->dev);
dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret);
diff --git a/sound/soc/imx/imx-sgtl5000.c b/sound/soc/imx/imx-sgtl5000.c
index 0ff8ee00b3c..2b025631779 100644
--- a/sound/soc/imx/imx-sgtl5000.c
+++ b/sound/soc/imx/imx-sgtl5000.c
@@ -275,9 +275,9 @@ static struct snd_soc_dai_link imx_sgtl5000_dai[] = {
.name = "HiFi",
.stream_name = "HiFi",
.codec_dai_name = "sgtl5000",
- .codec_name = "sgtl5000.1-000a",
- .cpu_dai_name = "imx-ssi.1",
- .platform_name = "imx-pcm-audio.1",
+ .codec_name = "sgtl5000.0-000a",
+ .cpu_dai_name = "202c000.ssi",
+ .platform_name = "imx-pcm-audio",
.init = imx_3stack_sgtl5000_init,
.ops = &imx_sgtl5000_hifi_ops,
},
@@ -361,7 +361,7 @@ static int __init imx_sgtl5000_init(void)
if (ret)
return -ENOMEM;
- if (machine_is_mx35_3ds())
+ if (machine_is_mx35_3ds() || of_machine_is_compatible("fsl,imx6q-sabrelite"))
imx_sgtl5000_dai[0].codec_name = "sgtl5000.0-000a";
else
imx_sgtl5000_dai[0].codec_name = "sgtl5000.1-000a";