[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.9 25/30] block: add a model option for MTD
From: |
Kevin Wolf |
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 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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
- [Qemu-devel] [PATCH for-2.9 19/30] aspeed/smc: unfold the AspeedSMCController array, (continued)
- [Qemu-devel] [PATCH for-2.9 19/30] aspeed/smc: unfold the AspeedSMCController array, Cédric Le Goater, 2016/11/29
- [Qemu-devel] [PATCH for-2.9 20/30] aspeed/smc: add a 'sdram_base' property, Cédric Le Goater, 2016/11/29
- [Qemu-devel] [PATCH for-2.9 21/30] aspeed/smc: add support for DMAs, Cédric Le Goater, 2016/11/29
- [Qemu-devel] [PATCH for-2.9 22/30] aspeed/smc: handle dummy bytes when doing fast reads, Cédric Le Goater, 2016/11/29
- [Qemu-devel] [PATCH for-2.9 23/30] aspeed/smc: adjust the size of the register region, Cédric Le Goater, 2016/11/29
- [Qemu-devel] [PATCH for-2.9 24/30] aspeed: use first SPI flash as a boot ROM, Cédric Le Goater, 2016/11/29
- [Qemu-devel] [PATCH for-2.9 25/30] block: add a model option for MTD devices, Cédric Le Goater, 2016/11/29
- Re: [Qemu-devel] [PATCH for-2.9 25/30] block: add a model option for MTD devices, Cédric Le Goater, 2016/11/29
[Qemu-devel] [PATCH for-2.9 26/30] aspeed/smc: use flash model option, Cédric Le Goater, 2016/11/29
[Qemu-devel] [PATCH for-2.9 27/30] wdt: Add Aspeed watchdog device model, Cédric Le Goater, 2016/11/29
[Qemu-devel] [PATCH for-2.9 28/30] aspeed: add a watchdog controller, Cédric Le Goater, 2016/11/29
[Qemu-devel] [PATCH for-2.9 29/30] aspeed/scu: add a aspeed_scu_get_clk() helper, Cédric Le Goater, 2016/11/29
[Qemu-devel] [PATCH for-2.9 29/30] aspeed/scu: add a aspeed_scu_get_clk() helper, Cédric Le Goater, 2016/11/29