From: Armin <akuster@kama-aina.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Patch 2/2][PXA27x] Mainstone keypad support
Date: Tue, 11 Dec 2007 15:46:49 -1000 [thread overview]
Message-ID: <475F3D89.5040001@kama-aina.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 203 bytes --]
This is the mainstone II keypad support for alpha numeric keypad.
excludes the multiswitch and rotatory switch support
Needs "[Patch 1/2][PXA27x] initial keypad support" patch in order to work
- Armin
[-- Attachment #2: mst_keypad.patch --]
[-- Type: text/x-patch, Size: 2272 bytes --]
Index: qemu/hw/mainstone.c
===================================================================
--- qemu.orig/hw/mainstone.c
+++ qemu/hw/mainstone.c
@@ -78,6 +78,7 @@ static void mainstone_common_init(int ra
}
mst_irq = mst_irq_init(cpu, MST_FPGA_PHYS, PXA2XX_PIC_GPIO_0);
+ mst_keyboard_register(cpu->kp);
/* MMC/SD host */
pxa2xx_mmci_handlers(cpu->mmc, NULL, mst_irq[MMC_IRQ]);
Index: qemu/hw/mst_kpad.c
===================================================================
--- /dev/null
+++ qemu/hw/mst_kpad.c
@@ -0,0 +1,30 @@
+/*
+ * PXA270-based Intel Mainstone Keypad support.
+ *
+ * Copyright (c) 2007 by Armin Kuster <akuster@kama-aina.net> or
+ * <akuster@mvista.com>
+ *
+ * This code is licensed under the GNU GPL v2.
+ */
+
+
+#include "hw.h"
+#include "pxa.h"
+
+/* main keypad layout */
+int mst_keymap[PXAKBD_MAXROW][PXAKBD_MAXCOL] = {
+ { 0x1e, 0x30, 0x2e, 0x20, 0x12, 0x21, -1, -1},
+ { 0x22, 0x23, 0x17, 0x24, 0x25, 0x26, -1, -1},
+ { 0x32, 0x31, 0x18, 0x19, 0x10, 0x13, -1, -1},
+ { 0x1f, 0x14, 0x16, 0x2f, 0x11, 0x2d, -1, -1},
+ { -1, -1, 0x15, 0x2c, -1, -1, -1, -1},
+ { 0xc7, 0x2a, 0x39, 0x39, -1, 0x1c, -1, -1},
+ { 0xc8, 0xd0, 0xcb, 0xcd, -1, -1, -1, -1},
+ { -1, -1, -1, -1, -1, -1, -1, -1}
+};
+
+void mst_keyboard_register(struct pxa2xx_keypad_s *kp)
+{
+ pxa27_register_keyboard(kp, mst_keymap, sizeof(mst_keymap));
+
+}
Index: qemu/hw/mainstone.h
===================================================================
--- qemu.orig/hw/mainstone.h
+++ qemu/hw/mainstone.h
@@ -34,5 +34,5 @@
extern qemu_irq
*mst_irq_init(struct pxa2xx_state_s *cpu, uint32_t base, int irq);
-
+extern void mst_keyboard_register(struct pxa2xx_keypad_s *kp);
#endif /* __MAINSTONE_H__ */
Index: qemu/Makefile.target
===================================================================
--- qemu.orig/Makefile.target
+++ qemu/Makefile.target
@@ -499,7 +499,7 @@ VL_OBJS+= pflash_cfi01.o gumstix.o
VL_OBJS+= spitz.o ide.o serial.o nand.o ecc.o
VL_OBJS+= omap.o omap_lcdc.o omap1_clk.o omap_mmc.o omap_i2c.o
VL_OBJS+= palm.o tsc210x.o
-VL_OBJS+= mst_fpga.o mainstone.o
+VL_OBJS+= mst_fpga.o mainstone.o mst_kpad.o
CPPFLAGS += -DHAS_AUDIO
endif
ifeq ($(TARGET_BASE_ARCH), sh4)
reply other threads:[~2007-12-12 1:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=475F3D89.5040001@kama-aina.net \
--to=akuster@kama-aina.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.