Patchwork [RFC,5/6] m48t59: hack(?) to make it work on IBM 43p

login
register
mail settings
Submitter Hervé Poussineau
Date March 14, 2013, 10:12 p.m.
Message ID <1363299128-8494-6-git-send-email-hpoussin@reactos.org>
Download mbox | patch
Permalink /patch/227822/
State New
Headers show

Comments

Hervé Poussineau - March 14, 2013, 10:12 p.m.
Document it for the IBM 43p emulation.
---
 docs/ibm_43p.cfg |    6 ++++++
 hw/m48t59.c      |    2 ++
 2 files changed, 8 insertions(+)

Patch

diff --git a/docs/ibm_43p.cfg b/docs/ibm_43p.cfg
index 92c9e8f..55329e3 100644
--- a/docs/ibm_43p.cfg
+++ b/docs/ibm_43p.cfg
@@ -11,6 +11,12 @@ 
 # them all.
 
 [device]
+  driver = "m48t59_isa"
+  io_base = "0x74"
+  model = "59"
+  size = "0x1000"
+
+[device]
   driver = "i8042"
 
 [device]
diff --git a/hw/m48t59.c b/hw/m48t59.c
index 1093716..c71ba7b 100644
--- a/hw/m48t59.c
+++ b/hw/m48t59.c
@@ -491,6 +491,7 @@  static void NVRAM_writeb(void *opaque, hwaddr addr, uint64_t val,
         NVRAM->addr &= ~0xFF00;
         NVRAM->addr |= val << 8;
         break;
+    case 2:
     case 3:
         m48t59_write(NVRAM, NVRAM->addr, val);
         NVRAM->addr = 0x0000;
@@ -506,6 +507,7 @@  static uint64_t NVRAM_readb(void *opaque, hwaddr addr, unsigned size)
     uint32_t retval;
 
     switch (addr) {
+    case 2:
     case 3:
         retval = m48t59_read(NVRAM, NVRAM->addr);
         break;