[4/5] lsi: Adjust some register reset values

Submitted by Jan Kiszka on May 4, 2010, 12:21 p.m.

Details

Message ID 0b8fdd26a81cc5d8ce9dc6a7c9773c4e05f37c9d.1272975660.git.jan.kiszka@siemens.com
State New
Headers show

Commit Message

Jan Kiszka May 4, 2010, 12:21 p.m.
According to the LSI spec, the reset value of dcmd, dstat, and ctest2
were wrong, and sdid as well as ssid require zero initialization. There
are surely more discrepancies, this is just another increment.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/lsi53c895a.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index 61de23e..f088d06 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -298,8 +298,8 @@  static void lsi_soft_reset(LSIState *s)
     memset(s->scratch, 0, sizeof(s->scratch));
     s->istat0 = 0;
     s->istat1 = 0;
-    s->dcmd = 0;
-    s->dstat = 0;
+    s->dcmd = 0x40;
+    s->dstat = LSI_DSTAT_DFE;
     s->dien = 0;
     s->sist0 = 0;
     s->sist1 = 0;
@@ -308,7 +308,7 @@  static void lsi_soft_reset(LSIState *s)
     s->mbox0 = 0;
     s->mbox1 = 0;
     s->dfifo = 0;
-    s->ctest2 = 0;
+    s->ctest2 = LSI_CTEST2_DACK;
     s->ctest3 = 0;
     s->ctest4 = 0;
     s->ctest5 = 0;
@@ -327,6 +327,8 @@  static void lsi_soft_reset(LSIState *s)
     s->scid = 7;
     s->sxfer = 0;
     s->socl = 0;
+    s->sdid = 0;
+    s->ssid = 0;
     s->stest1 = 0;
     s->stest2 = 0;
     s->stest3 = 0;