diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-03-05 09:30:50 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-05 19:02:47 -0500 |
commit | 17ec38a8b6d95100a585ed66ccc7bada13e09d0d (patch) | |
tree | ef3d7afbe72e450611232c6267b215d54c2e2d97 | |
parent | 60282ede6b73d6ac7b571df5c65fa6a77db1a4a2 (diff) |
ASoC: imx: move phycore audmux call into ASoC machine driver
It moves phycore audmux configuration call from board file into ASoC
machine driver phycore-ac97 to ease converting audmux into a platform
driver later.
It moves phycore audmux configuration call from board file into ASoC
machine driver phycore-ac97, so that it gets aligned with wm1133-ev1
and mx27vis-aic32x4, and more importantly it will ease the moving of
audmux into sound/soc/imx as a platform driver later.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | arch/arm/mach-imx/mach-pca100.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-pcm043.c | 13 | ||||
-rw-r--r-- | sound/soc/imx/phycore-ac97.c | 26 |
3 files changed, 25 insertions, 27 deletions
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index d3b9c6b5edde..541152e450c4 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
37 | #include <mach/iomux-mx27.h> | 37 | #include <mach/iomux-mx27.h> |
38 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
39 | #include <mach/audmux.h> | ||
40 | #include <mach/irqs.h> | 39 | #include <mach/irqs.h> |
41 | #include <mach/ulpi.h> | 40 | #include <mach/ulpi.h> |
42 | 41 | ||
@@ -359,18 +358,6 @@ static void __init pca100_init(void) | |||
359 | 358 | ||
360 | imx27_soc_init(); | 359 | imx27_soc_init(); |
361 | 360 | ||
362 | /* SSI unit */ | ||
363 | mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0, | ||
364 | MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */ | ||
365 | MXC_AUDMUX_V1_PCR_TFCSEL(3) | | ||
366 | MXC_AUDMUX_V1_PCR_TCLKDIR | /* clock is output */ | ||
367 | MXC_AUDMUX_V1_PCR_RXDSEL(3)); | ||
368 | mxc_audmux_v1_configure_port(3, | ||
369 | MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */ | ||
370 | MXC_AUDMUX_V1_PCR_TFCSEL(0) | | ||
371 | MXC_AUDMUX_V1_PCR_TFSDIR | | ||
372 | MXC_AUDMUX_V1_PCR_RXDSEL(0)); | ||
373 | |||
374 | ret = mxc_gpio_setup_multiple_pins(pca100_pins, | 361 | ret = mxc_gpio_setup_multiple_pins(pca100_pins, |
375 | ARRAY_SIZE(pca100_pins), "PCA100"); | 362 | ARRAY_SIZE(pca100_pins), "PCA100"); |
376 | if (ret) | 363 | if (ret) |
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c index 06dc106519ae..237474fcca23 100644 --- a/arch/arm/mach-imx/mach-pcm043.c +++ b/arch/arm/mach-imx/mach-pcm043.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <mach/common.h> | 37 | #include <mach/common.h> |
38 | #include <mach/iomux-mx35.h> | 38 | #include <mach/iomux-mx35.h> |
39 | #include <mach/ulpi.h> | 39 | #include <mach/ulpi.h> |
40 | #include <mach/audmux.h> | ||
41 | 40 | ||
42 | #include "devices-imx35.h" | 41 | #include "devices-imx35.h" |
43 | 42 | ||
@@ -362,18 +361,6 @@ static void __init pcm043_init(void) | |||
362 | 361 | ||
363 | mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads)); | 362 | mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads)); |
364 | 363 | ||
365 | mxc_audmux_v2_configure_port(3, | ||
366 | MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */ | ||
367 | MXC_AUDMUX_V2_PTCR_TFSEL(0) | | ||
368 | MXC_AUDMUX_V2_PTCR_TFSDIR, | ||
369 | MXC_AUDMUX_V2_PDCR_RXDSEL(0)); | ||
370 | |||
371 | mxc_audmux_v2_configure_port(0, | ||
372 | MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */ | ||
373 | MXC_AUDMUX_V2_PTCR_TCSEL(3) | | ||
374 | MXC_AUDMUX_V2_PTCR_TCLKDIR, /* clock is output */ | ||
375 | MXC_AUDMUX_V2_PDCR_RXDSEL(3)); | ||
376 | |||
377 | imx35_add_fec(NULL); | 364 | imx35_add_fec(NULL); |
378 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 365 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
379 | imx35_add_imx2_wdt(NULL); | 366 | imx35_add_imx2_wdt(NULL); |
diff --git a/sound/soc/imx/phycore-ac97.c b/sound/soc/imx/phycore-ac97.c index 6ac12111de6a..a59692e740b4 100644 --- a/sound/soc/imx/phycore-ac97.c +++ b/sound/soc/imx/phycore-ac97.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <sound/pcm.h> | 18 | #include <sound/pcm.h> |
19 | #include <sound/soc.h> | 19 | #include <sound/soc.h> |
20 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
21 | #include <mach/audmux.h> | ||
21 | 22 | ||
22 | static struct snd_soc_card imx_phycore; | 23 | static struct snd_soc_card imx_phycore; |
23 | 24 | ||
@@ -50,9 +51,32 @@ static int __init imx_phycore_init(void) | |||
50 | { | 51 | { |
51 | int ret; | 52 | int ret; |
52 | 53 | ||
53 | if (!machine_is_pcm043() && !machine_is_pca100()) | 54 | if (machine_is_pca100()) { |
55 | mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0, | ||
56 | MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */ | ||
57 | MXC_AUDMUX_V1_PCR_TFCSEL(3) | | ||
58 | MXC_AUDMUX_V1_PCR_TCLKDIR | /* clock is output */ | ||
59 | MXC_AUDMUX_V1_PCR_RXDSEL(3)); | ||
60 | mxc_audmux_v1_configure_port(3, | ||
61 | MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */ | ||
62 | MXC_AUDMUX_V1_PCR_TFCSEL(0) | | ||
63 | MXC_AUDMUX_V1_PCR_TFSDIR | | ||
64 | MXC_AUDMUX_V1_PCR_RXDSEL(0)); | ||
65 | } else if (machine_is_pcm043()) { | ||
66 | mxc_audmux_v2_configure_port(3, | ||
67 | MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */ | ||
68 | MXC_AUDMUX_V2_PTCR_TFSEL(0) | | ||
69 | MXC_AUDMUX_V2_PTCR_TFSDIR, | ||
70 | MXC_AUDMUX_V2_PDCR_RXDSEL(0)); | ||
71 | mxc_audmux_v2_configure_port(0, | ||
72 | MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */ | ||
73 | MXC_AUDMUX_V2_PTCR_TCSEL(3) | | ||
74 | MXC_AUDMUX_V2_PTCR_TCLKDIR, /* clock is output */ | ||
75 | MXC_AUDMUX_V2_PDCR_RXDSEL(3)); | ||
76 | } else { | ||
54 | /* return happy. We might run on a totally different machine */ | 77 | /* return happy. We might run on a totally different machine */ |
55 | return 0; | 78 | return 0; |
79 | } | ||
56 | 80 | ||
57 | imx_phycore_snd_ac97_device = platform_device_alloc("soc-audio", -1); | 81 | imx_phycore_snd_ac97_device = platform_device_alloc("soc-audio", -1); |
58 | if (!imx_phycore_snd_ac97_device) | 82 | if (!imx_phycore_snd_ac97_device) |