summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Herbszt <herbszt@gmx.de>2009-06-13 23:03:26 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-16 17:46:57 -0500
commit04f4e710a06cc024a98e3e90be6fcf096d0dd0d3 (patch)
treee059943c558928e0cb984e80d5a460b968e5b608
parentaccceed914ff6cd0ba9258ff76659141ea24bb62 (diff)
downloadqemu-04f4e710a06cc024a98e3e90be6fcf096d0dd0d3.tar.gz
lsi53c895a: Implement Scratch Byte Register
Fixes the following errors: lsi_scsi: error: Unhandled writeb 0x3a = 0x0 lsi_scsi: error: readb 0x3a (cherry picked from commit bd8ee11a6b19343f4ad0a1c5d16869584f609369) Signed-off-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/lsi53c895a.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index 1f4f8b7ef7..c22bd1598b 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -262,6 +262,7 @@ typedef struct {
uint32_t sbc;
uint32_t csbc;
uint32_t scratch[18]; /* SCRATCHA-SCRATCHR */
+ uint8_t sbr;
/* Script ram is stored as 32-bit words in host byteorder. */
uint32_t script_ram[2048];
@@ -330,6 +331,7 @@ static void lsi_soft_reset(LSIState *s)
s->ia = 0;
s->sbc = 0;
s->csbc = 0;
+ s->sbr = 0;
}
static int lsi_dma_40bit(LSIState *s)
@@ -1407,6 +1409,8 @@ static uint8_t lsi_reg_readb(LSIState *s, int offset)
return s->dmode;
case 0x39: /* DIEN */
return s->dien;
+ case 0x3a: /* SBR */
+ return s->sbr;
case 0x3b: /* DCNTL */
return s->dcntl;
case 0x40: /* SIEN0 */
@@ -1621,6 +1625,9 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val)
s->dien = val;
lsi_update_irq(s);
break;
+ case 0x3a: /* SBR */
+ s->sbr = val;
+ break;
case 0x3b: /* DCNTL */
s->dcntl = val & ~(LSI_DCNTL_PFF | LSI_DCNTL_STD);
if ((val & LSI_DCNTL_STD) && (s->istat1 & LSI_ISTAT1_SRUN) == 0)