aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh')
-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
-rw-r--r--arch/sh/kernel/traps_64.c13
4 files changed, 66 insertions, 9 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
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
diff --git a/arch/sh/kernel/traps_64.c b/arch/sh/kernel/traps_64.c
index 267e5ebbb475..75c0cbe2eda0 100644
--- a/arch/sh/kernel/traps_64.c
+++ b/arch/sh/kernel/traps_64.c
@@ -877,44 +877,39 @@ static int misaligned_fixup(struct pt_regs *regs)
877 877
878static ctl_table unaligned_table[] = { 878static ctl_table unaligned_table[] = {
879 { 879 {
880 .ctl_name = CTL_UNNUMBERED,
881 .procname = "kernel_reports", 880 .procname = "kernel_reports",
882 .data = &kernel_mode_unaligned_fixup_count, 881 .data = &kernel_mode_unaligned_fixup_count,
883 .maxlen = sizeof(int), 882 .maxlen = sizeof(int),
884 .mode = 0644, 883 .mode = 0644,
885 .proc_handler = &proc_dointvec 884 .proc_handler = proc_dointvec
886 }, 885 },
887 { 886 {
888 .ctl_name = CTL_UNNUMBERED,
889 .procname = "user_reports", 887 .procname = "user_reports",
890 .data = &user_mode_unaligned_fixup_count, 888 .data = &user_mode_unaligned_fixup_count,
891 .maxlen = sizeof(int), 889 .maxlen = sizeof(int),
892 .mode = 0644, 890 .mode = 0644,
893 .proc_handler = &proc_dointvec 891 .proc_handler = proc_dointvec
894 }, 892 },
895 { 893 {
896 .ctl_name = CTL_UNNUMBERED,
897 .procname = "user_enable", 894 .procname = "user_enable",
898 .data = &user_mode_unaligned_fixup_enable, 895 .data = &user_mode_unaligned_fixup_enable,
899 .maxlen = sizeof(int), 896 .maxlen = sizeof(int),
900 .mode = 0644, 897 .mode = 0644,
901 .proc_handler = &proc_dointvec}, 898 .proc_handler = proc_dointvec},
902 {} 899 {}
903}; 900};
904 901
905static ctl_table unaligned_root[] = { 902static ctl_table unaligned_root[] = {
906 { 903 {
907 .ctl_name = CTL_UNNUMBERED,
908 .procname = "unaligned_fixup", 904 .procname = "unaligned_fixup",
909 .mode = 0555, 905 .mode = 0555,
910 unaligned_table 906 .child = unaligned_table
911 }, 907 },
912 {} 908 {}
913}; 909};
914 910
915static ctl_table sh64_root[] = { 911static ctl_table sh64_root[] = {
916 { 912 {
917 .ctl_name = CTL_UNNUMBERED,
918 .procname = "sh64", 913 .procname = "sh64",
919 .mode = 0555, 914 .mode = 0555,
920 .child = unaligned_root 915 .child = unaligned_root