aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/hp6xx
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/hp6xx')
-rw-r--r--arch/sh/boards/hp6xx/hp6xx_apm.c9
-rw-r--r--arch/sh/boards/hp6xx/setup.c35
2 files changed, 29 insertions, 15 deletions
diff --git a/arch/sh/boards/hp6xx/hp6xx_apm.c b/arch/sh/boards/hp6xx/hp6xx_apm.c
index d1c1460c8a06..640ca2a74f16 100644
--- a/arch/sh/boards/hp6xx/hp6xx_apm.c
+++ b/arch/sh/boards/hp6xx/hp6xx_apm.c
@@ -20,9 +20,9 @@
20#define APM_CRITICAL 10 20#define APM_CRITICAL 10
21#define APM_LOW 30 21#define APM_LOW 30
22 22
23#define HP680_BATTERY_MAX 875 23#define HP680_BATTERY_MAX 898
24#define HP680_BATTERY_MIN 600 24#define HP680_BATTERY_MIN 486
25#define HP680_BATTERY_AC_ON 900 25#define HP680_BATTERY_AC_ON 1023
26 26
27#define MODNAME "hp6x0_apm" 27#define MODNAME "hp6x0_apm"
28 28
@@ -65,7 +65,7 @@ static void hp6x0_apm_get_power_status(struct apm_power_info *info)
65 65
66static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev) 66static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev)
67{ 67{
68 if (!apm_suspended) 68 if (!APM_DISABLED)
69 apm_queue_event(APM_USER_SUSPEND); 69 apm_queue_event(APM_USER_SUSPEND);
70 70
71 return IRQ_HANDLED; 71 return IRQ_HANDLED;
@@ -91,7 +91,6 @@ static int __init hp6x0_apm_init(void)
91static void __exit hp6x0_apm_exit(void) 91static void __exit hp6x0_apm_exit(void)
92{ 92{
93 free_irq(HP680_BTN_IRQ, 0); 93 free_irq(HP680_BTN_IRQ, 0);
94 apm_get_info = NULL;
95} 94}
96 95
97module_init(hp6x0_apm_init); 96module_init(hp6x0_apm_init);
diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c
index 7ae708930bac..2f414ac3c690 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 */
25static struct resource cf_ide_resources[] = { 25static struct resource cf_ide_resources[] = {
@@ -34,7 +34,7 @@ static struct resource cf_ide_resources[] = {
34 .flags = IORESOURCE_MEM, 34 .flags = IORESOURCE_MEM,
35 }, 35 },
36 [2] = { 36 [2] = {
37 .start = 93, 37 .start = 77,
38 .flags = IORESOURCE_IRQ, 38 .flags = IORESOURCE_IRQ,
39 }, 39 },
40}; 40};
@@ -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
49static struct platform_device jornadakbd_device = {
50 .name = "jornada680_kbd",
51 .id = -1,
52};
53
49static struct platform_device *hp6xx_devices[] __initdata = { 54static struct platform_device *hp6xx_devices[] __initdata = {
50 &cf_ide_device, 55 &cf_ide_device,
56 &jornadakbd_device,
51}; 57};
52 58
59static void __init hp6xx_init_irq(void)
60{
61 /* Gets touchscreen and powerbutton IRQ working */
62 plat_irq_setup_pins(IRQ_MODE_IRQ);
63}
64
53static int __init hp6xx_devices_setup(void) 65static 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);
101static struct sh_machine_vector mv_hp6xx __initmv = { 113static 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};