All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Qemu-block <qemu-block@nongnu.org>,
	Andrew Jeffery <andrew@aj.id.au>,
	Marcin Krzeminski <marcin.krzeminski@nokia.com>,
	qemu-devel@nongnu.org, armbru@redhat.com, qemu-arm@nongnu.org
Subject: Re: [Qemu-arm] [PATCH for-2.9 25/30] block: add a model option for MTD devices
Date: Wed, 30 Nov 2016 16:55:46 +0100	[thread overview]
Message-ID: <20161130155546.GA4703@noname.redhat.com> (raw)
In-Reply-To: <fc7bced6-9e03-f0a5-b991-52566a42d288@kaod.org>

Am 30.11.2016 um 16:09 hat Cédric Le Goater geschrieben:
> On 11/29/2016 07:08 PM, Kevin Wolf wrote:
> > Am 29.11.2016 um 18:30 hat Cédric Le Goater geschrieben:
> >> On 11/29/2016 04:44 PM, Cédric 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 
> >> set to qemu-block@ list. Could you please take a look at the proposal ? 
> > 
> > This is a device level option rather than a block backend one. We messed
> > up -drive in its early days by including some device options, but we
> > don't generally want to add to this.
> > 
> > The correct way would be to add a qdev property for this and specify it
> > with -device or -global.
> 
> OK. I see. I should use something like this on the command line :
> 
> 	-drive file=flash-romulus-test,format=raw,if=mtd,id=bmc \
> 	-device mx25l25635e,drive=bmc \
> 	-drive file=flash-romulus-test2,format=raw,if=mtd,id=bmc2 \
> 	-device mx25l25635e,drive=bmc2 \
> 	-drive file=romulus.pnor,format=raw,if=mtd,id=pnor \
> 	-device mx66l1g45g,drive=pnor 

I think you mean if=none instead of if=mtd everywhere, now that you're
using an explicit -device.

> and retrieve the attached m25p80 device from the drive with the 
> routine blk_get_attached_dev(). That is changing a bit the way
> the platform is initialized but it is cleaner as no default 
> devices are automatically added.

Right. For compatibility (and convenience) you can and probably should
still support if=mtd to create the device automatically, but then the
user just gets the defaults for the options that -drive doesn't allow to
specify.

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: Kevin Wolf <kwolf@redhat.com>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	Andrew Jeffery <andrew@aj.id.au>,
	Marcin Krzeminski <marcin.krzeminski@nokia.com>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	Qemu-block <qemu-block@nongnu.org>,
	armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH for-2.9 25/30] block: add a model option for MTD devices
Date: Wed, 30 Nov 2016 16:55:46 +0100	[thread overview]
Message-ID: <20161130155546.GA4703@noname.redhat.com> (raw)
In-Reply-To: <fc7bced6-9e03-f0a5-b991-52566a42d288@kaod.org>

Am 30.11.2016 um 16:09 hat Cédric Le Goater geschrieben:
> On 11/29/2016 07:08 PM, Kevin Wolf wrote:
> > Am 29.11.2016 um 18:30 hat Cédric Le Goater geschrieben:
> >> On 11/29/2016 04:44 PM, Cédric 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 
> >> set to qemu-block@ list. Could you please take a look at the proposal ? 
> > 
> > This is a device level option rather than a block backend one. We messed
> > up -drive in its early days by including some device options, but we
> > don't generally want to add to this.
> > 
> > The correct way would be to add a qdev property for this and specify it
> > with -device or -global.
> 
> OK. I see. I should use something like this on the command line :
> 
> 	-drive file=flash-romulus-test,format=raw,if=mtd,id=bmc \
> 	-device mx25l25635e,drive=bmc \
> 	-drive file=flash-romulus-test2,format=raw,if=mtd,id=bmc2 \
> 	-device mx25l25635e,drive=bmc2 \
> 	-drive file=romulus.pnor,format=raw,if=mtd,id=pnor \
> 	-device mx66l1g45g,drive=pnor 

