diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-kirkwood/common.c | 38 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/common.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/include/mach/kirkwood.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/audio.h | 11 |
4 files changed, 54 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 6072eaa5e66a..e1f3efedbcf1 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, |
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index 05e8a8a5692e..c9ab1cb3b39f 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h | |||
@@ -17,6 +17,7 @@ struct mv_sata_platform_data; | |||
17 | struct mvsdio_platform_data; | 17 | struct mvsdio_platform_data; |
18 | struct mtd_partition; | 18 | struct mtd_partition; |
19 | struct mtd_info; | 19 | struct mtd_info; |
20 | struct kirkwood_asoc_platform_data; | ||
20 | 21 | ||
21 | /* | 22 | /* |
22 | * Basic Kirkwood init functions used early by machine-setup. | 23 | * Basic Kirkwood init functions used early by machine-setup. |
@@ -43,6 +44,7 @@ void kirkwood_uart0_init(void); | |||
43 | void kirkwood_uart1_init(void); | 44 | void kirkwood_uart1_init(void); |
44 | void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay); | 45 | void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay); |
45 | void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *)); | 46 | void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *)); |
47 | void kirkwood_audio_init(void); | ||
46 | 48 | ||
47 | extern int kirkwood_tclk; | 49 | extern int kirkwood_tclk; |
48 | extern struct sys_timer kirkwood_timer; | 50 | extern struct sys_timer kirkwood_timer; |
diff --git a/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/arch/arm/mach-kirkwood/include/mach/kirkwood.h index a15cf0ee22bd..838151d0744b 100644 --- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h +++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h | |||
@@ -96,6 +96,9 @@ | |||
96 | 96 | ||
97 | #define SDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x90000) | 97 | #define SDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x90000) |
98 | 98 | ||
99 | #define AUDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0xA0000) | ||
100 | #define AUDIO_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0xA0000) | ||
101 | |||
99 | /* | 102 | /* |
100 | * Supported devices and revisions. | 103 | * Supported devices and revisions. |
101 | */ | 104 | */ |
diff --git a/arch/arm/plat-orion/include/plat/audio.h b/arch/arm/plat-orion/include/plat/audio.h new file mode 100644 index 000000000000..9cf1f781329b --- /dev/null +++ b/arch/arm/plat-orion/include/plat/audio.h | |||
@@ -0,0 +1,11 @@ | |||
1 | #ifndef __PLAT_AUDIO_H | ||
2 | #define __PLAT_AUDIO_H | ||
3 | |||
4 | #include <linux/mbus.h> | ||
5 | |||
6 | struct kirkwood_asoc_platform_data { | ||
7 | u32 tclk; | ||
8 | struct mbus_dram_target_info *dram; | ||
9 | int burst; | ||
10 | }; | ||
11 | #endif | ||