qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Let ESP SCSI adapter to be usable outside sun4m


From: Hervé Poussineau
Subject: [Qemu-devel] [PATCH] Let ESP SCSI adapter to be usable outside sun4m
Date: Sun, 24 Feb 2008 22:07:11 +0100
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

Hi,

At the moment, ESP SCSI adapter can only be used inside sun4m machines.
Attached patch moves the declaration outside sun4m.h, so other machines can also use it. I've moved the declaration to devices.h because I found no better place to put it. If you know a better place, please tell me :)

Hervé
Index: Makefile.target
===================================================================
RCS file: /sources/qemu/qemu/Makefile.target,v
retrieving revision 1.245
diff -u -r1.245 Makefile.target
--- Makefile.target     10 Feb 2008 16:33:12 -0000      1.245
+++ Makefile.target     24 Feb 2008 20:43:50 -0000
@@ -511,7 +511,7 @@
 endif
 
 # SCSI layer
-OBJS+= lsi53c895a.o
+OBJS+= lsi53c895a.o esp.o
 
 # USB layer
 OBJS+= usb-ohci.o
@@ -573,7 +573,7 @@
 OBJS+= cirrus_vga.o parallel.o ptimer.o
 else
 OBJS+= sun4m.o tcx.o pcnet.o iommu.o m48t59.o slavio_intctl.o
-OBJS+= slavio_timer.o slavio_serial.o slavio_misc.o fdc.o esp.o sparc32_dma.o
+OBJS+= slavio_timer.o slavio_serial.o slavio_misc.o fdc.o sparc32_dma.o
 OBJS+= cs4231.o ptimer.o eccmemctl.o sbi.o sun4c_intctl.o
 endif
 endif
Index: hw/devices.h
===================================================================
RCS file: /sources/qemu/qemu/hw/devices.h,v
retrieving revision 1.2
diff -u -r1.2 devices.h
--- hw/devices.h        18 Nov 2007 14:36:08 -0000      1.2
+++ hw/devices.h        24 Feb 2008 20:57:22 -0000
@@ -16,6 +16,16 @@
 void ads7846_write(void *opaque, uint32_t value);
 struct ads7846_state_s *ads7846_init(qemu_irq penirq);
 
+/* esp.c */
+#ifdef CPU_DEFS_H
+#define ESP_MAX_DEVS 7
+void esp_scsi_attach(void *opaque, BlockDriverState *bd, int id);
+void *esp_init(target_phys_addr_t espaddr,
+               void *dma_opaque, qemu_irq irq, qemu_irq *reset);
+void espdma_memory_read(void *opaque, uint8_t *buf, int len);
+void espdma_memory_write(void *opaque, uint8_t *buf, int len);
+#endif
+
 /* stellaris_input.c */
 void stellaris_gamepad_init(int n, qemu_irq *irq, const int *keycode);
 
Index: hw/esp.c
===================================================================
RCS file: /sources/qemu/qemu/hw/esp.c,v
retrieving revision 1.33
diff -u -r1.33 esp.c
--- hw/esp.c    1 Jan 2008 17:06:38 -0000       1.33
+++ hw/esp.c    24 Feb 2008 20:50:30 -0000
@@ -24,9 +24,7 @@
 #include "hw.h"
 #include "block.h"
 #include "scsi-disk.h"
-#include "sun4m.h"
-/* FIXME: Only needed for MAX_DISKS, which is probably wrong.  */
-#include "sysemu.h"
+#include "devices.h"
 
 /* debug ESP card */
 //#define DEBUG_ESP
Index: hw/sun4m.c
===================================================================
RCS file: /sources/qemu/qemu/hw/sun4m.c,v
retrieving revision 1.84
diff -u -r1.84 sun4m.c
--- hw/sun4m.c  11 Feb 2008 20:01:36 -0000      1.84
+++ hw/sun4m.c  24 Feb 2008 20:46:24 -0000
@@ -31,6 +31,7 @@
 #include "net.h"
 #include "boards.h"
 #include "firmware_abi.h"
+#include "devices.h"
 
 //#define DEBUG_IRQ
 
Index: hw/sun4m.h
===================================================================
RCS file: /sources/qemu/qemu/hw/sun4m.h,v
retrieving revision 1.10
diff -u -r1.10 sun4m.h
--- hw/sun4m.h  27 Jan 2008 09:49:28 -0000      1.10
+++ hw/sun4m.h  24 Feb 2008 20:45:42 -0000
@@ -59,12 +59,6 @@
                        CPUState *env);
 void slavio_set_power_fail(void *opaque, int power_failing);
 
-/* esp.c */
-#define ESP_MAX_DEVS 7
-void esp_scsi_attach(void *opaque, BlockDriverState *bd, int id);
-void *esp_init(target_phys_addr_t espaddr,
-               void *dma_opaque, qemu_irq irq, qemu_irq *reset);
-
 /* cs4231.c */
 void cs_init(target_phys_addr_t base, int irq, void *intctl);
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]