diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-12-01 09:58:10 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-12-01 09:58:10 -0500 |
commit | 75639e7ee1401b3876c7a00ffe96ea8027668690 (patch) | |
tree | 3d6813cd3fe0d974e0a40237d003a22c5f7438dd /arch/sh/boards | |
parent | 7584af10cf46e0f4aa1696f1be79fa0f19a945ba (diff) | |
parent | ad1cd745060ae2f24026b3b3d09da3426df6ab36 (diff) |
Merge branch 'topic/beep-rename' into topic/core-change
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/mach-hp6xx/setup.c | 55 |
1 files changed, 55 insertions, 0 deletions
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 | ||
55 | static 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 | |||
73 | static 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 | |||
92 | static 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 | |||
99 | static 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 | |||
54 | static struct platform_device *hp6xx_devices[] __initdata = { | 108 | static 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 | ||
59 | static void __init hp6xx_init_irq(void) | 114 | static void __init hp6xx_init_irq(void) |