* [Qemu-devel] [Patch 2/2][PXA27x] Mainstone keypad support
@ 2007-12-12 1:46 Armin
0 siblings, 0 replies; only message in thread
From: Armin @ 2007-12-12 1:46 UTC (permalink / raw)
To: qemu-devel
[-- 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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-12 1:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-12 1:46 [Qemu-devel] [Patch 2/2][PXA27x] Mainstone keypad support Armin
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.