qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Cc: "Francisco Eduardo Iglesias" <figlesia@xilinx.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Vikram Garhwal" <fnuv@xilinx.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"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: Tue, 1 Dec 2020 11:34:25 +0000	[thread overview]
Message-ID: <CAFEAcA-esWWXWx-kfz=UvVsydU5siFvx-=u42DTW4n42YLu_jA@mail.gmail.com> (raw)
In-Reply-To: <1606811915-8492-5-git-send-email-sai.pavan.boddu@xilinx.com>

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.

thanks
-- PMM


  reply	other threads:[~2020-12-01 11:35 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 [this message]
2020-12-03 18:05     ` Edgar E. Iglesias
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='CAFEAcA-esWWXWx-kfz=UvVsydU5siFvx-=u42DTW4n42YLu_jA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --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=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).