sii3112: Remove duplicated code and use PCI IDE ops instead
commit4eefdf7c1baa41e59cf4792df887a033e86339db
authorBALATON Zoltan <balaton@eik.bme.hu>
Fri, 25 Jan 2019 19:52:11 +0000 (25 14:52 -0500)
committerJohn Snow <jsnow@redhat.com>
Fri, 25 Jan 2019 19:52:11 +0000 (25 14:52 -0500)
tree1e2c3a718e326d55332370204784e69954411e63
parent8ac98d1a97a7aeefe45f4a5af37d61caa41ded54
sii3112: Remove duplicated code and use PCI IDE ops instead

Parts of the SiI3112 mmio are identical to PCI IDE registers so we can
use the corresponding functions that were factored out into ide/pci.c.
This removes code duplication and simplifies the SiI3112 model which
also helped to spot a copy paste error where reading status of the
2nd channel read the 1st channel instead. This is also fixed here.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 793b6a7934ef2bba26b8d066bec446019efa6c5d.1547166960.git.balaton@eik.bme.hu
Signed-off-by: John Snow <jsnow@redhat.com>
hw/ide/sii3112.c