qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Francisco Eduardo Iglesias" <figlesia@xilinx.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Vikram Garhwal" <fnuv@xilinx.com>,
	"Sai Pavan Boddu" <sai.pavan.boddu@xilinx.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Paul Zimmerman" <pauldzim@gmail.com>,
	"Sai Pavan Boddu" <saipava@xilinx.com>,
	"Edgar Iglesias" <edgari@xilinx.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Ying Fang" <fangying1@huawei.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH v14 4/4] arm: xlnx-versal: Connect usb to virt-versal
Date: Thu, 3 Dec 2020 19:05:17 +0100	[thread overview]
Message-ID: <20201203180517.GA10051@toto> (raw)
In-Reply-To: <CAFEAcA-esWWXWx-kfz=UvVsydU5siFvx-=u42DTW4n42YLu_jA@mail.gmail.com>

On Tue, Dec 01, 2020 at 11:34:25AM +0000, Peter Maydell wrote:
> On Tue, 1 Dec 2020 at 08:34, Sai Pavan Boddu <sai.pavan.boddu@xilinx.com> wrote:
> >
> > From: Vikram Garhwal <fnu.vikram@xilinx.com>
> >
> > Connect VersalUbs2 subsystem to xlnx-versal SOC, its placed
> 
> Typo : "VersalUSB2".
> 
> 
> > in iou of lpd domain and configure it as dual port host controller.
> > Add the respective guest dts nodes for "xlnx-versal-virt" machine.
> >
> > Signed-off-by: Vikram Garhwal <fnu.vikram@xilinx.com>
> > Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
> 
> Code looks OK but I'll let somebody else from Xilinx review the detail.
> 
> > +static void fdt_add_usb_xhci_nodes(VersalVirt *s)
> > +{
> > +    const char clocknames[] = "bus_clk\0ref_clk";
> > +    char *name = g_strdup_printf("/usb@%" PRIx32, MM_USB2_CTRL_REGS);
> > +    const char compat[] = "xlnx,versal-dwc3";
> > +
> > +    qemu_fdt_add_subnode(s->fdt, name);
> > +    qemu_fdt_setprop(s->fdt, name, "compatible",
> > +                         compat, sizeof(compat));
> > +    qemu_fdt_setprop_sized_cells(s->fdt, name, "reg",
> > +                                 2, MM_USB2_CTRL_REGS,
> > +                                 2, MM_USB2_CTRL_REGS_SIZE);
> > +    qemu_fdt_setprop(s->fdt, name, "clock-names",
> > +                         clocknames, sizeof(clocknames));
> > +    qemu_fdt_setprop_cells(s->fdt, name, "clocks",
> > +                               s->phandle.clk_25Mhz, s->phandle.clk_125Mhz);
> > +    qemu_fdt_setprop(s->fdt, name, "ranges", NULL, 0);
> > +    qemu_fdt_setprop_cell(s->fdt, name, "#address-cells", 2);
> > +    qemu_fdt_setprop_cell(s->fdt, name, "#size-cells", 2);
> > +    qemu_fdt_setprop_cell(s->fdt, name, "phandle", s->phandle.usb);
> > +    g_free(name);
> > +
> > +    {
> > +        const char irq_name[] = "dwc_usb3";
> > +        const char compat[] = "snps,dwc3";
> 
> Minor coding style side note, but I'm not hugely fond of
> code blocks in the middle of functions just for declaring
> variables. You could either put these variable declarations
> at the top of the function, or if you think the code in the
> block is self contained and worth putting in its own function
> you could do that.
>

Hi Sai, I beleive I had already reviewed a previous version of this
patch so after you fix the stuff the Peter pointed out feel free to add my
Rb:

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>

Cheers,
Edgar


  reply	other threads:[~2020-12-03 18:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  8:38 [PATCH v14 0/4] Add Versal usb model Sai Pavan Boddu
2020-12-01  8:38 ` [PATCH v14 1/4] usb: Add versal-usb2-ctrl-regs module Sai Pavan Boddu
2020-12-01 11:23   ` Peter Maydell
2020-12-03 15:54     ` Sai Pavan Boddu
2020-12-01  8:38 ` [PATCH v14 2/4] usb: Add DWC3 model Sai Pavan Boddu
2020-12-01 11:25   ` Peter Maydell
2020-12-03 17:57     ` Sai Pavan Boddu
2020-12-01  8:38 ` [PATCH v14 3/4] usb: xlnx-usb-subsystem: Add xilinx usb subsystem Sai Pavan Boddu
2020-12-01 11:27   ` Peter Maydell
2020-12-03 17:58     ` Sai Pavan Boddu
2020-12-01  8:38 ` [PATCH v14 4/4] arm: xlnx-versal: Connect usb to virt-versal Sai Pavan Boddu
2020-12-01 11:34   ` Peter Maydell
2020-12-03 18:05     ` Edgar E. Iglesias [this message]
2020-12-03 19:16       ` Sai Pavan Boddu

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=20201203180517.GA10051@toto \
    --to=edgar.iglesias@xilinx.com \
    --cc=alistair.francis@wdc.com \
    --cc=armbru@redhat.com \
    --cc=edgari@xilinx.com \
    --cc=ehabkost@redhat.com \
    --cc=fangying1@huawei.com \
    --cc=figlesia@xilinx.com \
    --cc=fnuv@xilinx.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pauldzim@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sai.pavan.boddu@xilinx.com \
    --cc=saipava@xilinx.com \
    /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).