[3/7] hppa: remove ISA region
diff mbox series

Message ID 20191020204724.31537-4-svens@stackframe.org
State New
Headers show
Series
  • HPPA: i82596, PS/2 and graphics emulation
Related show

Commit Message

Sven Schnelle Oct. 20, 2019, 8:47 p.m. UTC
B160L doesn't have an ISA bus, and we no longer need it to
workaround missing hardware, so remove it.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
---
 hw/hppa/hppa_hardware.h |  1 -
 hw/hppa/machine.c       | 32 --------------------------------
 2 files changed, 33 deletions(-)

Comments

Richard Henderson Oct. 21, 2019, 6:17 p.m. UTC | #1
On 10/20/19 1:47 PM, Sven Schnelle wrote:
> B160L doesn't have an ISA bus, and we no longer need it to
> workaround missing hardware, so remove it.
> 
> Signed-off-by: Sven Schnelle <svens@stackframe.org>
> ---
>  hw/hppa/hppa_hardware.h |  1 -
>  hw/hppa/machine.c       | 32 --------------------------------
>  2 files changed, 33 deletions(-)

This should remove ISA_BUS from hw/hppa/Kconfig as well.


r~
Sven Schnelle Oct. 21, 2019, 8:58 p.m. UTC | #2
Hi Richard,

On Mon, Oct 21, 2019 at 11:17:24AM -0700, Richard Henderson wrote:
> On 10/20/19 1:47 PM, Sven Schnelle wrote:
> > B160L doesn't have an ISA bus, and we no longer need it to
> > workaround missing hardware, so remove it.
> > 
> > Signed-off-by: Sven Schnelle <svens@stackframe.org>
> > ---
> >  hw/hppa/hppa_hardware.h |  1 -
> >  hw/hppa/machine.c       | 32 --------------------------------
> >  2 files changed, 33 deletions(-)
> 
> This should remove ISA_BUS from hw/hppa/Kconfig as well.

Right. I thought to do so is easy, but that turned out to reveal a lot
of other issues:

- hppa is using the I8259 code, which relies on ISA
- hw/hppa/pci.c seems to only contain unused stuff
- LASI use hw/char/parallel.c, which relies on ISA. parallel.c could
  propably be split up into a ISA dependent part and a generic part

So it is more work to remove ISA completely, therefore i'll drop that
patch for now and submit it later again.

Thanks
Sven

Patch
diff mbox series

diff --git a/hw/hppa/hppa_hardware.h b/hw/hppa/hppa_hardware.h
index 507f91e05d..ce59cbbf94 100644
--- a/hw/hppa/hppa_hardware.h
+++ b/hw/hppa/hppa_hardware.h
@@ -26,7 +26,6 @@ 
 #define MEMORY_HPA      0xfffbf000
 
 #define PCI_HPA         DINO_HPA        /* PCI bus */
-#define IDE_HPA         0xf9000000      /* Boot disc controller */
 
 /* offsets to DINO HPA: */
 #define DINO_PCI_ADDR           0x064
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 65fc20ebed..542faae9be 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -22,30 +22,6 @@ 
 #include "qapi/error.h"
 #include "qemu/log.h"
 
-#define MAX_IDE_BUS 2
-
-static ISABus *hppa_isa_bus(void)
-{
-    ISABus *isa_bus;
-    qemu_irq *isa_irqs;
-    MemoryRegion *isa_region;
-
-    isa_region = g_new(MemoryRegion, 1);
-    memory_region_init_io(isa_region, NULL, &hppa_pci_ignore_ops,
-                          NULL, "isa-io", 0x800);
-    memory_region_add_subregion(get_system_memory(), IDE_HPA,
-                                isa_region);
-
-    isa_bus = isa_bus_new(NULL, get_system_memory(), isa_region,
-                          &error_abort);
-    isa_irqs = i8259_init(isa_bus,
-                          /* qemu_allocate_irq(dino_set_isa_irq, s, 0)); */
-                          NULL);
-    isa_bus_irqs(isa_bus, isa_irqs);
-
-    return isa_bus;
-}
-
 static uint64_t cpu_hppa_to_phys(void *opaque, uint64_t addr)
 {
     addr &= (0x10000000 - 1);
@@ -62,7 +38,6 @@  static void machine_hppa_init(MachineState *machine)
     const char *initrd_filename = machine->initrd_filename;
     DeviceState *dev;
     PCIBus *pci_bus;
-    ISABus *isa_bus;
     qemu_irq rtc_irq, serial_irq;
     char *firmware_filename;
     uint64_t firmware_low, firmware_high;
@@ -108,13 +83,6 @@  static void machine_hppa_init(MachineState *machine)
     pci_bus = dino_init(addr_space, &rtc_irq, &serial_irq);
     assert(pci_bus);
 
-    /* Create ISA bus. */
-    isa_bus = hppa_isa_bus();
-    assert(isa_bus);
-
-    /* Realtime clock, used by firmware for PDC_TOD call. */
-    mc146818_rtc_init(isa_bus, 2000, rtc_irq);
-
     /* Serial code setup.  */
     if (serial_hd(0)) {
         uint32_t addr = DINO_UART_HPA + 0x800;