aboutsummaryrefslogtreecommitdiffstats
path: root/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-04-06 10:08:19 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-04-06 10:08:19 -0700
commitce40196200ca234d1abe8dd66a96906745501a05 (patch)
tree700e1c99e298d8636b2b97f68276681db577e719 /usb
parent788a651935432b61fd0d03707d0d679de678b9c1 (diff)
downloadpatches-ce40196200ca234d1abe8dd66a96906745501a05.tar.gz
more patches added
Diffstat (limited to 'usb')
-rw-r--r--usb/usb-s3c2410-use-clk_enable-to-ensure-48mhz-to-ohci-core.patch113
1 files changed, 113 insertions, 0 deletions
diff --git a/usb/usb-s3c2410-use-clk_enable-to-ensure-48mhz-to-ohci-core.patch b/usb/usb-s3c2410-use-clk_enable-to-ensure-48mhz-to-ohci-core.patch
new file mode 100644
index 0000000000000..2df87f8f0f5d4
--- /dev/null
+++ b/usb/usb-s3c2410-use-clk_enable-to-ensure-48mhz-to-ohci-core.patch
@@ -0,0 +1,113 @@
+From ben@fluff.org.uk Sat Apr 1 16:46:06 2006
+Date: Sun, 2 Apr 2006 01:45:00 +0100
+From: Ben Dooks <ben-linux@fluff.org>
+To: linux-usb-devel@lists.sourceforge.net, gregkh@suse.de
+Subject: USB: S3C2410: use clk_enable() to ensure 48MHz to OHCI core
+Message-ID: <20060402004500.GA26447@home.fluff.org>
+Content-Disposition: inline
+
+Get the "usb-bus" clock and ensure it is enabled
+when the OHCI core is in use.
+
+It seems that a few bootloaders do not enable the
+UPLL at startup, which stops the OHCI core having
+a 48MHz bus clock. The improvements to the clock
+framework for the s3c24xx now allow the USB PLL
+to be started and stopped when being used.
+
+Signed-off-by: Ben Dooks <ben-linux@fluff.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ohci-s3c2410.c | 32 ++++++++++++++++++++++++--------
+ 1 file changed, 24 insertions(+), 8 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/host/ohci-s3c2410.c
++++ gregkh-2.6/drivers/usb/host/ohci-s3c2410.c
+@@ -30,6 +30,7 @@
+ /* clock device associated with the hcd */
+
+ static struct clk *clk;
++static struct clk *usb_clk;
+
+ /* forward definitions */
+
+@@ -47,6 +48,10 @@ static void s3c2410_start_hc(struct plat
+ struct s3c2410_hcd_info *info = dev->dev.platform_data;
+
+ dev_dbg(&dev->dev, "s3c2410_start_hc:\n");
++
++ clk_enable(usb_clk);
++ mdelay(2); /* let the bus clock stabilise */
++
+ clk_enable(clk);
+
+ if (info != NULL) {
+@@ -75,6 +80,7 @@ static void s3c2410_stop_hc(struct platf
+ }
+
+ clk_disable(clk);
++ clk_disable(usb_clk);
+ }
+
+ /* ohci_s3c2410_hub_status_data
+@@ -354,14 +360,21 @@ static int usb_hcd_s3c2410_probe (const
+ if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
+ dev_err(&dev->dev, "request_mem_region failed");
+ retval = -EBUSY;
+- goto err0;
++ goto err_put;
+ }
+
+- clk = clk_get(NULL, "usb-host");
++ clk = clk_get(&dev->dev, "usb-host");
+ if (IS_ERR(clk)) {
+ dev_err(&dev->dev, "cannot get usb-host clock\n");
+ retval = -ENOENT;
+- goto err1;
++ goto err_mem;
++ }
++
++ usb_clk = clk_get(&dev->dev, "upll");
++ if (IS_ERR(usb_clk)) {
++ dev_err(&dev->dev, "cannot get usb-host clock\n");
++ retval = -ENOENT;
++ goto err_clk;
+ }
+
+ s3c2410_start_hc(dev, hcd);
+@@ -370,26 +383,29 @@ static int usb_hcd_s3c2410_probe (const
+ if (!hcd->regs) {
+ dev_err(&dev->dev, "ioremap failed\n");
+ retval = -ENOMEM;
+- goto err2;
++ goto err_ioremap;
+ }
+
+ ohci_hcd_init(hcd_to_ohci(hcd));
+
+ retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT);
+ if (retval != 0)
+- goto err2;
++ goto err_ioremap;
+
+ return 0;
+
+- err2:
++ err_ioremap:
+ s3c2410_stop_hc(dev);
+ iounmap(hcd->regs);
++ clk_put(usb_clk);
++
++ err_clk:
+ clk_put(clk);
+
+- err1:
++ err_mem:
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+
+- err0:
++ err_put:
+ usb_put_hcd(hcd);
+ return retval;
+ }