Subject: port-hpcsh/26093: Adding keymap for Hitachi HPW-200EC
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jholt5638@earthlink.net>
List: netbsd-bugs
Date: 06/28/2004 00:58:17
>Number:         26093
>Category:       port-hpcsh
>Synopsis:       Adding keymap for Hitachi HPW-200EC
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-hpcsh-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 28 00:59:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jeremiah Holt
>Release:        NetBSD-1.6.2
>Organization:
>Environment:
>Description:
Currently there is no keymap for the Hitachi HPW-200EC. 
and when trying to use the keymap for the HPW-50PAD it is incorrect
only about a quarter of the key's are mapped correctly.
>How-To-Repeat:
Use the netbsd-GENERIC.gz  select Hitachi-HPW50PAD as your device and boot
notice about 75% of keys say unknown scancode.
>Fix:
I created two patches which I believe will enable hpcboot.exe and the 
kernel to have the correct keymap. they are applied to /src/sys/dev/hpc/hpckbdkeymap.h and /src/sys/arch/hpc/stand/hpcboot/machine_config.cpp

begin hpckbdkeymap.diff
--- hpckbdkeymap.h      2004-06-27 19:39:11.000000000 -0500
+++ hpckbdkeymap3.h     2004-06-27 19:39:40.000000000 -0500
@@ -798,6 +798,35 @@
        [KEY_SPECIAL_LIGHT]     = -1^M
 };^M
 ^M
+/*^M
+ * HITACHI PERSONA HPW200EC^M
+*/^M
+/* US */^M
+const u_int8_t persona_hpw200ec_keytrans[] = {^M
+/*      0    1    2    3    4    5    6    7 */       ^M
+/* 0 */        SPL, UNK,   2,  3,  UNK,   5,   6, UNK,^M
+/* 1 */        UNK, UNK, UNK,  11, UNK, UNK, UNK, UNK,^M
+/* 2 */        UNK, UNK, UNK,  19, UNK,  21, UNK, UNK,^M
+/* 3 */        UNK, UNK,  26,  27, UNK,  29,  30, UNK,^M
+/* 4 */         32, UNK,  34,  35, UNK, UNK,  26, UNK,^M
+/* 5 */         40, UNK,  42,  43, UNK, UNK,  46, UNK,^M
+/* 6 */         48, UNK,  50,  51, UNK,  53,  54, UNK,^M
+/* 7 */         56, UNK,  58,  59, UNK,  61,  62, UNK,^M
+/* 8 */        UNK, UNK,  66,  67,  68,  69,  70,  71,^M
+/* 9 */        UNK, UNK,  74,  75,  76,  77,  78,  79,^M
+/*10 */        UNK, UNK,  82,  83,  84,  85, UNK, UNK,^M
+/*11 */        UNK, UNK,  90,  91,  92,  93,  94,  95,^M
+/*12 */        UNK, UNK,  98,  99, 100, 101, 102, 103,^M
+/*13 */        104, UNK, 106, 107, 108, 109, 110, 111,^M
+/*14 */        UNK, UNK, 114, 115, 124, 117, 118, 119,^M
+/*15 */        UNK, UNK, 122, 123, UNK, UNK, 126, UNK,^M
+};^M
+^M
+const int persona_hpw200ec_special_keymap[] = {^M
+       [KEY_SPECIAL_OFF]       =  0,^M
+       [KEY_SPECIAL_LIGHT]     = -1^M
+};^M
+^M
 #endif /* hpcsh */^M
 ^M
 ^M
@@ -1002,6 +1031,17 @@
                persona_hpw50pad_special_keymap,^M
                NULLCMDMAP,^M
                KB_JP },^M
+^M
+       /*^M
+        * PERSONA HPW200EC^M
+        */^M
+       /* US */^M
+       {       &platid_mask_MACH_HITACHI_PERSONA_HPW200EC,^M
+               persona_hpw200ec_keytrans,^M
+               persona_hpw200ec_special_keymap,^M
+               NULLCMDMAP,^M
+               KB_US },^M
+^M
 #endif /* hpcsh */^M
        { NULL } /* end mark */^M
 };^M

end hpckbdkeymap.diff

begin machine_config.diff

--- machine_config.cpp  2004-06-27 19:24:59.000000000 -0500
+++ machine_config1.cpp 2004-06-27 19:24:59.000000000 -0500
@@ -111,6 +111,7 @@
        { PLATID_CPU_SH_3_7709   , PLATID_MACH_HP_LX_620                   ,
    8,      640,      240,      640, 0xb2000000 },^M
        { PLATID_CPU_SH_3_7709   , PLATID_MACH_HP_LX_620JP                 ,
    8,      640,      240,      640, 0xb2000000 },^M
        { PLATID_CPU_SH_3_7709   , PLATID_MACH_HITACHI_PERSONA_HPW50PAD    ,
    8,      640,      240,      640, 0xb2000000 },^M
+       { PLATID_CPU_SH_3_7709   , PLATID_MACH_HITACHI_PERSONA_HPW200EC    ,
    8,      640,      240,      640, 0Xb2000000 },^M
        { PLATID_CPU_SH_3_7709   , PLATID_MACH_HITACHI_PERSONA_HPW230JC    ,
    8,      640,      240,      640, 0xb2000000 },^M
        // SH7709A (P2 address)^M
        { PLATID_CPU_SH_3_7709A  , PLATID_MACH_HP_JORNADA                  ,
   16,      640,      240,     1280, 0xb2000000 },^M

end machine_config.diff
>Release-Note:
>Audit-Trail:
>Unformatted: