aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-10-25 04:00:30 -0400
committerTakashi Iwai <tiwai@suse.de>2010-10-25 04:00:30 -0400
commitaa5c14d5c0d3e4c587db4a1b220b9c86415c538f (patch)
tree0114637e8be2b38176e7e91e6cea3501b22cb66a /arch/arm/mach-ep93xx
parent79fc84c7e0d2fe89c4e82f3a26fd8b0d13c31703 (diff)
parentb11bdb5254ff17cb63e4ae5088b73fdcd2cc2602 (diff)
Merge branch 'topic/asoc' into for-linus
Conflicts: arch/powerpc/platforms/85xx/p1022_ds.c
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r--arch/arm/mach-ep93xx/core.c40
-rw-r--r--arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h1
-rw-r--r--arch/arm/mach-ep93xx/include/mach/platform.h1
-rw-r--r--arch/arm/mach-ep93xx/simone.c1
4 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 4cb55d3902f..ffdf87be295 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -776,9 +776,15 @@ static struct platform_device ep93xx_i2s_device = {
776 .resource = ep93xx_i2s_resource, 776 .resource = ep93xx_i2s_resource,
777}; 777};
778 778
779static struct platform_device ep93xx_pcm_device = {
780 .name = "ep93xx-pcm-audio",
781 .id = -1,
782};
783
779void __init ep93xx_register_i2s(void) 784void __init ep93xx_register_i2s(void)
780{ 785{
781 platform_device_register(&ep93xx_i2s_device); 786 platform_device_register(&ep93xx_i2s_device);
787 platform_device_register(&ep93xx_pcm_device);
782} 788}
783 789
784#define EP93XX_SYSCON_DEVCFG_I2S_MASK (EP93XX_SYSCON_DEVCFG_I2SONSSP | \ 790#define EP93XX_SYSCON_DEVCFG_I2S_MASK (EP93XX_SYSCON_DEVCFG_I2SONSSP | \
@@ -826,6 +832,40 @@ void ep93xx_i2s_release(void)
826} 832}
827EXPORT_SYMBOL(ep93xx_i2s_release); 833EXPORT_SYMBOL(ep93xx_i2s_release);
828 834
835/*************************************************************************
836 * EP93xx AC97 audio peripheral handling
837 *************************************************************************/
838static struct resource ep93xx_ac97_resources[] = {
839 {
840 .start = EP93XX_AAC_PHYS_BASE,
841 .end = EP93XX_AAC_PHYS_BASE + 0xb0 - 1,
842 .flags = IORESOURCE_MEM,
843 },
844 {
845 .start = IRQ_EP93XX_AACINTR,
846 .end = IRQ_EP93XX_AACINTR,
847 .flags = IORESOURCE_IRQ,
848 },
849};
850
851static struct platform_device ep93xx_ac97_device = {
852 .name = "ep93xx-ac97",
853 .id = -1,
854 .num_resources = ARRAY_SIZE(ep93xx_ac97_resources),
855 .resource = ep93xx_ac97_resources,
856};
857
858void __init ep93xx_register_ac97(void)
859{
860 /*
861 * Make sure that the AC97 pins are not used by I2S.
862 */
863 ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_I2SONAC97);
864
865 platform_device_register(&ep93xx_ac97_device);
866 platform_device_register(&ep93xx_pcm_device);
867}
868
829extern void ep93xx_gpio_init(void); 869extern void ep93xx_gpio_init(void);
830 870
831void __init ep93xx_init_devices(void) 871void __init ep93xx_init_devices(void)
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
index c54b3e56ba6..9ac4d105509 100644
--- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
+++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
@@ -105,6 +105,7 @@
105#define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc) 105#define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc)
106#define EP93XX_GPIO_EEDRIVE EP93XX_GPIO_REG(0xc8) 106#define EP93XX_GPIO_EEDRIVE EP93XX_GPIO_REG(0xc8)
107 107
108#define EP93XX_AAC_PHYS_BASE EP93XX_APB_PHYS(0x00080000)
108#define EP93XX_AAC_BASE EP93XX_APB_IOMEM(0x00080000) 109#define EP93XX_AAC_BASE EP93XX_APB_IOMEM(0x00080000)
109 110
110#define EP93XX_SPI_PHYS_BASE EP93XX_APB_PHYS(0x000a0000) 111#define EP93XX_SPI_PHYS_BASE EP93XX_APB_PHYS(0x000a0000)
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h
index 3330b36d79e..50660455b1d 100644
--- a/arch/arm/mach-ep93xx/include/mach/platform.h
+++ b/arch/arm/mach-ep93xx/include/mach/platform.h
@@ -61,6 +61,7 @@ void ep93xx_keypad_release_gpio(struct platform_device *pdev);
61void ep93xx_register_i2s(void); 61void ep93xx_register_i2s(void);
62int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config); 62int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config);
63void ep93xx_i2s_release(void); 63void ep93xx_i2s_release(void);
64void ep93xx_register_ac97(void);
64 65
65void ep93xx_init_devices(void); 66void ep93xx_init_devices(void);
66extern struct sys_timer ep93xx_timer; 67extern struct sys_timer ep93xx_timer;
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c
index 5dded588413..f5f81f9719b 100644
--- a/arch/arm/mach-ep93xx/simone.c
+++ b/arch/arm/mach-ep93xx/simone.c
@@ -61,6 +61,7 @@ static void __init simone_init_machine(void)
61 ep93xx_register_fb(&simone_fb_info); 61 ep93xx_register_fb(&simone_fb_info);
62 ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info, 62 ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info,
63 ARRAY_SIZE(simone_i2c_board_info)); 63 ARRAY_SIZE(simone_i2c_board_info));
64 ep93xx_register_ac97();
64} 65}
65 66
66MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board") 67MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")