Patchwork mips malta: Use qdev for i8042 setup

login
register
mail settings
Submitter Stefan Weil
Date Aug. 28, 2009, 11:56 a.m.
Message ID <1251460597-11518-1-git-send-email-weil@mail.berlios.de>
Download mbox | patch
Permalink /patch/32357/
State Superseded
Headers show

Comments

Stefan Weil - Aug. 28, 2009, 11:56 a.m.
This is just a copy of similar changes which were applied to pc.c.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 hw/mips_malta.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Stefan Weil - Aug. 28, 2009, 12:13 p.m.
Stefan Weil schrieb:
> This is just a copy of similar changes which were applied to pc.c.
>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
>  hw/mips_malta.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/hw/mips_malta.c b/hw/mips_malta.c
> index a70d79e..23c257a 100644
> --- a/hw/mips_malta.c
> +++ b/hw/mips_malta.c
> @@ -765,6 +765,7 @@ void mips_malta_init (ram_addr_t ram_size,
>      target_long bios_size;
>      int64_t kernel_entry;
>      PCIBus *pci_bus;
> +    ISADevice *isa_dev;
>      CPUState *env;
>      RTCState *rtc_state;
>      fdctrl_t *floppy_controller;
> @@ -920,7 +921,8 @@ void mips_malta_init (ram_addr_t ram_size,
>      DMA_init(0);
>  
>      /* Super I/O */
> -    i8042_init(i8259[1], i8259[12], 0x60);
> +    isa_dev = isa_create_simple("i8042", 0x60, 0x64, 1, 12);
> + 
>      rtc_state = rtc_init(0x70, i8259[8], 2000);
>      serial_init(0x3f8, i8259[4], 115200, serial_hds[0]);
>      serial_init(0x2f8, i8259[3], 115200, serial_hds[1]);
>   

Please don't use this patch. It results in a runtime error because
isa interrupts are uninitialized.

Stefan

Patch

diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index a70d79e..23c257a 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -765,6 +765,7 @@  void mips_malta_init (ram_addr_t ram_size,
     target_long bios_size;
     int64_t kernel_entry;
     PCIBus *pci_bus;
+    ISADevice *isa_dev;
     CPUState *env;
     RTCState *rtc_state;
     fdctrl_t *floppy_controller;
@@ -920,7 +921,8 @@  void mips_malta_init (ram_addr_t ram_size,
     DMA_init(0);
 
     /* Super I/O */
-    i8042_init(i8259[1], i8259[12], 0x60);
+    isa_dev = isa_create_simple("i8042", 0x60, 0x64, 1, 12);
+ 
     rtc_state = rtc_init(0x70, i8259[8], 2000);
     serial_init(0x3f8, i8259[4], 115200, serial_hds[0]);
     serial_init(0x2f8, i8259[3], 115200, serial_hds[1]);