diff options
author | apatard@mandriva.com <apatard@mandriva.com> | 2010-05-31 07:49:12 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-05-31 08:16:37 -0400 |
commit | 49106c729053b3c7c963a988aeaf00aa2424a7aa (patch) | |
tree | 988788b5aa9c559ba1c185e73271314aeb41b59f /arch/arm/mach-kirkwood/common.c | |
parent | 72ed5a8c9b057aeb779d161ac6fab1e98f091697 (diff) |
orion/kirkwood: add audio functions.
This patch add audio related definitions and functions
Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'arch/arm/mach-kirkwood/common.c')
-rw-r--r-- | arch/arm/mach-kirkwood/common.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 6072eaa5e66..e1f3efedbcf 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <asm/mach/time.h> | 25 | #include <asm/mach/time.h> |
26 | #include <mach/kirkwood.h> | 26 | #include <mach/kirkwood.h> |
27 | #include <mach/bridge-regs.h> | 27 | #include <mach/bridge-regs.h> |
28 | #include <plat/audio.h> | ||
28 | #include <plat/cache-feroceon-l2.h> | 29 | #include <plat/cache-feroceon-l2.h> |
29 | #include <plat/ehci-orion.h> | 30 | #include <plat/ehci-orion.h> |
30 | #include <plat/mvsdio.h> | 31 | #include <plat/mvsdio.h> |
@@ -864,6 +865,42 @@ struct sys_timer kirkwood_timer = { | |||
864 | .init = kirkwood_timer_init, | 865 | .init = kirkwood_timer_init, |
865 | }; | 866 | }; |
866 | 867 | ||
868 | /***************************************************************************** | ||
869 | * Audio | ||
870 | ****************************************************************************/ | ||
871 | static struct resource kirkwood_i2s_resources[] = { | ||
872 | [0] = { | ||
873 | .start = AUDIO_PHYS_BASE, | ||
874 | .end = AUDIO_PHYS_BASE + SZ_16K - 1, | ||
875 | .flags = IORESOURCE_MEM, | ||
876 | }, | ||
877 | [1] = { | ||
878 | .start = IRQ_KIRKWOOD_I2S, | ||
879 | .end = IRQ_KIRKWOOD_I2S, | ||
880 | .flags = IORESOURCE_IRQ, | ||
881 | }, | ||
882 | }; | ||
883 | |||
884 | static struct kirkwood_asoc_platform_data kirkwood_i2s_data = { | ||
885 | .dram = &kirkwood_mbus_dram_info, | ||
886 | .burst = 128, | ||
887 | }; | ||
888 | |||
889 | static struct platform_device kirkwood_i2s_device = { | ||
890 | .name = "kirkwood-i2s", | ||
891 | .id = -1, | ||
892 | .num_resources = ARRAY_SIZE(kirkwood_i2s_resources), | ||
893 | .resource = kirkwood_i2s_resources, | ||
894 | .dev = { | ||
895 | .platform_data = &kirkwood_i2s_data, | ||
896 | }, | ||
897 | }; | ||
898 | |||
899 | void __init kirkwood_audio_init(void) | ||
900 | { | ||
901 | kirkwood_clk_ctrl |= CGC_AUDIO; | ||
902 | platform_device_register(&kirkwood_i2s_device); | ||
903 | } | ||
867 | 904 | ||
868 | /***************************************************************************** | 905 | /***************************************************************************** |
869 | * General | 906 | * General |
@@ -923,6 +960,7 @@ void __init kirkwood_init(void) | |||
923 | kirkwood_spi_plat_data.tclk = kirkwood_tclk; | 960 | kirkwood_spi_plat_data.tclk = kirkwood_tclk; |
924 | kirkwood_uart0_data[0].uartclk = kirkwood_tclk; | 961 | kirkwood_uart0_data[0].uartclk = kirkwood_tclk; |
925 | kirkwood_uart1_data[0].uartclk = kirkwood_tclk; | 962 | kirkwood_uart1_data[0].uartclk = kirkwood_tclk; |
963 | kirkwood_i2s_data.tclk = kirkwood_tclk; | ||
926 | 964 | ||
927 | /* | 965 | /* |
928 | * Disable propagation of mbus errors to the CPU local bus, | 966 | * Disable propagation of mbus errors to the CPU local bus, |