From: Francisco Iglesias <frasse.iglesias@gmail.com>
To: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
Cc: peter.maydell@linaro.org,
Francisco Iglesias <francisco.iglesias@xilinx.com>,
alistair@alistair23.me, qemu-devel@nongnu.org,
alistair23@gmail.com
Subject: Re: [PATCH v1 9/9] hw/arm/xlnx-versal-virt: Connect mt35xu01g flashes to the OSPI
Date: Tue, 23 Nov 2021 11:34:19 +0100 [thread overview]
Message-ID: <20211123103418.GA6734@fralle-msi> (raw)
In-Reply-To: <20211119171623.GH2341@toto>
Hi Edgar,
Thank you for having a look at the series! I made the updates in v2!
Best regards,
Francisco Iglesias
On [2021 Nov 19] Fri 18:16:23, Edgar E. Iglesias wrote:
> On Wed, Nov 17, 2021 at 02:18:41PM +0000, Francisco Iglesias wrote:
> > Connect Micron Xccela mt35xu01g flashes to the OSPI flash memory
> > controller.
> >
> > Signed-off-by: Francisco Iglesias <francisco.iglesias@xilinx.com>
> > ---
> > hw/arm/xlnx-versal-virt.c | 23 +++++++++++++++++++++++
> > 1 file changed, 23 insertions(+)
> >
> > diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c
> > index d2f55e29b6..f2f12a781e 100644
> > --- a/hw/arm/xlnx-versal-virt.c
> > +++ b/hw/arm/xlnx-versal-virt.c
> > @@ -25,6 +25,8 @@
> > #define TYPE_XLNX_VERSAL_VIRT_MACHINE MACHINE_TYPE_NAME("xlnx-versal-virt")
> > OBJECT_DECLARE_SIMPLE_TYPE(VersalVirt, XLNX_VERSAL_VIRT_MACHINE)
> >
> > +#define XLNX_VERSAL_NUM_OSPI_FLASH 4
> > +
> > struct VersalVirt {
> > MachineState parent_obj;
> >
> > @@ -690,6 +692,27 @@ static void versal_virt_init(MachineState *machine)
> > exit(EXIT_FAILURE);
> > }
> > }
> > +
> > + for (i = 0; i < XLNX_VERSAL_NUM_OSPI_FLASH; i++) {
> > + BusState *spi_bus;
> > + DeviceState *flash_dev;
> > + qemu_irq cs_line;
> > + DriveInfo *dinfo = drive_get_next(IF_MTD);
>
> There's a patch from Markus on the list that is getting rid of
> drive_get_next(), we'll need to merge with that at some point...
>
>
>
>
> > +
> > + spi_bus = qdev_get_child_bus(DEVICE(&s->soc.pmc.iou.ospi), "spi0");
> > +
> > + flash_dev = qdev_new("mt35xu01g");
> > + if (dinfo) {
> > + qdev_prop_set_drive_err(flash_dev, "drive",
> > + blk_by_legacy_dinfo(dinfo), &error_fatal);
> > + }
> > + qdev_realize_and_unref(flash_dev, spi_bus, &error_fatal);
> > +
> > + cs_line = qdev_get_gpio_in_named(flash_dev, SSI_GPIO_CS, 0);
> > +
> > + sysbus_connect_irq(SYS_BUS_DEVICE(&s->soc.pmc.iou.ospi),
> > + i + 1, cs_line);
> > + }
> > }
> >
> > static void versal_virt_machine_instance_init(Object *obj)
> > --
> > 2.11.0
> >
prev parent reply other threads:[~2021-11-23 10:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-17 14:18 [PATCH v1 0/9] Xilinx Versal's PMC SLCR and OSPI support Francisco Iglesias
2021-11-17 14:18 ` [PATCH v1 1/9] hw/misc: Add a model of Versal's PMC SLCR Francisco Iglesias
2021-11-19 16:28 ` Edgar E. Iglesias
2021-11-17 14:18 ` [PATCH v1 2/9] hw/arm/xlnx-versal: Connect " Francisco Iglesias
2021-11-19 16:59 ` Edgar E. Iglesias
2021-11-17 14:18 ` [PATCH v1 3/9] include/hw/dma/xlnx_csu_dma: Include ptimer.h and stream.h in the header Francisco Iglesias
2021-11-17 14:18 ` [PATCH v1 4/9] hw/dma: Add the DMA control interface Francisco Iglesias
2021-11-19 17:01 ` Edgar E. Iglesias
2021-11-17 14:18 ` [PATCH v1 5/9] hw/dma/xlnx_csu_dma: Implement " Francisco Iglesias
2021-11-19 17:03 ` Edgar E. Iglesias
2021-11-17 14:18 ` [PATCH v1 6/9] hw/ssi: Add a model of Xilinx Versal's OSPI flash memory controller Francisco Iglesias
2021-11-19 17:09 ` Edgar E. Iglesias
2021-11-17 14:18 ` [PATCH v1 7/9] hw/arm/xlnx-versal: Connect the OSPI flash memory controller model Francisco Iglesias
2021-11-19 17:14 ` Edgar E. Iglesias
2021-11-17 14:18 ` [PATCH v1 8/9] hw/block/m25p80: Add support for Micron Xccela flash mt35xu01g Francisco Iglesias
2021-11-19 17:09 ` Edgar E. Iglesias
2021-11-17 14:18 ` [PATCH v1 9/9] hw/arm/xlnx-versal-virt: Connect mt35xu01g flashes to the OSPI Francisco Iglesias
2021-11-19 17:16 ` Edgar E. Iglesias
2021-11-23 10:34 ` Francisco Iglesias [this message]
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=20211123103418.GA6734@fralle-msi \
--to=frasse.iglesias@gmail.com \
--cc=alistair23@gmail.com \
--cc=alistair@alistair23.me \
--cc=edgar.iglesias@xilinx.com \
--cc=francisco.iglesias@xilinx.com \
--cc=peter.maydell@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).