mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
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>
This commit is contained in:
parent
60282ede6b
commit
17ec38a8b6
@ -36,7 +36,6 @@
|
|||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <mach/iomux-mx27.h>
|
#include <mach/iomux-mx27.h>
|
||||||
#include <asm/mach/time.h>
|
#include <asm/mach/time.h>
|
||||||
#include <mach/audmux.h>
|
|
||||||
#include <mach/irqs.h>
|
#include <mach/irqs.h>
|
||||||
#include <mach/ulpi.h>
|
#include <mach/ulpi.h>
|
||||||
|
|
||||||
@ -359,18 +358,6 @@ static void __init pca100_init(void)
|
|||||||
|
|
||||||
imx27_soc_init();
|
imx27_soc_init();
|
||||||
|
|
||||||
/* SSI unit */
|
|
||||||
mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0,
|
|
||||||
MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */
|
|
||||||
MXC_AUDMUX_V1_PCR_TFCSEL(3) |
|
|
||||||
MXC_AUDMUX_V1_PCR_TCLKDIR | /* clock is output */
|
|
||||||
MXC_AUDMUX_V1_PCR_RXDSEL(3));
|
|
||||||
mxc_audmux_v1_configure_port(3,
|
|
||||||
MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */
|
|
||||||
MXC_AUDMUX_V1_PCR_TFCSEL(0) |
|
|
||||||
MXC_AUDMUX_V1_PCR_TFSDIR |
|
|
||||||
MXC_AUDMUX_V1_PCR_RXDSEL(0));
|
|
||||||
|
|
||||||
ret = mxc_gpio_setup_multiple_pins(pca100_pins,
|
ret = mxc_gpio_setup_multiple_pins(pca100_pins,
|
||||||
ARRAY_SIZE(pca100_pins), "PCA100");
|
ARRAY_SIZE(pca100_pins), "PCA100");
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
#include <mach/common.h>
|
#include <mach/common.h>
|
||||||
#include <mach/iomux-mx35.h>
|
#include <mach/iomux-mx35.h>
|
||||||
#include <mach/ulpi.h>
|
#include <mach/ulpi.h>
|
||||||
#include <mach/audmux.h>
|
|
||||||
|
|
||||||
#include "devices-imx35.h"
|
#include "devices-imx35.h"
|
||||||
|
|
||||||
@ -362,18 +361,6 @@ static void __init pcm043_init(void)
|
|||||||
|
|
||||||
mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads));
|
mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads));
|
||||||
|
|
||||||
mxc_audmux_v2_configure_port(3,
|
|
||||||
MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */
|
|
||||||
MXC_AUDMUX_V2_PTCR_TFSEL(0) |
|
|
||||||
MXC_AUDMUX_V2_PTCR_TFSDIR,
|
|
||||||
MXC_AUDMUX_V2_PDCR_RXDSEL(0));
|
|
||||||
|
|
||||||
mxc_audmux_v2_configure_port(0,
|
|
||||||
MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */
|
|
||||||
MXC_AUDMUX_V2_PTCR_TCSEL(3) |
|
|
||||||
MXC_AUDMUX_V2_PTCR_TCLKDIR, /* clock is output */
|
|
||||||
MXC_AUDMUX_V2_PDCR_RXDSEL(3));
|
|
||||||
|
|
||||||
imx35_add_fec(NULL);
|
imx35_add_fec(NULL);
|
||||||
platform_add_devices(devices, ARRAY_SIZE(devices));
|
platform_add_devices(devices, ARRAY_SIZE(devices));
|
||||||
imx35_add_imx2_wdt(NULL);
|
imx35_add_imx2_wdt(NULL);
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <sound/pcm.h>
|
#include <sound/pcm.h>
|
||||||
#include <sound/soc.h>
|
#include <sound/soc.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
#include <mach/audmux.h>
|
||||||
|
|
||||||
static struct snd_soc_card imx_phycore;
|
static struct snd_soc_card imx_phycore;
|
||||||
|
|
||||||
@ -50,9 +51,32 @@ static int __init imx_phycore_init(void)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!machine_is_pcm043() && !machine_is_pca100())
|
if (machine_is_pca100()) {
|
||||||
|
mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0,
|
||||||
|
MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */
|
||||||
|
MXC_AUDMUX_V1_PCR_TFCSEL(3) |
|
||||||
|
MXC_AUDMUX_V1_PCR_TCLKDIR | /* clock is output */
|
||||||
|
MXC_AUDMUX_V1_PCR_RXDSEL(3));
|
||||||
|
mxc_audmux_v1_configure_port(3,
|
||||||
|
MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */
|
||||||
|
MXC_AUDMUX_V1_PCR_TFCSEL(0) |
|
||||||
|
MXC_AUDMUX_V1_PCR_TFSDIR |
|
||||||
|
MXC_AUDMUX_V1_PCR_RXDSEL(0));
|
||||||
|
} else if (machine_is_pcm043()) {
|
||||||
|
mxc_audmux_v2_configure_port(3,
|
||||||
|
MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */
|
||||||
|
MXC_AUDMUX_V2_PTCR_TFSEL(0) |
|
||||||
|
MXC_AUDMUX_V2_PTCR_TFSDIR,
|
||||||
|
MXC_AUDMUX_V2_PDCR_RXDSEL(0));
|
||||||
|
mxc_audmux_v2_configure_port(0,
|
||||||
|
MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */
|
||||||
|
MXC_AUDMUX_V2_PTCR_TCSEL(3) |
|
||||||
|
MXC_AUDMUX_V2_PTCR_TCLKDIR, /* clock is output */
|
||||||
|
MXC_AUDMUX_V2_PDCR_RXDSEL(3));
|
||||||
|
} else {
|
||||||
/* return happy. We might run on a totally different machine */
|
/* return happy. We might run on a totally different machine */
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
imx_phycore_snd_ac97_device = platform_device_alloc("soc-audio", -1);
|
imx_phycore_snd_ac97_device = platform_device_alloc("soc-audio", -1);
|
||||||
if (!imx_phycore_snd_ac97_device)
|
if (!imx_phycore_snd_ac97_device)
|
||||||
|
Loading…
Reference in New Issue
Block a user