diff options
author | Uwe Stuehler <uwe@cvs.openbsd.org> | 2005-03-29 20:00:17 +0000 |
---|---|---|
committer | Uwe Stuehler <uwe@cvs.openbsd.org> | 2005-03-29 20:00:17 +0000 |
commit | c46ab3b1d928a60cb6e29cd3501c3d985d0ca017 (patch) | |
tree | c6d70102ea0bf7770f91155cf6b5a4546b1ad43e | |
parent | d2ec15e58669c7257233a7578a317e2909e66a56 (diff) |
- Support the machdep.kbdreset sysctl on zaurus.
- Disable unused function parse_mi_bootargs().
-rw-r--r-- | sys/arch/arm/arm/arm32_machdep.c | 18 | ||||
-rw-r--r-- | sys/arch/arm/include/cpu.h | 6 |
2 files changed, 20 insertions, 4 deletions
diff --git a/sys/arch/arm/arm/arm32_machdep.c b/sys/arch/arm/arm/arm32_machdep.c index ebcc9ef1bdd..267e7e296fa 100644 --- a/sys/arch/arm/arm/arm32_machdep.c +++ b/sys/arch/arm/arm/arm32_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arm32_machdep.c,v 1.9 2005/03/07 02:08:45 uwe Exp $ */ +/* $OpenBSD: arm32_machdep.c,v 1.10 2005/03/29 20:00:16 uwe Exp $ */ /* $NetBSD: arm32_machdep.c,v 1.42 2003/12/30 12:33:15 pk Exp $ */ /* @@ -127,6 +127,11 @@ int allowaperture = 0; #endif #endif +#if defined(__zaurus__) +/* Permit console keyboard to do a nice halt. */ +int kbd_reset; +#endif + /* Prototypes */ void data_abort_handler (trapframe_t *frame); @@ -450,6 +455,15 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) case CPU_APMWARN: return (sysctl_int(oldp, oldlenp, newp, newlen, &cpu_apmwarn)); #endif +#if defined(__zaurus__) + case CPU_KBDRESET: + if (securelevel > 0) + return (sysctl_rdint(oldp, oldlenp, newp, + kbd_reset)); + else + return (sysctl_int(oldp, oldlenp, newp, newlen, + &kbd_reset)); +#endif default: return (EOPNOTSUPP); @@ -541,7 +555,7 @@ SYSCTL_SETUP(sysctl_machdep_setup, "sysctl machdep subtree setup") } #endif -#if 1 +#if 0 void parse_mi_bootargs(args) char *args; diff --git a/sys/arch/arm/include/cpu.h b/sys/arch/arm/include/cpu.h index 3d80bee0b2a..163ba0aa345 100644 --- a/sys/arch/arm/include/cpu.h +++ b/sys/arch/arm/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.6 2005/03/03 22:55:00 uwe Exp $ */ +/* $OpenBSD: cpu.h,v 1.7 2005/03/29 20:00:16 uwe Exp $ */ /* $NetBSD: cpu.h,v 1.34 2003/06/23 11:01:08 martin Exp $ */ /* @@ -61,7 +61,8 @@ #define CPU_POWERSAVE 5 /* int: use CPU powersave mode */ #define CPU_ALLOWAPERTURE 6 /* int: allow mmap of /dev/xf86 */ #define CPU_APMWARN 7 /* APM battery warning percentage */ -#define CPU_MAXID 8 /* number of valid machdep ids */ +#define CPU_KBDRESET 8 /* int: console keyboard reset */ +#define CPU_MAXID 9 /* number of valid machdep ids */ #define CTL_MACHDEP_NAMES { \ { 0, 0 }, \ @@ -72,6 +73,7 @@ { "powersave", CTLTYPE_INT }, \ { "allowaperture", CTLTYPE_INT }, \ { "apmwarn", CTLTYPE_INT }, \ + { "kbdreset", CTLTYPE_INT }, \ } #ifdef _KERNEL |