Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] USB: isp116x-hcd: remove clock() and reset()

This patch removes support for user-provided platform-specific hardware reset
and clock starting/stopping functions. Hardware reset was needed earlier as
getting the software reset working was tricky due to the lack of documentation.
Recently, a number of people using isp116x have said the software reset is
working for them.

I haven't heard of anybody using the clock starting/stopping.

Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Olav Kongas and committed by
Greg Kroah-Hartman
f8d23d30 9d233d9f

+3 -37
+3 -28
drivers/usb/host/isp116x-hcd.c
··· 1463 1463 return ret; 1464 1464 } 1465 1465 1466 - /* 1467 - Reset. Tries to perform platform-specific hardware 1468 - reset first; falls back to software reset. 1469 - */ 1470 1466 static int isp116x_reset(struct usb_hcd *hcd) 1471 1467 { 1472 1468 struct isp116x *isp116x = hcd_to_isp116x(hcd); ··· 1470 1474 u16 clkrdy = 0; 1471 1475 int ret = 0, timeout = 15 /* ms */ ; 1472 1476 1473 - if (isp116x->board && isp116x->board->reset) { 1474 - /* Hardware reset */ 1475 - isp116x->board->reset(hcd->self.controller, 1); 1476 - msleep(10); 1477 - if (isp116x->board->clock) 1478 - isp116x->board->clock(hcd->self.controller, 1); 1479 - msleep(1); 1480 - isp116x->board->reset(hcd->self.controller, 0); 1481 - } else 1482 - ret = isp116x_sw_reset(isp116x); 1483 - 1477 + ret = isp116x_sw_reset(isp116x); 1484 1478 if (ret) 1485 1479 return ret; 1486 1480 ··· 1487 1501 ERR("Clock not ready after 20ms\n"); 1488 1502 /* After sw_reset the clock won't report to be ready, if 1489 1503 H_WAKEUP pin is high. */ 1490 - if (!isp116x->board || !isp116x->board->reset) 1491 - ERR("The driver does not support hardware wakeup.\n"); 1492 - ERR("Please make sure that the H_WAKEUP pin " 1493 - "is pulled low!\n"); 1504 + ERR("Please make sure that the H_WAKEUP pin is pulled low!\n"); 1494 1505 ret = -ENODEV; 1495 1506 } 1496 1507 return ret; ··· 1510 1527 isp116x_write_reg32(isp116x, HCRHSTATUS, RH_HS_LPS); 1511 1528 spin_unlock_irqrestore(&isp116x->lock, flags); 1512 1529 1513 - /* Put the chip into reset state */ 1514 - if (isp116x->board && isp116x->board->reset) 1515 - isp116x->board->reset(hcd->self.controller, 0); 1516 - else 1517 - isp116x_sw_reset(isp116x); 1518 - 1519 - /* Stop the clock */ 1520 - if (isp116x->board && isp116x->board->clock) 1521 - isp116x->board->clock(hcd->self.controller, 0); 1530 + isp116x_sw_reset(isp116x); 1522 1531 } 1523 1532 1524 1533 /*
-9
include/linux/usb_isp116x.h
··· 19 19 prevents stopping internal clock, increasing 20 20 thereby power consumption in suspended state. */ 21 21 unsigned remote_wakeup_enable:1; 22 - /* Hardware reset set/clear. If implemented, this function must: 23 - if set == 0, deassert chip's HW reset pin 24 - otherwise, assert chip's HW reset pin */ 25 - void (*reset) (struct device * dev, int set); 26 - /* Hardware clock start/stop. If implemented, this function must: 27 - if start == 0, stop the external clock 28 - otherwise, start the external clock 29 - */ 30 - void (*clock) (struct device * dev, int start); 31 22 /* Inter-io delay (ns). The chip is picky about access timings; it 32 23 expects at least: 33 24 150ns delay between consecutive accesses to DATA_REG,