[U-Boot] [PATCH v3 1/2] usb: zynqmp: Add XHCI driver support

Siva Durga Prasad Paladugu siva.durga.paladugu at xilinx.com
Thu Sep 3 11:37:45 CEST 2015


Hi Marek,

> -----Original Message-----
> From: Marek Vasut [mailto:marex at denx.de]
> Sent: Thursday, September 03, 2015 3:04 PM
> To: Siva Durga Prasad Paladugu
> Cc: u-boot at lists.denx.de; Siva Durga Prasad Paladugu
> Subject: Re: [PATCH v3 1/2] usb: zynqmp: Add XHCI driver support
>
> 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 at xilinx.com>
>
> Hi,
>
> is this V3 in any way different from the previous V3 ?

Its just same. I didn't get it in u-boot mailing list and hence sent it again.

Regards,
Siva
>
> [...]
>
> > +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 at denx.de>
>
> Best regards,
> Marek Vasut


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.



More information about the U-Boot mailing list