Received: from eggs.gnu.org ([2001:4830:134:3::10]:48051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC7Em-00087F-OH for qemu-devel@nongnu.org; Wed, 30 Nov 2016 10:56:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cC7El-0003rf-V9 for qemu-devel@nongnu.org; Wed, 30 Nov 2016 10:56:00 -0500 Date: Wed, 30 Nov 2016 16:55:46 +0100 From: Kevin Wolf Message-ID: <20161130155546.GA4703@noname.redhat.com> References: <1480434248-27138-1-git-send-email-clg@kaod.org> <1480434248-27138-26-git-send-email-clg@kaod.org> <921d5257-fff3-5cde-3da2-b58c94e5c792@kaod.org> <20161129180803.GC7080@noname.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for-2.9 25/30] block: add a model option for MTD devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?C=E9dric?= Le Goater Cc: Peter Maydell , qemu-devel@nongnu.org, qemu-arm@nongnu.org, Andrew Jeffery , Marcin Krzeminski , Peter Crosthwaite , Qemu-block , armbru@redhat.com Am 30.11.2016 um 16:09 hat C=E9dric Le Goater geschrieben: > On 11/29/2016 07:08 PM, Kevin Wolf wrote: > > Am 29.11.2016 um 18:30 hat C=E9dric Le Goater geschrieben: > >> On 11/29/2016 04:44 PM, C=E9dric Le Goater wrote: > >>> This could be used to define the flash model to use on some boards > >>> definitions. > >> > >> As this patch was part of a larger set, I did not send the whole=20 > >> set to qemu-block@ list. Could you please take a look at the proposa= l ?=20 > >=20 > > This is a device level option rather than a block backend one. We mes= sed > > up -drive in its early days by including some device options, but we > > don't generally want to add to this. > >=20 > > The correct way would be to add a qdev property for this and specify = it > > with -device or -global. >=20 > OK. I see. I should use something like this on the command line : >=20 > -drive file=3Dflash-romulus-test,format=3Draw,if=3Dmtd,id=3Dbmc \ > -device mx25l25635e,drive=3Dbmc \ > -drive file=3Dflash-romulus-test2,format=3Draw,if=3Dmtd,id=3Dbmc2 \ > -device mx25l25635e,drive=3Dbmc2 \ > -drive file=3Dromulus.pnor,format=3Draw,if=3Dmtd,id=3Dpnor \ > -device mx66l1g45g,drive=3Dpnor=20 I think you mean if=3Dnone instead of if=3Dmtd everywhere, now that you'r= e using an explicit -device. > and retrieve the attached m25p80 device from the drive with the=20 > routine blk_get_attached_dev(). That is changing a bit the way > the platform is initialized but it is cleaner as no default=20 > devices are automatically added. Right. For compatibility (and convenience) you can and probably should still support if=3Dmtd to create the device automatically, but then the user just gets the defaults for the options that -drive doesn't allow to specify. Kevin