tree 0c07570e6de7e6978bd336be9fabfe1ecfee802b
parent 9d233d9faedfd8a4ee22288c1fdc698a6f75db21
author Olav Kongas <[EMAIL PROTECTED]> Thu, 04 Aug 2005 17:02:54 +0300
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Fri, 09 Sep 2005 06:22:48 -0700

[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 <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

 drivers/usb/host/isp116x-hcd.c |   31 +++----------------------------
 include/linux/usb_isp116x.h    |    9 ---------
 2 files changed, 3 insertions(+), 37 deletions(-)

diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -1463,10 +1463,6 @@ static int isp116x_sw_reset(struct isp11
        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);
@@ -1474,17 +1470,7 @@ static int isp116x_reset(struct usb_hcd 
        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;
 
@@ -1501,10 +1487,7 @@ static int isp116x_reset(struct usb_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;
@@ -1527,15 +1510,7 @@ static void isp116x_stop(struct usb_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);
 }
 
 /*
diff --git a/include/linux/usb_isp116x.h b/include/linux/usb_isp116x.h
--- a/include/linux/usb_isp116x.h
+++ b/include/linux/usb_isp116x.h
@@ -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,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to