Skip to content

Commit

Permalink
hw/ide/pci: Replace some magic numbers by constants
Browse files Browse the repository at this point in the history
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20230531211043.41724-7-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
  • Loading branch information
shentok authored and philmd committed Jul 10, 2023
1 parent 5fe2421 commit 17d6a4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw/ide/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val)

void bmdma_status_writeb(BMDMAState *bm, uint32_t val)
{
bm->status = (val & 0x60) | (bm->status & 1) | (bm->status & ~val & 0x06);
bm->status = (val & 0x60) | (bm->status & BM_STATUS_DMAING)
| (bm->status & ~val & (BM_STATUS_ERROR | BM_STATUS_INT));
}

static uint64_t bmdma_addr_read(void *opaque, hwaddr addr,
Expand Down

0 comments on commit 17d6a4a

Please sign in to comment.