From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/2] usb: zynqmp: Add XHCI driver support
Date: Thu, 3 Sep 2015 11:34:04 +0200 [thread overview]
Message-ID: <201509031134.04738.marex@denx.de> (raw)
In-Reply-To: <1441271942-39785-1-git-send-email-sivadur@xilinx.com>
On Thursday, September 03, 2015 at 11:19:01 AM, Siva Durga Prasad Paladugu
wrote:
> Added USB XHCI driver support for zynqmp.
>
> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Hi,
is this V3 in any way different from the previous V3 ?
[...]
> +int xhci_hcd_init(int index, struct xhci_hccr **hccr, struct xhci_hcor
> **hcor) +{
> + struct zynqmp_xhci *ctx = &zynqmp_xhci;
> + int ret = 0;
You should sanitize the index here:
if (index < 0 || index > ARRAY_SIZE(ctr_addr))
return -EINVAL;
> + ctx->hcd = (struct xhci_hccr *)ctr_addr[index];
> + ctx->dwc3_reg = (struct dwc3 *)((char *)(ctx->hcd) + DWC3_REG_OFFSET);
> +
> + ret = board_usb_init(index, USB_INIT_HOST);
> + if (ret != 0) {
> + puts("Failed to initialize board for USB\n");
> + return ret;
> + }
> +
> + ret = zynqmp_xhci_core_init(ctx);
> + if (ret < 0) {
> + puts("Failed to initialize xhci\n");
> + return ret;
> + }
> +
> + *hccr = (struct xhci_hccr *)ctx->hcd;
> + *hcor = (struct xhci_hcor *)((uint32_t) *hccr
> + + HC_LENGTH(xhci_readl(&(*hccr)->cr_capbase)));
> +
> + debug("zynqmp-xhci: init hccr %x and hcor %x hc_length %d\n",
> + (uint32_t)*hccr, (uint32_t)*hcor,
> + (uint32_t)HC_LENGTH(xhci_readl(&(*hccr)->cr_capbase)));
> +
> + return ret;
> +}
Otherwise,
Acked-by: Marek Vasut <marex@denx.de>
Best regards,
Marek Vasut
next prev parent reply other threads:[~2015-09-03 9:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-03 9:19 [U-Boot] [PATCH v3 1/2] usb: zynqmp: Add XHCI driver support Siva Durga Prasad Paladugu
2015-09-03 9:19 ` [U-Boot] [PATCH v3 2/2] usb: zynqmp: Enable USB XHCI support Siva Durga Prasad Paladugu
2015-09-03 9:34 ` Marek Vasut [this message]
2015-09-03 9:37 ` [U-Boot] [PATCH v3 1/2] usb: zynqmp: Add XHCI driver support Siva Durga Prasad Paladugu
2015-09-03 9:44 ` Marek Vasut
-- strict thread matches above, loose matches on Subject: below --
2015-09-03 7:21 Siva Durga Prasad Paladugu
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=201509031134.04738.marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/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