From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JTO4B-0005Y2-JR for qemu-devel@nongnu.org; Sun, 24 Feb 2008 16:07:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JTO48-0005VW-S5 for qemu-devel@nongnu.org; Sun, 24 Feb 2008 16:07:23 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JTO48-0005VP-Lk for qemu-devel@nongnu.org; Sun, 24 Feb 2008 16:07:20 -0500 Received: from smtp3-g19.free.fr ([212.27.42.29]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JTO48-0008PD-3n for qemu-devel@nongnu.org; Sun, 24 Feb 2008 16:07:20 -0500 Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id F367317B52E for ; Sun, 24 Feb 2008 22:07:06 +0100 (CET) Received: from [127.0.0.1] (rob92-10-88-171-126-33.fbx.proxad.net [88.171.126.33]) by smtp3-g19.free.fr (Postfix) with ESMTP id C244017B537 for ; Sun, 24 Feb 2008 22:07:06 +0100 (CET) Message-ID: <47C1DC7F.8090203@reactos.org> Date: Sun, 24 Feb 2008 22:07:11 +0100 From: =?ISO-8859-1?Q?Herv=E9_Poussineau?= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080203060601040108020404" Subject: [Qemu-devel] [PATCH] Let ESP SCSI adapter to be usable outside sun4m Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------080203060601040108020404 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable 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=20 can also use it. I've moved the declaration to devices.h because I found no better place=20 to put it. If you know a better place, please tell me :) Herv=E9 --------------080203060601040108020404 Content-Type: text/plain; name="esp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="esp.patch" 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); --------------080203060601040108020404--