Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7955
b: refs/heads/master
c: f8d23d3
h: refs/heads/master
i:
  7953: c7cac62
  7951: 4dc28e0
v: v3
  • Loading branch information
Olav Kongas authored and Greg Kroah-Hartman committed Sep 8, 2005
1 parent 960b383 commit 5e5c294
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 38 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: 9d233d9faedfd8a4ee22288c1fdc698a6f75db21
refs/heads/master: f8d23d309809ae69c763520dababb7e845938272
31 changes: 3 additions & 28 deletions trunk/drivers/usb/host/isp116x-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1463,28 +1463,14 @@ static int isp116x_sw_reset(struct isp116x *isp116x)
return ret;
}

/*
Reset. Tries to perform platform-specific hardware
reset first; falls back to software reset.
*/
static int isp116x_reset(struct usb_hcd *hcd)
{
struct isp116x *isp116x = hcd_to_isp116x(hcd);
unsigned long t;
u16 clkrdy = 0;
int ret = 0, timeout = 15 /* ms */ ;

if (isp116x->board && isp116x->board->reset) {
/* Hardware reset */
isp116x->board->reset(hcd->self.controller, 1);
msleep(10);
if (isp116x->board->clock)
isp116x->board->clock(hcd->self.controller, 1);
msleep(1);
isp116x->board->reset(hcd->self.controller, 0);
} else
ret = isp116x_sw_reset(isp116x);

ret = isp116x_sw_reset(isp116x);
if (ret)
return ret;

Expand All @@ -1501,10 +1487,7 @@ static int isp116x_reset(struct usb_hcd *hcd)
ERR("Clock not ready after 20ms\n");
/* After sw_reset the clock won't report to be ready, if
H_WAKEUP pin is high. */
if (!isp116x->board || !isp116x->board->reset)
ERR("The driver does not support hardware wakeup.\n");
ERR("Please make sure that the H_WAKEUP pin "
"is pulled low!\n");
ERR("Please make sure that the H_WAKEUP pin is pulled low!\n");
ret = -ENODEV;
}
return ret;
Expand All @@ -1527,15 +1510,7 @@ static void isp116x_stop(struct usb_hcd *hcd)
isp116x_write_reg32(isp116x, HCRHSTATUS, RH_HS_LPS);
spin_unlock_irqrestore(&isp116x->lock, flags);

/* Put the chip into reset state */
if (isp116x->board && isp116x->board->reset)
isp116x->board->reset(hcd->self.controller, 0);
else
isp116x_sw_reset(isp116x);

/* Stop the clock */
if (isp116x->board && isp116x->board->clock)
isp116x->board->clock(hcd->self.controller, 0);
isp116x_sw_reset(isp116x);
}

/*
Expand Down
9 changes: 0 additions & 9 deletions trunk/include/linux/usb_isp116x.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ struct isp116x_platform_data {
prevents stopping internal clock, increasing
thereby power consumption in suspended state. */
unsigned remote_wakeup_enable:1;
/* Hardware reset set/clear. If implemented, this function must:
if set == 0, deassert chip's HW reset pin
otherwise, assert chip's HW reset pin */
void (*reset) (struct device * dev, int set);
/* Hardware clock start/stop. If implemented, this function must:
if start == 0, stop the external clock
otherwise, start the external clock
*/
void (*clock) (struct device * dev, int start);
/* Inter-io delay (ns). The chip is picky about access timings; it
expects at least:
150ns delay between consecutive accesses to DATA_REG,
Expand Down

0 comments on commit 5e5c294

Please sign in to comment.