Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264969
b: refs/heads/master
c: 7650bd7
h: refs/heads/master
i:
  264967: 4f919f3
v: v3
  • Loading branch information
Sebastian Andrzej Siewior authored and Felipe Balbi committed Sep 9, 2011
1 parent 22d2a9f commit b3ac107
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e7225315a89731d0f986c20165184f1dc9a9bf2b
refs/heads/master: 7650bd74d3441907867276dc381b2ee0dc355c65
19 changes: 9 additions & 10 deletions trunk/drivers/usb/dwc3/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,15 @@ static int __devinit dwc3_core_init(struct dwc3 *dwc)
u32 reg;
int ret;

reg = dwc3_readl(dwc->regs, DWC3_GSNPSID);
/* This should read as U3 followed by revision number */
if ((reg & DWC3_GSNPSID_MASK) != 0x55330000) {
dev_err(dwc->dev, "this is not a DesignWare USB3 DRD Core\n");
ret = -ENODEV;
goto err0;
}
dwc->revision = reg & DWC3_GSNPSREV_MASK;

dwc3_core_soft_reset(dwc);

/* issue device SoftReset too */
Expand All @@ -260,16 +269,6 @@ static int __devinit dwc3_core_init(struct dwc3 *dwc)
cpu_relax();
} while (true);

reg = dwc3_readl(dwc->regs, DWC3_GSNPSID);
/* This should read as U3 followed by revision number */
if ((reg & DWC3_GSNPSID_MASK) != 0x55330000) {
dev_err(dwc->dev, "this is not a DesignWare USB3 DRD Core\n");
ret = -ENODEV;
goto err0;
}

dwc->revision = reg & DWC3_GSNPSREV_MASK;

ret = dwc3_alloc_event_buffers(dwc, DWC3_EVENT_BUFFERS_NUM,
DWC3_EVENT_BUFFERS_SIZE);
if (ret) {
Expand Down

0 comments on commit b3ac107

Please sign in to comment.