I think you mean if=none instead of if=mtd everywhere, now that you're
using an explicit -device.

> and retrieve the attached m25p80 device from the drive with the 
> routine blk_get_attached_dev(). That is changing a bit the way
> the platform is initialized but it is cleaner as no default 
> devices are automatically added.

Right. For compatibility (and convenience) you can and probably should
still support if=mtd to create the device automatically, but then the
user just gets the defaults for the options that -drive doesn't allow to
specify.

Kevin

  reply	other threads:[~2016-11-30 15:56 UTC|newest]

Thread overview: 128+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 15:43 [Qemu-arm] [PATCH for-2.9 00/30] Aspeed SoC fixes and model improvements Cédric Le Goater
2016-11-29 15:43 ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:43 ` [Qemu-devel] [PATCH for-2.9 01/30] target-arm: Add VBAR support to ARM1176 CPUs Cédric Le Goater
2016-11-29 15:43   ` Cédric Le Goater
2016-12-14 15:43   ` [Qemu-arm] " Peter Maydell
2016-12-14 15:43     ` [Qemu-devel] " Peter Maydell
2016-11-29 15:43 ` [Qemu-arm] [PATCH for-2.9 02/30] m25p80: add support for the mx66l1g45g Cédric Le Goater
2016-11-29 15:43   ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:43 ` [Qemu-arm] [PATCH for-2.9 03/30] aspeed: QOMify the CPU object and attach it to the SoC Cédric Le Goater
2016-11-29 15:43   ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:43 ` [Qemu-arm] [PATCH for-2.9 04/30] aspeed: remove cannot_destroy_with_object_finalize_yet Cédric Le Goater
2016-11-29 15:43   ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:43 ` [Qemu-arm] [PATCH for-2.9 05/30] aspeed: attach the second SPI controller object to the SoC Cédric Le Goater
2016-11-29 15:43   ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:43 ` [Qemu-arm] [PATCH for-2.9 06/30] aspeed: extend the board configuration with flash models Cédric Le Goater
2016-11-29 15:43   ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:43 ` [Qemu-devel] [PATCH for-2.9 07/30] aspeed: add support for the romulus-bmc board Cédric Le Goater
2016-11-29 15:43   ` Cédric Le Goater
2016-11-29 15:43 ` [Qemu-devel] [PATCH for-2.9 08/30] aspeed: add a memory region for SRAM Cédric Le Goater
2016-11-29 15:43   ` Cédric Le Goater
2016-11-29 15:43 ` [Qemu-arm] [PATCH for-2.9 09/30] aspeed: add the definitions for the AST2400 A1 SoC Cédric Le Goater
2016-11-29 15:43   ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:43 ` [Qemu-devel] [PATCH for-2.9 10/30] aspeed: change SoC revision of the palmetto-bmc machine Cédric Le Goater
2016-11-29 15:43   ` Cédric Le Goater
2016-11-29 15:43 ` [Qemu-arm] [PATCH for-2.9 11/30] aspeed/scu: fix SCU region size Cédric Le Goater
2016-11-29 15:43   ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:43 ` [Qemu-devel] [PATCH for-2.9 12/30] aspeed/smc: improve segment register support Cédric Le Goater
2016-11-29 15:43   ` Cédric Le Goater
2016-11-29 15:43 ` [Qemu-arm] [PATCH for-2.9 13/30] aspeed/smc: set the number of flash modules for the FMC controller Cédric Le Goater
2016-11-29 15:43   ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:43 ` [Qemu-arm] [PATCH for-2.9 14/30] aspeed/smc: rework the prototype of the AspeedSMCFlash helper routines Cédric Le Goater
2016-11-29 15:43   ` [Qemu-devel] " Cédric Le Goater
2016-12-14 17:09   ` [Qemu-arm] " Peter Maydell
2016-12-14 17:09     ` [Qemu-devel] " Peter Maydell
2016-12-15 13:38     ` [Qemu-arm] " Cédric Le Goater
2016-12-15 13:38       ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:43 ` [Qemu-arm] [PATCH for-2.9 15/30] aspeed/smc: introduce a aspeed_smc_flash_update_cs() helper Cédric Le Goater
2016-11-29 15:43   ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:43 ` [Qemu-devel] [PATCH for-2.9 16/30] aspeed/smc: autostrap CE0/1 configuration Cédric Le Goater
2016-11-29 15:43   ` Cédric Le Goater
2016-11-29 15:43 ` [Qemu-devel] [PATCH for-2.9 17/30] aspeed/smc: handle SPI flash Command mode Cédric Le Goater
2016-11-29 15:43   ` Cédric Le Goater
2016-12-04 16:31   ` [Qemu-arm] " mar.krzeminski
2016-12-04 16:31     ` mar.krzeminski
2016-12-05 14:07     ` Cédric Le Goater
2016-12-05 14:07       ` Cédric Le Goater
2016-12-05 15:33       ` [Qemu-arm] " mar.krzeminski
2016-12-05 15:33         ` mar.krzeminski
2017-01-02 15:56         ` Cédric Le Goater
2017-01-02 15:56           ` Cédric Le Goater
2017-01-02 17:33           ` [Qemu-arm] " mar.krzeminski
2017-01-02 17:33             ` mar.krzeminski
2017-01-02 18:02             ` [Qemu-arm] " Cédric Le Goater
2017-01-02 18:02               ` Cédric Le Goater
2017-01-02 18:21               ` [Qemu-arm] " mar.krzeminski
2017-01-02 18:21                 ` mar.krzeminski
2017-01-03 10:50                 ` [Qemu-arm] " Cédric Le Goater
2017-01-03 10:50                   ` Cédric Le Goater
2016-11-29 15:43 ` [Qemu-arm] [PATCH for-2.9 18/30] aspeed/smc: extend tests for " Cédric Le Goater
2016-11-29 15:43   ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:43 ` [Qemu-arm] [PATCH for-2.9 19/30] aspeed/smc: unfold the AspeedSMCController array Cédric Le Goater
2016-11-29 15:43   ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:43 ` [Qemu-arm] [PATCH for-2.9 20/30] aspeed/smc: add a 'sdram_base' property Cédric Le Goater
2016-11-29 15:43   ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:43 ` [Qemu-devel] [PATCH for-2.9 21/30] aspeed/smc: add support for DMAs Cédric Le Goater
2016-11-29 15:43   ` Cédric Le Goater
2016-11-29 15:44 ` [Qemu-arm] [PATCH for-2.9 22/30] aspeed/smc: handle dummy bytes when doing fast reads Cédric Le Goater
2016-11-29 15:44   ` [Qemu-devel] " Cédric Le Goater
2016-12-04 16:46   ` [Qemu-arm] " mar.krzeminski
2016-12-04 16:46     ` mar.krzeminski
2016-12-05 14:14     ` [Qemu-arm] " Cédric Le Goater
2016-12-05 14:14       ` Cédric Le Goater
2016-12-05 15:12       ` [Qemu-arm] " mar.krzeminski
2016-12-05 15:12         ` mar.krzeminski
2016-11-29 15:44 ` [Qemu-arm] [PATCH for-2.9 23/30] aspeed/smc: adjust the size of the register region Cédric Le Goater
2016-11-29 15:44   ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:44 ` [Qemu-devel] [PATCH for-2.9 24/30] aspeed: use first SPI flash as a boot ROM Cédric Le Goater
2016-11-29 15:44   ` Cédric Le Goater
2016-12-04 17:00   ` [Qemu-arm] " mar.krzeminski
2016-12-04 17:00     ` mar.krzeminski
2016-12-05  9:36     ` Cédric Le Goater
2016-12-05  9:36       ` Cédric Le Goater
2016-12-05  9:57       ` [Qemu-arm] " Marcin Krzemiński
2016-12-05  9:57         ` Marcin Krzemiński
2016-12-05 14:53         ` Cédric Le Goater
2016-12-05 14:53           ` Cédric Le Goater
2016-12-05 15:09           ` mar.krzeminski
2016-12-05 15:09             ` mar.krzeminski
2016-11-29 15:44 ` [Qemu-arm] [PATCH for-2.9 25/30] block: add a model option for MTD devices Cédric Le Goater
2016-11-29 15:44   ` [Qemu-devel] " Cédric Le Goater
2016-11-29 16:06   ` [Qemu-arm] " Cédric Le Goater
2016-11-29 16:06     ` [Qemu-devel] " Cédric Le Goater
2016-11-29 17:30   ` [Qemu-arm] " Cédric Le Goater
2016-11-29 17:30     ` [Qemu-devel] " Cédric Le Goater
2016-11-29 18:08     ` Kevin Wolf
2016-11-29 18:08       ` Kevin Wolf
2016-11-30 15:09       ` Cédric Le Goater
2016-11-30 15:09         ` Cédric Le Goater
2016-11-30 15:55         ` Kevin Wolf [this message]
2016-11-30 15:55           ` Kevin Wolf
2016-11-29 15:44 ` [Qemu-devel] [PATCH for-2.9 26/30] aspeed/smc: use flash model option Cédric Le Goater
2016-11-29 15:44   ` Cédric Le Goater
2016-11-30 16:26   ` Cédric Le Goater
2016-11-30 16:26     ` Cédric Le Goater
2016-11-29 15:44 ` [Qemu-arm] [PATCH for-2.9 27/30] wdt: Add Aspeed watchdog device model Cédric Le Goater
2016-11-29 15:44   ` [Qemu-devel] " Cédric Le Goater
2017-01-16 17:14   ` [Qemu-arm] " Cédric Le Goater
2017-01-16 17:14     ` [Qemu-devel] " Cédric Le Goater
2016-11-29 15:44 ` [Qemu-devel] [PATCH for-2.9 28/30] aspeed: add a watchdog controller Cédric Le Goater
2016-11-29 15:44   ` Cédric Le Goater
2016-11-30  2:01   ` [Qemu-arm] " Andrew Jeffery
2016-11-30  2:01     ` [Qemu-devel] " Andrew Jeffery
2016-11-29 16:07 ` [Qemu-devel] [PATCH for-2.9 29/30] aspeed/scu: add a aspeed_scu_get_clk() helper Cédric Le Goater
2016-11-29 16:07   ` Cédric Le Goater
2016-11-29 16:07   ` [Qemu-devel] [PATCH for-2.9 30/30] wdt: aspeed: use scu to get clock freq Cédric Le Goater
2016-11-29 16:07     ` Cédric Le Goater
2016-11-29 19:17     ` [Qemu-arm] " Cédric Le Goater
2016-11-29 19:17       ` [Qemu-devel] " Cédric Le Goater
2016-11-29 19:16   ` [Qemu-arm] [PATCH for-2.9 29/30] aspeed/scu: add a aspeed_scu_get_clk() helper Cédric Le Goater
2016-11-29 19:16     ` [Qemu-devel] " Cédric Le Goater
2016-11-29 17:26 ` Cédric Le Goater
2016-11-29 17:26   ` Cédric Le Goater
2016-11-29 17:26   ` [Qemu-arm] [PATCH for-2.9 30/30] wdt: aspeed: use scu to get clock freq Cédric Le Goater
2016-11-29 17:26     ` [Qemu-devel] " Cédric Le Goater
2016-12-14 17:12 ` [Qemu-arm] [PATCH for-2.9 00/30] Aspeed SoC fixes and model improvements Peter Maydell
2016-12-14 17:12   ` [Qemu-devel] " Peter Maydell
2016-12-14 17:51   ` [Qemu-arm] " Cédric Le Goater
2016-12-14 17:51     ` [Qemu-devel] " Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161130155546.GA4703@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=andrew@aj.id.au \
    --cc=armbru@redhat.com \
    --cc=clg@kaod.org \
    --cc=marcin.krzeminski@nokia.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.