diff options
author | Kristoffer Ericson <Kristoffer.Ericson@gmail.com> | 2007-09-11 22:35:55 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-09-20 22:57:53 -0400 |
commit | aedb598631885c54e1bd61b19a373cd1b97aa568 (patch) | |
tree | 5a613dd05736564a85dce61066c57d438f83d8ef /arch/sh/boards/hp6xx/setup.c | |
parent | 1db4e9bb5682fd3fd3f37f7fe9c322e7c5bb7578 (diff) |
sh: hp6xx: Enable touchscreen and powerbutton IRQs.
IRQ0->IRQ3 need to be an IRQ mode for these to work, fix them up.
Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/hp6xx/setup.c')
-rw-r--r-- | arch/sh/boards/hp6xx/setup.c | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c index ac527a870884..f97d6846cdce 100644 --- a/arch/sh/boards/hp6xx/setup.c +++ b/arch/sh/boards/hp6xx/setup.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * May be copied or modified under the terms of the GNU General Public | 7 | * May be copied or modified under the terms of the GNU General Public |
8 | * License. See linux/COPYING for more information. | 8 | * License. See linux/COPYING for more information. |
9 | * | 9 | * |
10 | * Setup code for an HP680 (internal peripherials only) | 10 | * Setup code for HP620/HP660/HP680/HP690 (internal peripherials only) |
11 | */ | 11 | */ |
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
@@ -19,7 +19,7 @@ | |||
19 | #include <asm/cpu/dac.h> | 19 | #include <asm/cpu/dac.h> |
20 | 20 | ||
21 | #define SCPCR 0xa4000116 | 21 | #define SCPCR 0xa4000116 |
22 | #define SCPDR 0xa4000136 | 22 | #define SCPDR 0xa4000136 |
23 | 23 | ||
24 | /* CF Slot */ | 24 | /* CF Slot */ |
25 | static struct resource cf_ide_resources[] = { | 25 | static struct resource cf_ide_resources[] = { |
@@ -46,10 +46,22 @@ static struct platform_device cf_ide_device = { | |||
46 | .resource = cf_ide_resources, | 46 | .resource = cf_ide_resources, |
47 | }; | 47 | }; |
48 | 48 | ||
49 | static struct platform_device jornadakbd_device = { | ||
50 | .name = "jornada680_kbd", | ||
51 | .id = -1, | ||
52 | }; | ||
53 | |||
49 | static struct platform_device *hp6xx_devices[] __initdata = { | 54 | static struct platform_device *hp6xx_devices[] __initdata = { |
50 | &cf_ide_device, | 55 | &cf_ide_device, |
56 | &jornadakbd_device, | ||
51 | }; | 57 | }; |
52 | 58 | ||
59 | static void __init hp6xx_init_irq(void) | ||
60 | { | ||
61 | /* Gets touchscreen and powerbutton IRQ working */ | ||
62 | plat_irq_setup(IRQ_MODE_IRQ); | ||
63 | } | ||
64 | |||
53 | static int __init hp6xx_devices_setup(void) | 65 | static int __init hp6xx_devices_setup(void) |
54 | { | 66 | { |
55 | return platform_add_devices(hp6xx_devices, ARRAY_SIZE(hp6xx_devices)); | 67 | return platform_add_devices(hp6xx_devices, ARRAY_SIZE(hp6xx_devices)); |
@@ -61,11 +73,11 @@ static void __init hp6xx_setup(char **cmdline_p) | |||
61 | u16 v; | 73 | u16 v; |
62 | 74 | ||
63 | v = inw(HD64461_STBCR); | 75 | v = inw(HD64461_STBCR); |
64 | v |= HD64461_STBCR_SURTST | HD64461_STBCR_SIRST | | 76 | v |= HD64461_STBCR_SURTST | HD64461_STBCR_SIRST | |
65 | HD64461_STBCR_STM1ST | HD64461_STBCR_STM0ST | | 77 | HD64461_STBCR_STM1ST | HD64461_STBCR_STM0ST | |
66 | HD64461_STBCR_SAFEST | HD64461_STBCR_SPC0ST | | 78 | HD64461_STBCR_SAFEST | HD64461_STBCR_SPC0ST | |
67 | HD64461_STBCR_SMIAST | HD64461_STBCR_SAFECKE_OST | | 79 | HD64461_STBCR_SMIAST | HD64461_STBCR_SAFECKE_OST| |
68 | HD64461_STBCR_SAFECKE_IST; | 80 | HD64461_STBCR_SAFECKE_IST; |
69 | #ifndef CONFIG_HD64461_ENABLER | 81 | #ifndef CONFIG_HD64461_ENABLER |
70 | v |= HD64461_STBCR_SPC1ST; | 82 | v |= HD64461_STBCR_SPC1ST; |
71 | #endif | 83 | #endif |
@@ -101,6 +113,9 @@ device_initcall(hp6xx_devices_setup); | |||
101 | static struct sh_machine_vector mv_hp6xx __initmv = { | 113 | static struct sh_machine_vector mv_hp6xx __initmv = { |
102 | .mv_name = "hp6xx", | 114 | .mv_name = "hp6xx", |
103 | .mv_setup = hp6xx_setup, | 115 | .mv_setup = hp6xx_setup, |
104 | .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM, | 116 | /* IRQ's : CPU(64) + CCHIP(16) + FREE_TO_USE(6) */ |
117 | .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM + 6, | ||
105 | .mv_irq_demux = hd64461_irq_demux, | 118 | .mv_irq_demux = hd64461_irq_demux, |
119 | /* Enable IRQ0 -> IRQ3 in IRQ_MODE */ | ||
120 | .mv_init_irq = hp6xx_init_irq, | ||
106 | }; | 121 | }; |