aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-davinci/include/mach/asp.h8
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c10
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c10
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c10
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c10
-rw-r--r--arch/arm/mach-omap2/board-overo.c10
-rw-r--r--arch/arm/mach-omap2/board-zoom2.c10
-rw-r--r--arch/arm/mach-s3c6400/include/mach/map.h2
-rw-r--r--arch/arm/plat-s3c/include/plat/audio.h48
-rw-r--r--arch/arm/plat-s3c/include/plat/devs.h3
-rw-r--r--arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h2
-rw-r--r--arch/arm/plat-s3c64xx/dev-audio.c101
-rw-r--r--arch/sh/boards/mach-hp6xx/setup.c55
-rw-r--r--arch/sh/boards/mach-se/7724/setup.c3
-rw-r--r--arch/sh/include/mach-common/mach/hp6xx.h4
15 files changed, 247 insertions, 39 deletions
diff --git a/arch/arm/mach-davinci/include/mach/asp.h b/arch/arm/mach-davinci/include/mach/asp.h
index 18e4ce34ece6..e07f70ed7c53 100644
--- a/arch/arm/mach-davinci/include/mach/asp.h
+++ b/arch/arm/mach-davinci/include/mach/asp.h
@@ -51,6 +51,14 @@ struct snd_platform_data {
51 u32 rx_dma_offset; 51 u32 rx_dma_offset;
52 enum dma_event_q eventq_no; /* event queue number */ 52 enum dma_event_q eventq_no; /* event queue number */
53 unsigned int codec_fmt; 53 unsigned int codec_fmt;
54 /*
55 * Allowing this is more efficient and eliminates left and right swaps
56 * caused by underruns, but will swap the left and right channels
57 * when compared to previous behavior.
58 */
59 unsigned enable_channel_combine:1;
60 unsigned sram_size_playback;
61 unsigned sram_size_capture;
54 62
55 /* McASP specific fields */ 63 /* McASP specific fields */
56 int tdm_slots; 64 int tdm_slots;
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 0acb5560229c..08e535d92c06 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -410,6 +410,15 @@ static struct regulator_init_data sdp3430_vpll2 = {
410 .consumer_supplies = &sdp3430_vdvi_supply, 410 .consumer_supplies = &sdp3430_vdvi_supply,
411}; 411};
412 412
413static struct twl4030_codec_audio_data sdp3430_audio = {
414 .audio_mclk = 26000000,
415};
416
417static struct twl4030_codec_data sdp3430_codec = {
418 .audio_mclk = 26000000,
419 .audio = &sdp3430_audio,
420};
421
413static struct twl4030_platform_data sdp3430_twldata = { 422static struct twl4030_platform_data sdp3430_twldata = {
414 .irq_base = TWL4030_IRQ_BASE, 423 .irq_base = TWL4030_IRQ_BASE,
415 .irq_end = TWL4030_IRQ_END, 424 .irq_end = TWL4030_IRQ_END,
@@ -420,6 +429,7 @@ static struct twl4030_platform_data sdp3430_twldata = {
420 .madc = &sdp3430_madc_data, 429 .madc = &sdp3430_madc_data,
421 .keypad = &sdp3430_kp_data, 430 .keypad = &sdp3430_kp_data,
422 .usb = &sdp3430_usb_data, 431 .usb = &sdp3430_usb_data,
432 .codec = &sdp3430_codec,
423 433
424 .vaux1 = &sdp3430_vaux1, 434 .vaux1 = &sdp3430_vaux1,
425 .vaux2 = &sdp3430_vaux2, 435 .vaux2 = &sdp3430_vaux2,
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 08b0816afa61..af411e11dddf 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -254,6 +254,15 @@ static struct twl4030_usb_data beagle_usb_data = {
254 .usb_mode = T2_USB_MODE_ULPI, 254 .usb_mode = T2_USB_MODE_ULPI,
255}; 255};
256 256
257static struct twl4030_codec_audio_data beagle_audio_data = {
258 .audio_mclk = 26000000,
259};
260
261static struct twl4030_codec_data beagle_codec_data = {
262 .audio_mclk = 26000000,
263 .audio = &beagle_audio_data,
264};
265
257static struct twl4030_platform_data beagle_twldata = { 266static struct twl4030_platform_data beagle_twldata = {
258 .irq_base = TWL4030_IRQ_BASE, 267 .irq_base = TWL4030_IRQ_BASE,
259 .irq_end = TWL4030_IRQ_END, 268 .irq_end = TWL4030_IRQ_END,
@@ -261,6 +270,7 @@ static struct twl4030_platform_data beagle_twldata = {
261 /* platform_data for children goes here */ 270 /* platform_data for children goes here */
262 .usb = &beagle_usb_data, 271 .usb = &beagle_usb_data,
263 .gpio = &beagle_gpio_data, 272 .gpio = &beagle_gpio_data,
273 .codec = &beagle_codec_data,
264 .vmmc1 = &beagle_vmmc1, 274 .vmmc1 = &beagle_vmmc1,
265 .vsim = &beagle_vsim, 275 .vsim = &beagle_vsim,
266 .vdac = &beagle_vdac, 276 .vdac = &beagle_vdac,
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 4c4d7f8dbd72..25ca5f6a0d3d 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -194,6 +194,15 @@ static struct twl4030_madc_platform_data omap3evm_madc_data = {
194 .irq_line = 1, 194 .irq_line = 1,
195}; 195};
196 196
197static struct twl4030_codec_audio_data omap3evm_audio_data = {
198 .audio_mclk = 26000000,
199};
200
201static struct twl4030_codec_data omap3evm_codec_data = {
202 .audio_mclk = 26000000,
203 .audio = &omap3evm_audio_data,
204};
205
197static struct twl4030_platform_data omap3evm_twldata = { 206static struct twl4030_platform_data omap3evm_twldata = {
198 .irq_base = TWL4030_IRQ_BASE, 207 .irq_base = TWL4030_IRQ_BASE,
199 .irq_end = TWL4030_IRQ_END, 208 .irq_end = TWL4030_IRQ_END,
@@ -203,6 +212,7 @@ static struct twl4030_platform_data omap3evm_twldata = {
203 .madc = &omap3evm_madc_data, 212 .madc = &omap3evm_madc_data,
204 .usb = &omap3evm_usb_data, 213 .usb = &omap3evm_usb_data,
205 .gpio = &omap3evm_gpio_data, 214 .gpio = &omap3evm_gpio_data,
215 .codec = &omap3evm_codec_data,
206}; 216};
207 217
208static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = { 218static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 7519edb69155..c4be626c8422 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -281,11 +281,21 @@ static struct twl4030_usb_data omap3pandora_usb_data = {
281 .usb_mode = T2_USB_MODE_ULPI, 281 .usb_mode = T2_USB_MODE_ULPI,
282}; 282};
283 283
284static struct twl4030_codec_audio_data omap3pandora_audio_data = {
285 .audio_mclk = 26000000,
286};
287
288static struct twl4030_codec_data omap3pandora_codec_data = {
289 .audio_mclk = 26000000,
290 .audio = &omap3pandora_audio_data,
291};
292
284static struct twl4030_platform_data omap3pandora_twldata = { 293static struct twl4030_platform_data omap3pandora_twldata = {
285 .irq_base = TWL4030_IRQ_BASE, 294 .irq_base = TWL4030_IRQ_BASE,
286 .irq_end = TWL4030_IRQ_END, 295 .irq_end = TWL4030_IRQ_END,
287 .gpio = &omap3pandora_gpio_data, 296 .gpio = &omap3pandora_gpio_data,
288 .usb = &omap3pandora_usb_data, 297 .usb = &omap3pandora_usb_data,
298 .codec = &omap3pandora_codec_data,
289 .vmmc1 = &pandora_vmmc1, 299 .vmmc1 = &pandora_vmmc1,
290 .vmmc2 = &pandora_vmmc2, 300 .vmmc2 = &pandora_vmmc2,
291 .keypad = &pandora_kp_data, 301 .keypad = &pandora_kp_data,
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 9917d2fddc2f..e1fb50451e19 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -329,6 +329,15 @@ static struct regulator_init_data overo_vmmc1 = {
329 .consumer_supplies = &overo_vmmc1_supply, 329 .consumer_supplies = &overo_vmmc1_supply,
330}; 330};
331 331
332static struct twl4030_codec_audio_data overo_audio_data = {
333 .audio_mclk = 26000000,
334};
335
336static struct twl4030_codec_data overo_codec_data = {
337 .audio_mclk = 26000000,
338 .audio = &overo_audio_data,
339};
340
332/* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */ 341/* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */
333 342
334static struct twl4030_platform_data overo_twldata = { 343static struct twl4030_platform_data overo_twldata = {
@@ -336,6 +345,7 @@ static struct twl4030_platform_data overo_twldata = {
336 .irq_end = TWL4030_IRQ_END, 345 .irq_end = TWL4030_IRQ_END,
337 .gpio = &overo_gpio_data, 346 .gpio = &overo_gpio_data,
338 .usb = &overo_usb_data, 347 .usb = &overo_usb_data,
348 .codec = &overo_codec_data,
339 .vmmc1 = &overo_vmmc1, 349 .vmmc1 = &overo_vmmc1,
340}; 350};
341 351
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c
index 51e0b3ba5f3a..51df584728f6 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -230,6 +230,15 @@ static struct twl4030_madc_platform_data zoom2_madc_data = {
230 .irq_line = 1, 230 .irq_line = 1,
231}; 231};
232 232
233static struct twl4030_codec_audio_data zoom2_audio_data = {
234 .audio_mclk = 26000000,
235};
236
237static struct twl4030_codec_data zoom2_codec_data = {
238 .audio_mclk = 26000000,
239 .audio = &zoom2_audio_data,
240};
241
233static struct twl4030_platform_data zoom2_twldata = { 242static struct twl4030_platform_data zoom2_twldata = {
234 .irq_base = TWL4030_IRQ_BASE, 243 .irq_base = TWL4030_IRQ_BASE,
235 .irq_end = TWL4030_IRQ_END, 244 .irq_end = TWL4030_IRQ_END,
@@ -240,6 +249,7 @@ static struct twl4030_platform_data zoom2_twldata = {
240 .usb = &zoom2_usb_data, 249 .usb = &zoom2_usb_data,
241 .gpio = &zoom2_gpio_data, 250 .gpio = &zoom2_gpio_data,
242 .keypad = &zoom2_kp_twl4030_data, 251 .keypad = &zoom2_kp_twl4030_data,
252 .codec = &zoom2_codec_data,
243 .vmmc1 = &zoom2_vmmc1, 253 .vmmc1 = &zoom2_vmmc1,
244 .vmmc2 = &zoom2_vmmc2, 254 .vmmc2 = &zoom2_vmmc2,
245 .vsim = &zoom2_vsim, 255 .vsim = &zoom2_vsim,
diff --git a/arch/arm/mach-s3c6400/include/mach/map.h b/arch/arm/mach-s3c6400/include/mach/map.h
index fc8b223bad4f..866be31872a5 100644
--- a/arch/arm/mach-s3c6400/include/mach/map.h
+++ b/arch/arm/mach-s3c6400/include/mach/map.h
@@ -48,6 +48,8 @@
48#define S3C64XX_PA_IIS1 (0x7F003000) 48#define S3C64XX_PA_IIS1 (0x7F003000)
49#define S3C64XX_PA_TIMER (0x7F006000) 49#define S3C64XX_PA_TIMER (0x7F006000)
50#define S3C64XX_PA_IIC0 (0x7F004000) 50#define S3C64XX_PA_IIC0 (0x7F004000)
51#define S3C64XX_PA_PCM0 (0x7F009000)
52#define S3C64XX_PA_PCM1 (0x7F00A000)
51#define S3C64XX_PA_IISV4 (0x7F00D000) 53#define S3C64XX_PA_IISV4 (0x7F00D000)
52#define S3C64XX_PA_IIC1 (0x7F00F000) 54#define S3C64XX_PA_IIC1 (0x7F00F000)
53 55
diff --git a/arch/arm/plat-s3c/include/plat/audio.h b/arch/arm/plat-s3c/include/plat/audio.h
index de0e8da48bc3..f22d23bb6271 100644
--- a/arch/arm/plat-s3c/include/plat/audio.h
+++ b/arch/arm/plat-s3c/include/plat/audio.h
@@ -1,45 +1,17 @@
1/* arch/arm/mach-s3c2410/include/mach/audio.h 1/* arch/arm/plat-s3c/include/plat/audio.h
2 * 2 *
3 * Copyright (c) 2004-2005 Simtec Electronics 3 * Copyright (c) 2009 Samsung Electronics Co. Ltd
4 * http://www.simtec.co.uk/products/SWLINUX/ 4 * Author: Jaswinder Singh <jassi.brar@samsung.com>
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C24XX - Audio platfrom_device info
8 * 5 *
9 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
12*/ 9 */
13
14#ifndef __ASM_ARCH_AUDIO_H
15#define __ASM_ARCH_AUDIO_H __FILE__
16
17/* struct s3c24xx_iis_ops
18 *
19 * called from the s3c24xx audio core to deal with the architecture
20 * or the codec's setup and control.
21 *
22 * the pointer to itself is passed through in case the caller wants to
23 * embed this in an larger structure for easy reference to it's context.
24*/
25 10
26struct s3c24xx_iis_ops { 11/**
27 struct module *owner; 12 * struct s3c_audio_pdata - common platform data for audio device drivers
28 13 * @cfg_gpio: Callback function to setup mux'ed pins in I2S/PCM/AC97 mode
29 int (*startup)(struct s3c24xx_iis_ops *me); 14 */
30 void (*shutdown)(struct s3c24xx_iis_ops *me); 15struct s3c_audio_pdata {
31 int (*suspend)(struct s3c24xx_iis_ops *me); 16 int (*cfg_gpio)(struct platform_device *);
32 int (*resume)(struct s3c24xx_iis_ops *me);
33
34 int (*open)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm);
35 int (*close)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm);
36 int (*prepare)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm, struct snd_pcm_runtime *rt);
37}; 17};
38
39struct s3c24xx_platdata_iis {
40 const char *codec_clk;
41 struct s3c24xx_iis_ops *ops;
42 int (*match_dev)(struct device *dev);
43};
44
45#endif /* __ASM_ARCH_AUDIO_H */
diff --git a/arch/arm/plat-s3c/include/plat/devs.h b/arch/arm/plat-s3c/include/plat/devs.h
index 0f540ea1e999..932cbbbb4273 100644
--- a/arch/arm/plat-s3c/include/plat/devs.h
+++ b/arch/arm/plat-s3c/include/plat/devs.h
@@ -28,6 +28,9 @@ extern struct platform_device s3c64xx_device_iis0;
28extern struct platform_device s3c64xx_device_iis1; 28extern struct platform_device s3c64xx_device_iis1;
29extern struct platform_device s3c64xx_device_iisv4; 29extern struct platform_device s3c64xx_device_iisv4;
30 30
31extern struct platform_device s3c64xx_device_pcm0;
32extern struct platform_device s3c64xx_device_pcm1;
33
31extern struct platform_device s3c_device_fb; 34extern struct platform_device s3c_device_fb;
32extern struct platform_device s3c_device_usb; 35extern struct platform_device s3c_device_usb;
33extern struct platform_device s3c_device_lcd; 36extern struct platform_device s3c_device_lcd;
diff --git a/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h b/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
index 07659dad1748..abf2fbc2eb2f 100644
--- a/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
+++ b/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
@@ -67,6 +67,8 @@
67#define S3C2412_IISMOD_BCLK_MASK (3 << 1) 67#define S3C2412_IISMOD_BCLK_MASK (3 << 1)
68#define S3C2412_IISMOD_8BIT (1 << 0) 68#define S3C2412_IISMOD_8BIT (1 << 0)
69 69
70#define S3C64XX_IISMOD_CDCLKCON (1 << 12)
71
70#define S3C2412_IISPSR_PSREN (1 << 15) 72#define S3C2412_IISPSR_PSREN (1 << 15)
71 73
72#define S3C2412_IISFIC_TXFLUSH (1 << 15) 74#define S3C2412_IISFIC_TXFLUSH (1 << 15)
diff --git a/arch/arm/plat-s3c64xx/dev-audio.c b/arch/arm/plat-s3c64xx/dev-audio.c
index 1322beb40dd7..a21a88fbb7e3 100644
--- a/arch/arm/plat-s3c64xx/dev-audio.c
+++ b/arch/arm/plat-s3c64xx/dev-audio.c
@@ -15,9 +15,14 @@
15 15
16#include <mach/irqs.h> 16#include <mach/irqs.h>
17#include <mach/map.h> 17#include <mach/map.h>
18#include <mach/dma.h>
19#include <mach/gpio.h>
18 20
19#include <plat/devs.h> 21#include <plat/devs.h>
20 22#include <plat/audio.h>
23#include <plat/gpio-bank-d.h>
24#include <plat/gpio-bank-e.h>
25#include <plat/gpio-cfg.h>
21 26
22static struct resource s3c64xx_iis0_resource[] = { 27static struct resource s3c64xx_iis0_resource[] = {
23 [0] = { 28 [0] = {
@@ -66,3 +71,97 @@ struct platform_device s3c64xx_device_iisv4 = {
66 .resource = s3c64xx_iisv4_resource, 71 .resource = s3c64xx_iisv4_resource,
67}; 72};
68EXPORT_SYMBOL(s3c64xx_device_iisv4); 73EXPORT_SYMBOL(s3c64xx_device_iisv4);
74
75
76/* PCM Controller platform_devices */
77
78static int s3c64xx_pcm_cfg_gpio(struct platform_device *pdev)
79{
80 switch (pdev->id) {
81 case 0:
82 s3c_gpio_cfgpin(S3C64XX_GPD(0), S3C64XX_GPD0_PCM0_SCLK);
83 s3c_gpio_cfgpin(S3C64XX_GPD(1), S3C64XX_GPD1_PCM0_EXTCLK);
84 s3c_gpio_cfgpin(S3C64XX_GPD(2), S3C64XX_GPD2_PCM0_FSYNC);
85 s3c_gpio_cfgpin(S3C64XX_GPD(3), S3C64XX_GPD3_PCM0_SIN);
86 s3c_gpio_cfgpin(S3C64XX_GPD(4), S3C64XX_GPD4_PCM0_SOUT);
87 break;
88 case 1:
89 s3c_gpio_cfgpin(S3C64XX_GPE(0), S3C64XX_GPE0_PCM1_SCLK);
90 s3c_gpio_cfgpin(S3C64XX_GPE(1), S3C64XX_GPE1_PCM1_EXTCLK);
91 s3c_gpio_cfgpin(S3C64XX_GPE(2), S3C64XX_GPE2_PCM1_FSYNC);
92 s3c_gpio_cfgpin(S3C64XX_GPE(3), S3C64XX_GPE3_PCM1_SIN);
93 s3c_gpio_cfgpin(S3C64XX_GPE(4), S3C64XX_GPE4_PCM1_SOUT);
94 break;
95 default:
96 printk(KERN_DEBUG "Invalid PCM Controller number!");
97 return -EINVAL;
98 }
99
100 return 0;
101}
102
103static struct resource s3c64xx_pcm0_resource[] = {
104 [0] = {
105 .start = S3C64XX_PA_PCM0,
106 .end = S3C64XX_PA_PCM0 + 0x100 - 1,
107 .flags = IORESOURCE_MEM,
108 },
109 [1] = {
110 .start = DMACH_PCM0_TX,
111 .end = DMACH_PCM0_TX,
112 .flags = IORESOURCE_DMA,
113 },
114 [2] = {
115 .start = DMACH_PCM0_RX,
116 .end = DMACH_PCM0_RX,
117 .flags = IORESOURCE_DMA,
118 },
119};
120
121static struct s3c_audio_pdata s3c_pcm0_pdata = {
122 .cfg_gpio = s3c64xx_pcm_cfg_gpio,
123};
124
125struct platform_device s3c64xx_device_pcm0 = {
126 .name = "samsung-pcm",
127 .id = 0,
128 .num_resources = ARRAY_SIZE(s3c64xx_pcm0_resource),
129 .resource = s3c64xx_pcm0_resource,
130 .dev = {
131 .platform_data = &s3c_pcm0_pdata,
132 },
133};
134EXPORT_SYMBOL(s3c64xx_device_pcm0);
135
136static struct resource s3c64xx_pcm1_resource[] = {
137 [0] = {
138 .start = S3C64XX_PA_PCM1,
139 .end = S3C64XX_PA_PCM1 + 0x100 - 1,
140 .flags = IORESOURCE_MEM,
141 },
142 [1] = {
143 .start = DMACH_PCM1_TX,
144 .end = DMACH_PCM1_TX,
145 .flags = IORESOURCE_DMA,
146 },
147 [2] = {
148 .start = DMACH_PCM1_RX,
149 .end = DMACH_PCM1_RX,
150 .flags = IORESOURCE_DMA,
151 },
152};
153
154static struct s3c_audio_pdata s3c_pcm1_pdata = {
155 .cfg_gpio = s3c64xx_pcm_cfg_gpio,
156};
157
158struct platform_device s3c64xx_device_pcm1 = {
159 .name = "samsung-pcm",
160 .id = 1,
161 .num_resources = ARRAY_SIZE(s3c64xx_pcm1_resource),
162 .resource = s3c64xx_pcm1_resource,
163 .dev = {
164 .platform_data = &s3c_pcm1_pdata,
165 },
166};
167EXPORT_SYMBOL(s3c64xx_device_pcm1);
diff --git a/arch/sh/boards/mach-hp6xx/setup.c b/arch/sh/boards/mach-hp6xx/setup.c
index 8f305b36358b..e6dd5e96321e 100644
--- a/arch/sh/boards/mach-hp6xx/setup.c
+++ b/arch/sh/boards/mach-hp6xx/setup.c
@@ -13,6 +13,7 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <sound/sh_dac_audio.h>
16#include <asm/hd64461.h> 17#include <asm/hd64461.h>
17#include <asm/io.h> 18#include <asm/io.h>
18#include <mach/hp6xx.h> 19#include <mach/hp6xx.h>
@@ -51,9 +52,63 @@ static struct platform_device jornadakbd_device = {
51 .id = -1, 52 .id = -1,
52}; 53};
53 54
55static void dac_audio_start(struct dac_audio_pdata *pdata)
56{
57 u16 v;
58 u8 v8;
59
60 /* HP Jornada 680/690 speaker on */
61 v = inw(HD64461_GPADR);
62 v &= ~HD64461_GPADR_SPEAKER;
63 outw(v, HD64461_GPADR);
64
65 /* HP Palmtop 620lx/660lx speaker on */
66 v8 = inb(PKDR);
67 v8 &= ~PKDR_SPEAKER;
68 outb(v8, PKDR);
69
70 sh_dac_enable(pdata->channel);
71}
72
73static void dac_audio_stop(struct dac_audio_pdata *pdata)
74{
75 u16 v;
76 u8 v8;
77
78 /* HP Jornada 680/690 speaker off */
79 v = inw(HD64461_GPADR);
80 v |= HD64461_GPADR_SPEAKER;
81 outw(v, HD64461_GPADR);
82
83 /* HP Palmtop 620lx/660lx speaker off */
84 v8 = inb(PKDR);
85 v8 |= PKDR_SPEAKER;
86 outb(v8, PKDR);
87
88 sh_dac_output(0, pdata->channel);
89 sh_dac_disable(pdata->channel);
90}
91
92static struct dac_audio_pdata dac_audio_platform_data = {
93 .buffer_size = 64000,
94 .channel = 1,
95 .start = dac_audio_start,
96 .stop = dac_audio_stop,
97};
98
99static struct platform_device dac_audio_device = {
100 .name = "dac_audio",
101 .id = -1,
102 .dev = {
103 .platform_data = &dac_audio_platform_data,
104 }
105
106};
107
54static struct platform_device *hp6xx_devices[] __initdata = { 108static struct platform_device *hp6xx_devices[] __initdata = {
55 &cf_ide_device, 109 &cf_ide_device,
56 &jornadakbd_device, 110 &jornadakbd_device,
111 &dac_audio_device,
57}; 112};
58 113
59static void __init hp6xx_init_irq(void) 114static void __init hp6xx_init_irq(void)
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index e78c3be8ad2f..0894bba9fade 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -313,6 +313,9 @@ static struct platform_device fsi_device = {
313 .dev = { 313 .dev = {
314 .platform_data = &fsi_info, 314 .platform_data = &fsi_info,
315 }, 315 },
316 .archdata = {
317 .hwblk_id = HWBLK_SPU, /* FSI needs SPU hwblk */
318 },
316}; 319};
317 320
318/* KEYSC in SoC (Needs SW33-2 set to ON) */ 321/* KEYSC in SoC (Needs SW33-2 set to ON) */
diff --git a/arch/sh/include/mach-common/mach/hp6xx.h b/arch/sh/include/mach-common/mach/hp6xx.h
index 0d4165a32dcd..bcc301ac12f4 100644
--- a/arch/sh/include/mach-common/mach/hp6xx.h
+++ b/arch/sh/include/mach-common/mach/hp6xx.h
@@ -29,6 +29,9 @@
29 29
30#define PKDR_LED_GREEN 0x10 30#define PKDR_LED_GREEN 0x10
31 31
32/* HP Palmtop 620lx/660lx speaker on/off */
33#define PKDR_SPEAKER 0x20
34
32#define SCPDR_TS_SCAN_ENABLE 0x20 35#define SCPDR_TS_SCAN_ENABLE 0x20
33#define SCPDR_TS_SCAN_Y 0x02 36#define SCPDR_TS_SCAN_Y 0x02
34#define SCPDR_TS_SCAN_X 0x01 37#define SCPDR_TS_SCAN_X 0x01
@@ -42,6 +45,7 @@
42#define ADC_CHANNEL_BACKUP 4 45#define ADC_CHANNEL_BACKUP 4
43#define ADC_CHANNEL_CHARGE 5 46#define ADC_CHANNEL_CHARGE 5
44 47
48/* HP Jornada 680/690 speaker on/off */
45#define HD64461_GPADR_SPEAKER 0x01 49#define HD64461_GPADR_SPEAKER 0x01
46#define HD64461_GPADR_PCMCIA0 (0x02|0x08) 50#define HD64461_GPADR_PCMCIA0 (0x02|0x08)
47 51