aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-07 20:07:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-07 20:07:31 -0400
commitfaa38b5e0e092914764cdba9f83d31a3f794d182 (patch)
treeb3e5921bdc36378033b4910eb4f29cb0dfc486e0 /arch/arm/mach-kirkwood
parent78417334b5cb6e1f915b8fdcc4fce3f1a1b4420c (diff)
parent74bf40f0793fed9e01eb6164c2ce63e8c27ca205 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (214 commits) ALSA: hda - Add pin-fix for HP dc5750 ALSA: als4000: Fix potentially invalid DMA mode setup ALSA: als4000: enable burst mode ALSA: hda - Fix initial capsrc selection in patch_alc269() ASoC: TWL4030: Capture route runtime DAPM ordering fix ALSA: hda - Add PC-beep whitelist for an Intel board ALSA: hda - More relax for pending period handling ALSA: hda - Define AC_FMT_* constants ALSA: hda - Fix beep frequency on IDT 92HD73xx and 92HD71Bxx codecs ALSA: hda - Add support for HDMI HBR passthrough ALSA: hda - Set Stream Type in Stream Format according to AES0 ALSA: hda - Fix Thinkpad X300 so SPDIF is not exposed ALSA: hda - FIX to not expose SPDIF on Thinkpad X301, since it does not have the ability to use SPDIF ASoC: wm9081: fix resource reclaim in wm9081_register error path ASoC: wm8978: fix a memory leak if a wm8978_register fail ASoC: wm8974: fix a memory leak if another WM8974 is registered ASoC: wm8961: fix resource reclaim in wm8961_register error path ASoC: wm8955: fix resource reclaim in wm8955_register error path ASoC: wm8940: fix a memory leak if wm8940_register return error ASoC: wm8904: fix resource reclaim in wm8904_register error path ...
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r--arch/arm/mach-kirkwood/common.c38
-rw-r--r--arch/arm/mach-kirkwood/common.h2
-rw-r--r--arch/arm/mach-kirkwood/include/mach/kirkwood.h3
-rw-r--r--arch/arm/mach-kirkwood/openrd-setup.c13
4 files changed, 56 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 9dd67c7b4459..1c82d4290dad 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>
@@ -871,6 +872,42 @@ struct sys_timer kirkwood_timer = {
871 .init = kirkwood_timer_init, 872 .init = kirkwood_timer_init,
872}; 873};
873 874
875/*****************************************************************************
876 * Audio
877 ****************************************************************************/
878static struct resource kirkwood_i2s_resources[] = {
879 [0] = {
880 .start = AUDIO_PHYS_BASE,
881 .end = AUDIO_PHYS_BASE + SZ_16K - 1,
882 .flags = IORESOURCE_MEM,
883 },
884 [1] = {
885 .start = IRQ_KIRKWOOD_I2S,
886 .end = IRQ_KIRKWOOD_I2S,
887 .flags = IORESOURCE_IRQ,
888 },
889};
890
891static struct kirkwood_asoc_platform_data kirkwood_i2s_data = {
892 .dram = &kirkwood_mbus_dram_info,
893 .burst = 128,
894};
895
896static struct platform_device kirkwood_i2s_device = {
897 .name = "kirkwood-i2s",
898 .id = -1,
899 .num_resources = ARRAY_SIZE(kirkwood_i2s_resources),
900 .resource = kirkwood_i2s_resources,
901 .dev = {
902 .platform_data = &kirkwood_i2s_data,
903 },
904};
905
906void __init kirkwood_audio_init(void)
907{
908 kirkwood_clk_ctrl |= CGC_AUDIO;
909 platform_device_register(&kirkwood_i2s_device);
910}
874 911
875/***************************************************************************** 912/*****************************************************************************
876 * General 913 * General
@@ -939,6 +976,7 @@ void __init kirkwood_init(void)
939 kirkwood_spi_plat_data.tclk = kirkwood_tclk; 976 kirkwood_spi_plat_data.tclk = kirkwood_tclk;
940 kirkwood_uart0_data[0].uartclk = kirkwood_tclk; 977 kirkwood_uart0_data[0].uartclk = kirkwood_tclk;
941 kirkwood_uart1_data[0].uartclk = kirkwood_tclk; 978 kirkwood_uart1_data[0].uartclk = kirkwood_tclk;
979 kirkwood_i2s_data.tclk = kirkwood_tclk;
942 980
943 /* 981 /*
944 * Disable propagation of mbus errors to the CPU local bus, 982 * 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 5b2c1c18d641..95bb0a73adfb 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -17,6 +17,7 @@ struct mv_sata_platform_data;
17struct mvsdio_platform_data; 17struct mvsdio_platform_data;
18struct mtd_partition; 18struct mtd_partition;
19struct mtd_info; 19struct mtd_info;
20struct kirkwood_asoc_platform_data;
20 21
21#define KW_PCIE0 (1 << 0) 22#define KW_PCIE0 (1 << 0)
22#define KW_PCIE1 (1 << 1) 23#define KW_PCIE1 (1 << 1)
@@ -46,6 +47,7 @@ void kirkwood_uart0_init(void);
46void kirkwood_uart1_init(void); 47void kirkwood_uart1_init(void);
47void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay); 48void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay);
48void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *)); 49void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *));
50void kirkwood_audio_init(void);
49 51
50extern int kirkwood_tclk; 52extern int kirkwood_tclk;
51extern struct sys_timer kirkwood_timer; 53extern 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 d141af4c2744..93fc2ec95e76 100644
--- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h
+++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
@@ -111,6 +111,9 @@
111 111
112#define SDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x90000) 112#define SDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x90000)
113 113
114#define AUDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0xA0000)
115#define AUDIO_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0xA0000)
116
114/* 117/*
115 * Supported devices and revisions. 118 * Supported devices and revisions.
116 */ 119 */
diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c
index fd64cd2b4e0a..fd06be618815 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
64static struct i2c_board_info i2c_board_info[] __initdata = {
65 {
66 I2C_BOARD_INFO("cs42l51", 0x4a),
67 },
68};
69
63static void __init openrd_init(void) 70static void __init openrd_init(void)
64{ 71{
65 /* 72 /*
@@ -86,6 +93,12 @@ static void __init openrd_init(void)
86 kirkwood_sdio_init(&openrd_mvsdio_data); 93 kirkwood_sdio_init(&openrd_mvsdio_data);
87 94
88 kirkwood_i2c_init(); 95 kirkwood_i2c_init();
96
97 if (machine_is_openrd_client()) {
98 i2c_register_board_info(0, i2c_board_info,
99 ARRAY_SIZE(i2c_board_info));
100 kirkwood_audio_init();
101 }
89} 102}
90 103
91static int __init openrd_pci_init(void) 104static int __init openrd_pci_init(void)