diff options
author | Richard Zhao <richard.zhao@linaro.org> | 2012-03-05 09:30:52 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-05 19:02:55 -0500 |
commit | 3bc34a6143359d2bf19a5e79b9017aeffc6660ad (patch) | |
tree | 961e834e2a3fde9c3fe57e634f0a784d703627dc /arch/arm/mach-imx/mm-imx3.c | |
parent | 2405fc9728a3ed7dffc36bee68f0c36e4488212d (diff) |
ARM: imx: convert audmux to a platform driver
It coverts audmux to a platform driver, so that it can be moved into
sound/soc/imx and adopt device tree support later.
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
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>
Diffstat (limited to 'arch/arm/mach-imx/mm-imx3.c')
-rw-r--r-- | arch/arm/mach-imx/mm-imx3.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c index 31807d2a8b7b..2530c151b7b3 100644 --- a/arch/arm/mach-imx/mm-imx3.c +++ b/arch/arm/mach-imx/mm-imx3.c | |||
@@ -158,6 +158,10 @@ static struct sdma_platform_data imx31_sdma_pdata __initdata = { | |||
158 | .script_addrs = &imx31_to2_sdma_script, | 158 | .script_addrs = &imx31_to2_sdma_script, |
159 | }; | 159 | }; |
160 | 160 | ||
161 | static const struct resource imx31_audmux_res[] __initconst = { | ||
162 | DEFINE_RES_MEM(MX31_AUDMUX_BASE_ADDR, SZ_16K), | ||
163 | }; | ||
164 | |||
161 | void __init imx31_soc_init(void) | 165 | void __init imx31_soc_init(void) |
162 | { | 166 | { |
163 | int to_version = mx31_revision() >> 4; | 167 | int to_version = mx31_revision() >> 4; |
@@ -175,6 +179,8 @@ void __init imx31_soc_init(void) | |||
175 | } | 179 | } |
176 | 180 | ||
177 | imx_add_imx_sdma("imx31-sdma", MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata); | 181 | imx_add_imx_sdma("imx31-sdma", MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata); |
182 | platform_device_register_simple("imx31-audmux", 0, imx31_audmux_res, | ||
183 | ARRAY_SIZE(imx31_audmux_res)); | ||
178 | } | 184 | } |
179 | #endif /* ifdef CONFIG_SOC_IMX31 */ | 185 | #endif /* ifdef CONFIG_SOC_IMX31 */ |
180 | 186 | ||
@@ -241,6 +247,10 @@ static struct sdma_platform_data imx35_sdma_pdata __initdata = { | |||
241 | .script_addrs = &imx35_to2_sdma_script, | 247 | .script_addrs = &imx35_to2_sdma_script, |
242 | }; | 248 | }; |
243 | 249 | ||
250 | static const struct resource imx35_audmux_res[] __initconst = { | ||
251 | DEFINE_RES_MEM(MX35_AUDMUX_BASE_ADDR, SZ_16K), | ||
252 | }; | ||
253 | |||
244 | void __init imx35_soc_init(void) | 254 | void __init imx35_soc_init(void) |
245 | { | 255 | { |
246 | int to_version = mx35_revision() >> 4; | 256 | int to_version = mx35_revision() >> 4; |
@@ -259,5 +269,8 @@ void __init imx35_soc_init(void) | |||
259 | } | 269 | } |
260 | 270 | ||
261 | imx_add_imx_sdma("imx35-sdma", MX35_SDMA_BASE_ADDR, MX35_INT_SDMA, &imx35_sdma_pdata); | 271 | imx_add_imx_sdma("imx35-sdma", MX35_SDMA_BASE_ADDR, MX35_INT_SDMA, &imx35_sdma_pdata); |
272 | /* i.mx35 has the i.mx31 type audmux */ | ||
273 | platform_device_register_simple("imx31-audmux", 0, imx35_audmux_res, | ||
274 | ARRAY_SIZE(imx35_audmux_res)); | ||
262 | } | 275 | } |
263 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 276 | #endif /* ifdef CONFIG_SOC_IMX35 */ |