fdc: remove sparc sun4m mutations
They were introduced in6f7e9aec5e
and82407d1a40
and lots of bug fixes were done after that. This fixes (at least) the detection of the floppy controller on Debian 4.0r9/SPARC, and SS-5's OBP initialization routine still works. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-id: 1426351846-6497-1-git-send-email-hpoussin@reactos.org Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
a9392bc93c
commit
24a5c62cfe
|
@ -535,8 +535,6 @@ struct FDCtrl {
|
||||||
uint8_t pwrd;
|
uint8_t pwrd;
|
||||||
/* Floppy drives */
|
/* Floppy drives */
|
||||||
uint8_t num_floppies;
|
uint8_t num_floppies;
|
||||||
/* Sun4m quirks? */
|
|
||||||
int sun4m;
|
|
||||||
FDrive drives[MAX_FD];
|
FDrive drives[MAX_FD];
|
||||||
int reset_sensei;
|
int reset_sensei;
|
||||||
uint32_t check_media_rate;
|
uint32_t check_media_rate;
|
||||||
|
@ -885,13 +883,6 @@ static void fdctrl_reset_irq(FDCtrl *fdctrl)
|
||||||
|
|
||||||
static void fdctrl_raise_irq(FDCtrl *fdctrl)
|
static void fdctrl_raise_irq(FDCtrl *fdctrl)
|
||||||
{
|
{
|
||||||
/* Sparc mutation */
|
|
||||||
if (fdctrl->sun4m && (fdctrl->msr & FD_MSR_CMDBUSY)) {
|
|
||||||
/* XXX: not sure */
|
|
||||||
fdctrl->msr &= ~FD_MSR_CMDBUSY;
|
|
||||||
fdctrl->msr |= FD_MSR_RQM | FD_MSR_DIO;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!(fdctrl->sra & FD_SRA_INTPEND)) {
|
if (!(fdctrl->sra & FD_SRA_INTPEND)) {
|
||||||
qemu_set_irq(fdctrl->irq, 1);
|
qemu_set_irq(fdctrl->irq, 1);
|
||||||
fdctrl->sra |= FD_SRA_INTPEND;
|
fdctrl->sra |= FD_SRA_INTPEND;
|
||||||
|
@ -1080,12 +1071,6 @@ static uint32_t fdctrl_read_main_status(FDCtrl *fdctrl)
|
||||||
fdctrl->dsr &= ~FD_DSR_PWRDOWN;
|
fdctrl->dsr &= ~FD_DSR_PWRDOWN;
|
||||||
fdctrl->dor |= FD_DOR_nRESET;
|
fdctrl->dor |= FD_DOR_nRESET;
|
||||||
|
|
||||||
/* Sparc mutation */
|
|
||||||
if (fdctrl->sun4m) {
|
|
||||||
retval |= FD_MSR_DIO;
|
|
||||||
fdctrl_reset_irq(fdctrl);
|
|
||||||
};
|
|
||||||
|
|
||||||
FLOPPY_DPRINTF("main status register: 0x%02x\n", retval);
|
FLOPPY_DPRINTF("main status register: 0x%02x\n", retval);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
@ -2241,8 +2226,6 @@ static void sun4m_fdc_initfn(Object *obj)
|
||||||
FDCtrlSysBus *sys = SYSBUS_FDC(obj);
|
FDCtrlSysBus *sys = SYSBUS_FDC(obj);
|
||||||
FDCtrl *fdctrl = &sys->state;
|
FDCtrl *fdctrl = &sys->state;
|
||||||
|
|
||||||
fdctrl->sun4m = 1;
|
|
||||||
|
|
||||||
memory_region_init_io(&fdctrl->iomem, obj, &fdctrl_mem_strict_ops,
|
memory_region_init_io(&fdctrl->iomem, obj, &fdctrl_mem_strict_ops,
|
||||||
fdctrl, "fdctrl", 0x08);
|
fdctrl, "fdctrl", 0x08);
|
||||||
sysbus_init_mmio(sbd, &fdctrl->iomem);
|
sysbus_init_mmio(sbd, &fdctrl->iomem);
|
||||||
|
|
Loading…
Reference in a new issue