diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-08-05 05:17:01 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-08-05 05:17:01 -0400 |
commit | e71981343ad29b5d929f82ac56c0b27b8ea0e540 (patch) | |
tree | 47135be4252faecbc0e5508658a58f8afd197fff /arch/arm/mach-kirkwood | |
parent | 2603798070a80d76e7e6d2992ba4ec74addcec90 (diff) | |
parent | bda7d2a862e6b788bca2d02d38a07966a9c92e48 (diff) |
Merge branch 'topic/asoc' into for-linus
Diffstat (limited to 'arch/arm/mach-kirkwood')
-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/mach-kirkwood/openrd-setup.c | 13 |
4 files changed, 56 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/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c index ad3f1ec33796..e36067ad3aca 100644 --- a/arch/arm/mach-kirkwood/openrd-setup.c +++ b/arch/arm/mach-kirkwood/openrd-setup.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/mtd/partitions.h> | 15 | #include <linux/mtd/partitions.h> |
16 | #include <linux/ata_platform.h> | 16 | #include <linux/ata_platform.h> |
17 | #include <linux/mv643xx_eth.h> | 17 | #include <linux/mv643xx_eth.h> |
18 | #include <linux/i2c.h> | ||
18 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
19 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
20 | #include <mach/kirkwood.h> | 21 | #include <mach/kirkwood.h> |
@@ -60,6 +61,12 @@ static unsigned int openrd_mpp_config[] __initdata = { | |||
60 | 0 | 61 | 0 |
61 | }; | 62 | }; |
62 | 63 | ||
64 | static struct i2c_board_info i2c_board_info[] __initdata = { | ||
65 | { | ||
66 | I2C_BOARD_INFO("cs42l51", 0x4a), | ||
67 | }, | ||
68 | }; | ||
69 | |||
63 | static void __init openrd_init(void) | 70 | static void __init openrd_init(void) |
64 | { | 71 | { |
65 | /* | 72 | /* |
@@ -80,6 +87,12 @@ static void __init openrd_init(void) | |||
80 | kirkwood_sdio_init(&openrd_mvsdio_data); | 87 | kirkwood_sdio_init(&openrd_mvsdio_data); |
81 | 88 | ||
82 | kirkwood_i2c_init(); | 89 | kirkwood_i2c_init(); |
90 | |||
91 | if (machine_is_openrd_client()) { | ||
92 | i2c_register_board_info(0, i2c_board_info, | ||
93 | ARRAY_SIZE(i2c_board_info)); | ||
94 | kirkwood_audio_init(); | ||
95 | } | ||
83 | } | 96 | } |
84 | 97 | ||
85 | static int __init openrd_pci_init(void) | 98 | static int __init openrd_pci_init(void) |