[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2 07/10] SD card: introduce "if-idx" property f
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH V2 07/10] SD card: introduce "if-idx" property for SD card objects |
Date: |
Wed, 11 Apr 2012 13:33:26 +0100 |
On 5 April 2012 16:48, Igor Mitsyanko <address@hidden> wrote:
> -#define SD_INIT(sd, bdrv, is_spi) (SD_GET_CLASS(sd)->init(sd, bdrv,
> is_spi))
> +#define SD_INIT(sd, bdrv, is_spi) (SD_GET_CLASS(sd)->init(sd, is_spi))
> diff --git a/hw/ssi-sd.c b/hw/ssi-sd.c
> index beecc0e..38057ba 100644
> --- a/hw/ssi-sd.c
> +++ b/hw/ssi-sd.c
> @@ -236,11 +236,16 @@ static int ssi_sd_init(SSISlave *dev)
> {
> ssi_sd_state *s = FROM_SSI_SLAVE(ssi_sd_state, dev);
> DriveInfo *dinfo;
> + Error *errp = NULL;
>
> s->mode = SSI_SD_CMD;
> dinfo = drive_get_next(IF_SD);
> s->sd = SD_CARD(object_new(TYPE_SD_CARD));
> - SD_INIT(s->sd, dinfo ? dinfo->bdrv : NULL, true);
> + if (dinfo) {
> + object_property_set_int(OBJECT(s->sd), dinfo->unit, "if-idx", &errp);
> + }
> + assert_no_error(errp);
> + SD_INIT(s->sd, true);
This doesn't compile:
/home/petmay01/linaro/qemu-from-laptop/qemu/hw/ssi-sd.c: In function
‘ssi_sd_init’:
/home/petmay01/linaro/qemu-from-laptop/qemu/hw/ssi-sd.c:248: error:
macro "SD_INIT" requires 3 arguments, but only 2 given
-- PMM
- [Qemu-devel] [PATCH V2 00/10] SD save/load support and SD qomification, Igor Mitsyanko, 2012/04/05
- [Qemu-devel] [PATCH V2 03/10] hw/sd.c: make sd_dataready() return bool, Igor Mitsyanko, 2012/04/05
- [Qemu-devel] [PATCH V2 07/10] SD card: introduce "if-idx" property for SD card objects, Igor Mitsyanko, 2012/04/05
- Re: [Qemu-devel] [PATCH V2 07/10] SD card: introduce "if-idx" property for SD card objects,
Peter Maydell <=
- [Qemu-devel] [PATCH V2 05/10] hw/sd.c: add SD card save/load support, Igor Mitsyanko, 2012/04/05
- [Qemu-devel] [PATCH V2 10/10] hw/sd.c: introduce SD card "image" property and allow SD hot-insert, Igor Mitsyanko, 2012/04/05
[Qemu-devel] [PATCH V2 08/10] SD card: introduce "spi_mode" property for SD card objects, Igor Mitsyanko, 2012/04/05
[Qemu-devel] [PATCH V2 06/10] hw/sd.c: convert to QOM object, Igor Mitsyanko, 2012/04/05