From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sbt29-0003YO-1g for qemu-devel@nongnu.org; Tue, 05 Jun 2012 08:38:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sbt22-0005Vu-Aq for qemu-devel@nongnu.org; Tue, 05 Jun 2012 08:38:48 -0400 Received: from cantor2.suse.de ([195.135.220.15]:57068 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sbt22-0005Ve-1L for qemu-devel@nongnu.org; Tue, 05 Jun 2012 08:38:42 -0400 Message-ID: <4FCDFDCC.7080600@suse.de> Date: Tue, 05 Jun 2012 14:38:36 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <26d832cdffc1b31cfe1aa6fa9ca50f66d6fb9f71.1333088411.git.peter.crosthwaite@petalogix.com> <4F7C445D.3070807@suse.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH v1 2/4] m25p80: initial verion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: edgar.iglesias@gmail.com, Paolo Bonzini , qemu-devel@nongnu.org, john.williams@petalogix.com, paul@codesourcery.com Am 05.06.2012 02:47, schrieb Peter Crosthwaite: > On Wed, Apr 4, 2012 at 10:53 PM, Andreas F=E4rber wr= ote: >> Am 30.03.2012 08:37, schrieb Peter A. G. Crosthwaite: >>> Added device model for m25p80 SPI flash >>> >>> Signed-off-by: Peter A. G. Crosthwaite >>> --- >>> Makefile.target | 1 + >>> hw/m25p80.c | 495 +++++++++++++++++++++++++++++++++++++++++++++= ++++++++++ >>> 2 files changed, 496 insertions(+), 0 deletions(-) >>> create mode 100644 hw/m25p80.c >>> >>> diff --git a/Makefile.target b/Makefile.target >>> index 8fd3718..fcccf1b 100644 >>> --- a/Makefile.target >>> +++ b/Makefile.target >>> @@ -321,6 +321,7 @@ obj-microblaze-y =3D petalogix_s3adsp1800_mmu.o >>> obj-microblaze-y +=3D petalogix_ml605_mmu.o >>> obj-microblaze-y +=3D microblaze_boot.o >>> obj-microblaze-y +=3D spi.o >>> +obj-microblaze-y +=3D m25p80.o >>> >>> obj-microblaze-y +=3D microblaze_pic_cpu.o >>> obj-microblaze-y +=3D xilinx_intc.o >>> diff --git a/hw/m25p80.c b/hw/m25p80.c >>> new file mode 100644 >>> index 0000000..2b67375 >>> --- /dev/null >>> +++ b/hw/m25p80.c >>> @@ -0,0 +1,495 @@ >>> +/* >>> + * ST M25P80 emulator. >> [snip] >> >> A device by ST does not sound microblaze-specific and in that case, >> similar to the recent Atmel maxtouch device, should go into >> hw-obj-$(CONFIG_M25P80) instead so that it's compiled only once for >> microblaze-softmmu and microblazeel-softmmu. >> >=20 > Hi Andreas, >=20 > I have regenerated this series, but have not actioned this just yet. I > think adding a config switch is probably not the right solution, as > its just a device model. If every device model has a config switch > then isnt creating everyone config process going to be excessively > tedious? perhaps it can just live next to obj-y=3Dssi.o? I.E. if you > have SSI, then you have m25p80. I cant think of a case where you would > want SSI but need to exclude m25p80 from the build. I think you're missing the point here. Whenever I touch, e.g., include/qemu/object.h, it takes an awfully long time to rebuild all targets because, among others, you are unneccessarily duplicating device model objects between microblaze and microblazeel. Devices by definition do not depend on target endianness (they specify their endianness in code) and should be built in libhw32/64. The mechanism to do so is defining flags in default-configs/microblaze[el]-softmmu.mak. For example, I had locally started a CONFIG_XILINX iirc, to share devices between microblaze and ppc4xx, then there might be CONFIG_XILINX_PPC and CONFIG_XILINX_MICROBLAZE for target-specific ones. My suggestion here was to use CONFIG_M25P80 but if you have a better grouping that would be fine, too. CONFIG_SSI maybe? Or if the amount of such devices is large and to be shared across targets you might consider your own Makefile like default-configs/pci.mak that can be included from multiple *-softmmu.mak files. Note however that Paolo has posted a series on the list refactoring the whole Makefile system with which any such changes / additions clash. Cc'ing Paolo so he can comment on the intended timing. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg