summaryrefslogtreecommitdiff
path: root/hw/kdrive/neomagic/neomagicstub.c
diff options
context:
space:
mode:
authorBrent Cook <busterbcook@yahoo.com>2004-04-03 22:26:37 +0000
committerBrent Cook <busterbcook@yahoo.com>2004-04-03 22:26:37 +0000
commit530371ceaf7f593badf38bbc2d2e50f6a920d24f (patch)
tree1f54623b19c386cd4b976c6e0ec8637552b22ebb /hw/kdrive/neomagic/neomagicstub.c
parent962b898868dcab959c390986dcb0b4dd750dc107 (diff)
added touchscreen support, detect all known PCI chips in the Neomagic line.
We'll not bother with ISA for now.
Diffstat (limited to 'hw/kdrive/neomagic/neomagicstub.c')
-rw-r--r--hw/kdrive/neomagic/neomagicstub.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/hw/kdrive/neomagic/neomagicstub.c b/hw/kdrive/neomagic/neomagicstub.c
index 9b57b4822..e8490bed8 100644
--- a/hw/kdrive/neomagic/neomagicstub.c
+++ b/hw/kdrive/neomagic/neomagicstub.c
@@ -26,13 +26,20 @@
#endif
#include "neomagic.h"
+extern struct NeoChipInfo neoChips[];
+
void
InitCard (char *name)
{
KdCardAttr attr;
- // NM2230 MagicGraph 256AV+ the only card I have for testing
- if (LinuxFindPci (NEOMAGIC_VENDOR, NEOMAGIC_NM2230, 0, &attr))
- KdCardInfoAdd (&neoFuncs, &attr, 0);
+ struct NeoChipInfo *chip;
+
+ for (chip = neoChips; chip->name != NULL; ++chip) {
+ int j = 0;
+ while (LinuxFindPci(chip->vendor, chip->device, j++, &attr)) {
+ KdCardInfoAdd(&neoFuncs, &attr, 0);
+ }
+ }
}
void
@@ -45,6 +52,9 @@ void
InitInput (int argc, char **argv)
{
KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs);
+#ifdef TOUCHSCREEN
+ KdInitTouchScreen (&TsFuncs);
+#endif
}
void