diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/boards/mach-hp6xx/setup.c | 55 | ||||
-rw-r--r-- | arch/sh/include/asm/rwsem.h | 2 | ||||
-rw-r--r-- | arch/sh/include/mach-common/mach/hp6xx.h | 4 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/irq/imask.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/irq/intc-sh5.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/dwarf.c | 2 | ||||
-rw-r--r-- | arch/sh/mm/cache-sh4.c | 5 |
7 files changed, 67 insertions, 5 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) |
diff --git a/arch/sh/include/asm/rwsem.h b/arch/sh/include/asm/rwsem.h index 1987f3ea7f1b..06e2251a5e48 100644 --- a/arch/sh/include/asm/rwsem.h +++ b/arch/sh/include/asm/rwsem.h | |||
@@ -41,7 +41,7 @@ struct rw_semaphore { | |||
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #define __RWSEM_INITIALIZER(name) \ | 43 | #define __RWSEM_INITIALIZER(name) \ |
44 | { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \ | 44 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \ |
45 | LIST_HEAD_INIT((name).wait_list) \ | 45 | LIST_HEAD_INIT((name).wait_list) \ |
46 | __RWSEM_DEP_MAP_INIT(name) } | 46 | __RWSEM_DEP_MAP_INIT(name) } |
47 | 47 | ||
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/cpu/irq/imask.c b/arch/sh/kernel/cpu/irq/imask.c index 6b5d191eec3a..a351ed84eec5 100644 --- a/arch/sh/kernel/cpu/irq/imask.c +++ b/arch/sh/kernel/cpu/irq/imask.c | |||
@@ -68,7 +68,7 @@ static void unmask_imask_irq(unsigned int irq) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | static struct irq_chip imask_irq_chip = { | 70 | static struct irq_chip imask_irq_chip = { |
71 | .typename = "SR.IMASK", | 71 | .name = "SR.IMASK", |
72 | .mask = mask_imask_irq, | 72 | .mask = mask_imask_irq, |
73 | .unmask = unmask_imask_irq, | 73 | .unmask = unmask_imask_irq, |
74 | .mask_ack = mask_imask_irq, | 74 | .mask_ack = mask_imask_irq, |
diff --git a/arch/sh/kernel/cpu/irq/intc-sh5.c b/arch/sh/kernel/cpu/irq/intc-sh5.c index 6c092f1f5557..06e7e2959b54 100644 --- a/arch/sh/kernel/cpu/irq/intc-sh5.c +++ b/arch/sh/kernel/cpu/irq/intc-sh5.c | |||
@@ -85,7 +85,7 @@ static void mask_and_ack_intc(unsigned int); | |||
85 | static void end_intc_irq(unsigned int irq); | 85 | static void end_intc_irq(unsigned int irq); |
86 | 86 | ||
87 | static struct irq_chip intc_irq_type = { | 87 | static struct irq_chip intc_irq_type = { |
88 | .typename = "INTC", | 88 | .name = "INTC", |
89 | .startup = startup_intc_irq, | 89 | .startup = startup_intc_irq, |
90 | .shutdown = shutdown_intc_irq, | 90 | .shutdown = shutdown_intc_irq, |
91 | .enable = enable_intc_irq, | 91 | .enable = enable_intc_irq, |
diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index 2d07084e4882..d76a23170dbb 100644 --- a/arch/sh/kernel/dwarf.c +++ b/arch/sh/kernel/dwarf.c | |||
@@ -555,7 +555,7 @@ struct dwarf_frame * dwarf_unwind_stack(unsigned long pc, | |||
555 | * NOTE: the return address is guaranteed to be setup by the | 555 | * NOTE: the return address is guaranteed to be setup by the |
556 | * time this function makes its first function call. | 556 | * time this function makes its first function call. |
557 | */ | 557 | */ |
558 | if (!pc && !prev) | 558 | if (!pc || !prev) |
559 | pc = (unsigned long)current_text_addr(); | 559 | pc = (unsigned long)current_text_addr(); |
560 | 560 | ||
561 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 561 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c index 519e2d16cd06..b7f235c74d66 100644 --- a/arch/sh/mm/cache-sh4.c +++ b/arch/sh/mm/cache-sh4.c | |||
@@ -72,6 +72,7 @@ static void __uses_jump_to_uncached sh4_flush_icache_range(void *args) | |||
72 | 72 | ||
73 | for (v = start; v < end; v += L1_CACHE_BYTES) { | 73 | for (v = start; v < end; v += L1_CACHE_BYTES) { |
74 | unsigned long icacheaddr; | 74 | unsigned long icacheaddr; |
75 | int j, n; | ||
75 | 76 | ||
76 | __ocbwb(v); | 77 | __ocbwb(v); |
77 | 78 | ||
@@ -79,8 +80,10 @@ static void __uses_jump_to_uncached sh4_flush_icache_range(void *args) | |||
79 | cpu_data->icache.entry_mask); | 80 | cpu_data->icache.entry_mask); |
80 | 81 | ||
81 | /* Clear i-cache line valid-bit */ | 82 | /* Clear i-cache line valid-bit */ |
83 | n = boot_cpu_data.icache.n_aliases; | ||
82 | for (i = 0; i < cpu_data->icache.ways; i++) { | 84 | for (i = 0; i < cpu_data->icache.ways; i++) { |
83 | __raw_writel(0, icacheaddr); | 85 | for (j = 0; j < n; j++) |
86 | __raw_writel(0, icacheaddr + (j * PAGE_SIZE)); | ||
84 | icacheaddr += cpu_data->icache.way_incr; | 87 | icacheaddr += cpu_data->icache.way_incr; |
85 | } | 88 | } |
86 | } | 89 | } |