diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-03-14 15:52:42 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-03-14 15:52:42 +0000 |
commit | 16defbb2bd9478f9e5384b9722f20a694e6bae41 (patch) | |
tree | f52e202c30c7fca103b196ece1223e18446e4dfc /target/linux/s3c24xx/patches-2.6.24/1061-s3c2410-usb-switch.patch.patch | |
parent | b4644aedce6526b5d07b336187c8e6417c7dd75e (diff) | |
download | upstream-16defbb2bd9478f9e5384b9722f20a694e6bae41.tar.gz upstream-16defbb2bd9478f9e5384b9722f20a694e6bae41.tar.bz2 upstream-16defbb2bd9478f9e5384b9722f20a694e6bae41.zip |
nuke obsolete kernel stuff
SVN-Revision: 14875
Diffstat (limited to 'target/linux/s3c24xx/patches-2.6.24/1061-s3c2410-usb-switch.patch.patch')
-rw-r--r-- | target/linux/s3c24xx/patches-2.6.24/1061-s3c2410-usb-switch.patch.patch | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.24/1061-s3c2410-usb-switch.patch.patch b/target/linux/s3c24xx/patches-2.6.24/1061-s3c2410-usb-switch.patch.patch deleted file mode 100644 index a26b237f64..0000000000 --- a/target/linux/s3c24xx/patches-2.6.24/1061-s3c2410-usb-switch.patch.patch +++ /dev/null @@ -1,89 +0,0 @@ -From e98d739947484f7ca2cf0fe017fda73cab63067a Mon Sep 17 00:00:00 2001 -From: mokopatches <mokopatches@openmoko.org> -Date: Sun, 13 Apr 2008 07:23:54 +0100 -Subject: [PATCH] s3c2410-usb-switch.patch - ---- - drivers/usb/host/ohci-s3c2410.c | 43 +++++++++++++++++++++++++++++++++++++++ - 1 files changed, 43 insertions(+), 0 deletions(-) - -diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c -index 44b79e8..68f5689 100644 ---- a/drivers/usb/host/ohci-s3c2410.c -+++ b/drivers/usb/host/ohci-s3c2410.c -@@ -24,6 +24,7 @@ - - #include <asm/hardware.h> - #include <asm/arch/usb-control.h> -+#include <asm/arch/regs-gpio.h> - - #define valid_port(idx) ((idx) == 1 || (idx) == 2) - -@@ -308,6 +309,40 @@ static void s3c2410_hcd_oc(struct s3c2410_hcd_info *info, int port_oc) - local_irq_restore(flags); - } - -+/* switching of USB pads */ -+static ssize_t show_usb_mode(struct device *dev, struct device_attribute *attr, -+ char *buf) -+{ -+ if (__raw_readl(S3C24XX_MISCCR) & S3C2410_MISCCR_USBHOST) -+ return sprintf(buf, "host\n"); -+ -+ return sprintf(buf, "device\n"); -+} -+ -+static ssize_t set_usb_mode(struct device *dev, struct device_attribute *attr, -+ const char *buf, size_t count) -+{ -+ if (!strncmp(buf, "host", 4)) { -+ printk("s3c2410: changing usb to host\n"); -+ s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST, -+ S3C2410_MISCCR_USBHOST); -+ /* FIXME: -+ * - call machine-specific disable-pullup function i -+ * - enable +Vbus (if hardware supports it) -+ */ -+ s3c2410_gpio_setpin(S3C2410_GPB9, 0); -+ } else if (!strncmp(buf, "device", 6)) { -+ printk("s3c2410: changing usb to device\n"); -+ s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST, 0); -+ s3c2410_gpio_setpin(S3C2410_GPB9, 1); -+ } else -+ printk("s3c2410: unknown mode\n"); -+ return -EINVAL; -+ return count; -+} -+ -+static DEVICE_ATTR(usb_mode, S_IRUGO | S_IWUSR, show_usb_mode, set_usb_mode); -+ - /* may be called without controller electrically present */ - /* may be called with controller, bus, and devices active */ - -@@ -325,6 +360,7 @@ static void s3c2410_hcd_oc(struct s3c2410_hcd_info *info, int port_oc) - static void - usb_hcd_s3c2410_remove (struct usb_hcd *hcd, struct platform_device *dev) - { -+ device_remove_file(&dev->dev, &dev_attr_usb_mode); - usb_remove_hcd(hcd); - s3c2410_stop_hc(dev); - iounmap(hcd->regs); -@@ -392,8 +428,15 @@ static int usb_hcd_s3c2410_probe (const struct hc_driver *driver, - if (retval != 0) - goto err_ioremap; - -+ retval = device_create_file(&dev->dev, &dev_attr_usb_mode); -+ if (retval != 0) -+ goto err_hcd; -+ - return 0; - -+ err_hcd: -+ usb_remove_hcd(hcd); -+ - err_ioremap: - s3c2410_stop_hc(dev); - iounmap(hcd->regs); --- -1.5.6.5 - |