Skip to content
Snippets Groups Projects
Commit bd8ee11a authored by Sebastian Herbszt's avatar Sebastian Herbszt Committed by Anthony Liguori
Browse files

lsi53c895a: Implement Scratch Byte Register


Fixes the following errors:

lsi_scsi: error: Unhandled writeb 0x3a = 0x0
lsi_scsi: error: readb 0x3a

Signed-off-by: default avatarSebastian Herbszt <herbszt@gmx.de>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent 28c2c264
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......@@ -1408,6 +1410,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 */
......@@ -1622,6 +1626,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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment