Commit dd9048af authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

USB: ohci whitespace/comment fixups

This is an OHCI cleanup patch ... it removes a lot of erroneous whitespace
(space before tab, at end of line) as well as the obsolete inline changelog.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 23d8c90e
...@@ -221,7 +221,7 @@ static const struct hc_driver ohci_at91_hc_driver = { ...@@ -221,7 +221,7 @@ static const struct hc_driver ohci_at91_hc_driver = {
*/ */
.start = ohci_at91_start, .start = ohci_at91_start,
.stop = ohci_stop, .stop = ohci_stop,
.shutdown = ohci_shutdown, .shutdown = ohci_shutdown,
/* /*
* managing i/o requests and associated device resources * managing i/o requests and associated device resources
......
...@@ -269,7 +269,7 @@ static const struct hc_driver ohci_au1xxx_hc_driver = { ...@@ -269,7 +269,7 @@ static const struct hc_driver ohci_au1xxx_hc_driver = {
*/ */
.start = ohci_au1xxx_start, .start = ohci_au1xxx_start,
.stop = ohci_stop, .stop = ohci_stop,
.shutdown = ohci_shutdown, .shutdown = ohci_shutdown,
/* /*
* managing i/o requests and associated device resources * managing i/o requests and associated device resources
...@@ -336,7 +336,7 @@ static int ohci_hcd_au1xxx_drv_resume(struct platform_device *dev) ...@@ -336,7 +336,7 @@ static int ohci_hcd_au1xxx_drv_resume(struct platform_device *dev)
static struct platform_driver ohci_hcd_au1xxx_driver = { static struct platform_driver ohci_hcd_au1xxx_driver = {
.probe = ohci_hcd_au1xxx_drv_probe, .probe = ohci_hcd_au1xxx_drv_probe,
.remove = ohci_hcd_au1xxx_drv_remove, .remove = ohci_hcd_au1xxx_drv_remove,
.shutdown = usb_hcd_platform_shutdown, .shutdown = usb_hcd_platform_shutdown,
/*.suspend = ohci_hcd_au1xxx_drv_suspend, */ /*.suspend = ohci_hcd_au1xxx_drv_suspend, */
/*.resume = ohci_hcd_au1xxx_drv_resume, */ /*.resume = ohci_hcd_au1xxx_drv_resume, */
.driver = { .driver = {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
case PIPE_CONTROL: temp = "ctrl"; break; \ case PIPE_CONTROL: temp = "ctrl"; break; \
case PIPE_BULK: temp = "bulk"; break; \ case PIPE_BULK: temp = "bulk"; break; \
case PIPE_INTERRUPT: temp = "intr"; break; \ case PIPE_INTERRUPT: temp = "intr"; break; \
default: temp = "isoc"; break; \ default: temp = "isoc"; break; \
}; temp;}) }; temp;})
#define pipestring(pipe) edstring(usb_pipetype(pipe)) #define pipestring(pipe) edstring(usb_pipetype(pipe))
...@@ -205,13 +205,13 @@ ohci_dump_status (struct ohci_hcd *controller, char **next, unsigned *size) ...@@ -205,13 +205,13 @@ ohci_dump_status (struct ohci_hcd *controller, char **next, unsigned *size)
(temp & RH_PS_PSSC) ? " PSSC" : "", \ (temp & RH_PS_PSSC) ? " PSSC" : "", \
(temp & RH_PS_PESC) ? " PESC" : "", \ (temp & RH_PS_PESC) ? " PESC" : "", \
(temp & RH_PS_CSC) ? " CSC" : "", \ (temp & RH_PS_CSC) ? " CSC" : "", \
\ \
(temp & RH_PS_LSDA) ? " LSDA" : "", \ (temp & RH_PS_LSDA) ? " LSDA" : "", \
(temp & RH_PS_PPS) ? " PPS" : "", \ (temp & RH_PS_PPS) ? " PPS" : "", \
(temp & RH_PS_PRS) ? " PRS" : "", \ (temp & RH_PS_PRS) ? " PRS" : "", \
(temp & RH_PS_POCI) ? " POCI" : "", \ (temp & RH_PS_POCI) ? " POCI" : "", \
(temp & RH_PS_PSS) ? " PSS" : "", \ (temp & RH_PS_PSS) ? " PSS" : "", \
\ \
(temp & RH_PS_PES) ? " PES" : "", \ (temp & RH_PS_PES) ? " PES" : "", \
(temp & RH_PS_CCS) ? " CCS" : "" \ (temp & RH_PS_CCS) ? " CCS" : "" \
); );
...@@ -563,7 +563,7 @@ show_periodic (struct class_device *class_dev, char *buf) ...@@ -563,7 +563,7 @@ show_periodic (struct class_device *class_dev, char *buf)
(info & ED_SKIP) ? " K" : "", (info & ED_SKIP) ? " K" : "",
(ed->hwHeadP & (ed->hwHeadP &
cpu_to_hc32(ohci, ED_H)) ? cpu_to_hc32(ohci, ED_H)) ?
" H" : ""); " H" : "");
size -= temp; size -= temp;
next += temp; next += temp;
......
...@@ -204,7 +204,7 @@ static int ohci_hcd_ep93xx_drv_resume(struct platform_device *pdev) ...@@ -204,7 +204,7 @@ static int ohci_hcd_ep93xx_drv_resume(struct platform_device *pdev)
static struct platform_driver ohci_hcd_ep93xx_driver = { static struct platform_driver ohci_hcd_ep93xx_driver = {
.probe = ohci_hcd_ep93xx_drv_probe, .probe = ohci_hcd_ep93xx_drv_probe,
.remove = ohci_hcd_ep93xx_drv_remove, .remove = ohci_hcd_ep93xx_drv_remove,
.shutdown = usb_hcd_platform_shutdown, .shutdown = usb_hcd_platform_shutdown,
#ifdef CONFIG_PM #ifdef CONFIG_PM
.suspend = ohci_hcd_ep93xx_drv_suspend, .suspend = ohci_hcd_ep93xx_drv_suspend,
.resume = ohci_hcd_ep93xx_drv_resume, .resume = ohci_hcd_ep93xx_drv_resume,
......
...@@ -3,77 +3,21 @@ ...@@ -3,77 +3,21 @@
* *
* (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at> * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
* (C) Copyright 2000-2004 David Brownell <dbrownell@users.sourceforge.net> * (C) Copyright 2000-2004 David Brownell <dbrownell@users.sourceforge.net>
* *
* [ Initialisation is based on Linus' ] * [ Initialisation is based on Linus' ]
* [ uhci code and gregs ohci fragments ] * [ uhci code and gregs ohci fragments ]
* [ (C) Copyright 1999 Linus Torvalds ] * [ (C) Copyright 1999 Linus Torvalds ]
* [ (C) Copyright 1999 Gregory P. Smith] * [ (C) Copyright 1999 Gregory P. Smith]
* *
* *
* OHCI is the main "non-Intel/VIA" standard for USB 1.1 host controller * OHCI is the main "non-Intel/VIA" standard for USB 1.1 host controller
* interfaces (though some non-x86 Intel chips use it). It supports * interfaces (though some non-x86 Intel chips use it). It supports
* smarter hardware than UHCI. A download link for the spec available * smarter hardware than UHCI. A download link for the spec available
* through the http://www.usb.org website. * through the http://www.usb.org website.
* *
* History:
*
* 2004/03/24 LH7A404 support (Durgesh Pattamatta & Marc Singer)
* 2004/02/04 use generic dma_* functions instead of pci_* (dsaxena@plexity.net)
* 2003/02/24 show registers in sysfs (Kevin Brosius)
*
* 2002/09/03 get rid of ed hashtables, rework periodic scheduling and
* bandwidth accounting; if debugging, show schedules in driverfs
* 2002/07/19 fixes to management of ED and schedule state.
* 2002/06/09 SA-1111 support (Christopher Hoover)
* 2002/06/01 remember frame when HC won't see EDs any more; use that info
* to fix urb unlink races caused by interrupt latency assumptions;
* minor ED field and function naming updates
* 2002/01/18 package as a patch for 2.5.3; this should match the
* 2.4.17 kernel modulo some bugs being fixed.
*
* 2001/10/18 merge pmac cleanup (Benjamin Herrenschmidt) and bugfixes
* from post-2.4.5 patches.
* 2001/09/20 URB_ZERO_PACKET support; hcca_dma portability, OPTi warning
* 2001/09/07 match PCI PM changes, errnos from Linus' tree
* 2001/05/05 fork 2.4.5 version into "hcd" framework, cleanup, simplify;
* pbook pci quirks gone (please fix pbook pci sw!) (db)
*
* 2001/04/08 Identify version on module load (gb)
* 2001/03/24 td/ed hashing to remove bus_to_virt (Steve Longerbeam);
pci_map_single (db)
* 2001/03/21 td and dev/ed allocation uses new pci_pool API (db)
* 2001/03/07 hcca allocation uses pci_alloc_consistent (Steve Longerbeam)
*
* 2000/09/26 fixed races in removing the private portion of the urb
* 2000/09/07 disable bulk and control lists when unlinking the last
* endpoint descriptor in order to avoid unrecoverable errors on
* the Lucent chips. (rwc@sgi)
* 2000/08/29 use bandwidth claiming hooks (thanks Randy!), fix some
* urb unlink probs, indentation fixes
* 2000/08/11 various oops fixes mostly affecting iso and cleanup from
* device unplugs.
* 2000/06/28 use PCI hotplug framework, for better power management
* and for Cardbus support (David Brownell)
* 2000/earlier: fixes for NEC/Lucent chips; suspend/resume handling
* when the controller loses power; handle UE; cleanup; ...
*
* v5.2 1999/12/07 URB 3rd preview,
* v5.1 1999/11/30 URB 2nd preview, cpia, (usb-scsi)
* v5.0 1999/11/22 URB Technical preview, Paul Mackerras powerbook susp/resume
* i386: HUB, Keyboard, Mouse, Printer
*
* v4.3 1999/10/27 multiple HCs, bulk_request
* v4.2 1999/09/05 ISO API alpha, new dev alloc, neg Error-codes
* v4.1 1999/08/27 Randy Dunlap's - ISO API first impl.
* v4.0 1999/08/18
* v3.0 1999/06/25
* v2.1 1999/05/09 code clean up
* v2.0 1999/05/04
* v1.0 1999/04/27 initial release
*
* This file is licenced under the GPL. * This file is licenced under the GPL.
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/pci.h> #include <linux/pci.h>
...@@ -89,7 +33,7 @@ ...@@ -89,7 +33,7 @@
#include <linux/list.h> #include <linux/list.h>
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/usb/otg.h> #include <linux/usb/otg.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/dmapool.h> #include <linux/dmapool.h>
#include <linux/reboot.h> #include <linux/reboot.h>
...@@ -183,11 +127,11 @@ static int ohci_urb_enqueue ( ...@@ -183,11 +127,11 @@ static int ohci_urb_enqueue (
int i, size = 0; int i, size = 0;
unsigned long flags; unsigned long flags;
int retval = 0; int retval = 0;
#ifdef OHCI_VERBOSE_DEBUG #ifdef OHCI_VERBOSE_DEBUG
urb_print (urb, "SUB", usb_pipein (pipe)); urb_print (urb, "SUB", usb_pipein (pipe));
#endif #endif
/* every endpoint has a ed, locate and maybe (re)initialize it */ /* every endpoint has a ed, locate and maybe (re)initialize it */
if (! (ed = ed_get (ohci, ep, urb->dev, pipe, urb->interval))) if (! (ed = ed_get (ohci, ep, urb->dev, pipe, urb->interval)))
return -ENOMEM; return -ENOMEM;
...@@ -232,7 +176,7 @@ static int ohci_urb_enqueue ( ...@@ -232,7 +176,7 @@ static int ohci_urb_enqueue (
memset (urb_priv, 0, sizeof (urb_priv_t) + size * sizeof (struct td *)); memset (urb_priv, 0, sizeof (urb_priv_t) + size * sizeof (struct td *));
INIT_LIST_HEAD (&urb_priv->pending); INIT_LIST_HEAD (&urb_priv->pending);
urb_priv->length = size; urb_priv->length = size;
urb_priv->ed = ed; urb_priv->ed = ed;
/* allocate the TDs (deferring hash chain updates) */ /* allocate the TDs (deferring hash chain updates) */
for (i = 0; i < size; i++) { for (i = 0; i < size; i++) {
...@@ -242,7 +186,7 @@ static int ohci_urb_enqueue ( ...@@ -242,7 +186,7 @@ static int ohci_urb_enqueue (
urb_free_priv (ohci, urb_priv); urb_free_priv (ohci, urb_priv);
return -ENOMEM; return -ENOMEM;
} }
} }
spin_lock_irqsave (&ohci->lock, flags); spin_lock_irqsave (&ohci->lock, flags);
...@@ -313,13 +257,13 @@ static int ohci_urb_dequeue (struct usb_hcd *hcd, struct urb *urb) ...@@ -313,13 +257,13 @@ static int ohci_urb_dequeue (struct usb_hcd *hcd, struct urb *urb)
{ {
struct ohci_hcd *ohci = hcd_to_ohci (hcd); struct ohci_hcd *ohci = hcd_to_ohci (hcd);
unsigned long flags; unsigned long flags;
#ifdef OHCI_VERBOSE_DEBUG #ifdef OHCI_VERBOSE_DEBUG
urb_print (urb, "UNLINK", 1); urb_print (urb, "UNLINK", 1);
#endif #endif
spin_lock_irqsave (&ohci->lock, flags); spin_lock_irqsave (&ohci->lock, flags);
if (HC_IS_RUNNING(hcd->state)) { if (HC_IS_RUNNING(hcd->state)) {
urb_priv_t *urb_priv; urb_priv_t *urb_priv;
/* Unless an IRQ completed the unlink while it was being /* Unless an IRQ completed the unlink while it was being
...@@ -512,11 +456,11 @@ static int ohci_init (struct ohci_hcd *ohci) ...@@ -512,11 +456,11 @@ static int ohci_init (struct ohci_hcd *ohci)
/* Start an OHCI controller, set the BUS operational /* Start an OHCI controller, set the BUS operational
* resets USB and controller * resets USB and controller
* enable interrupts * enable interrupts
*/ */
static int ohci_run (struct ohci_hcd *ohci) static int ohci_run (struct ohci_hcd *ohci)
{ {
u32 mask, temp; u32 mask, temp;
int first = ohci->fminterval == 0; int first = ohci->fminterval == 0;
struct usb_hcd *hcd = ohci_to_hcd(ohci); struct usb_hcd *hcd = ohci_to_hcd(ohci);
...@@ -534,7 +478,7 @@ static int ohci_run (struct ohci_hcd *ohci) ...@@ -534,7 +478,7 @@ static int ohci_run (struct ohci_hcd *ohci)
/* also: power/overcurrent flags in roothub.a */ /* also: power/overcurrent flags in roothub.a */
} }
/* Reset USB nearly "by the book". RemoteWakeupConnected was /* Reset USB nearly "by the book". RemoteWakeupConnected was
* saved if boot firmware (BIOS/SMM/...) told us it's connected, * saved if boot firmware (BIOS/SMM/...) told us it's connected,
* or if bus glue did the same (e.g. for PCI add-in cards with * or if bus glue did the same (e.g. for PCI add-in cards with
* PCI PM support). * PCI PM support).
...@@ -765,9 +709,9 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd) ...@@ -765,9 +709,9 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
dl_done_list (ohci); dl_done_list (ohci);
spin_unlock (&ohci->lock); spin_unlock (&ohci->lock);
if (HC_IS_RUNNING(hcd->state)) if (HC_IS_RUNNING(hcd->state))
ohci_writel (ohci, OHCI_INTR_WDH, &regs->intrenable); ohci_writel (ohci, OHCI_INTR_WDH, &regs->intrenable);
} }
/* could track INTR_SO to reduce available PCI/... bandwidth */ /* could track INTR_SO to reduce available PCI/... bandwidth */
/* handle any pending URB/ED unlinks, leaving INTR_SF enabled /* handle any pending URB/ED unlinks, leaving INTR_SF enabled
...@@ -778,12 +722,12 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd) ...@@ -778,12 +722,12 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
finish_unlinks (ohci, ohci_frame_no(ohci)); finish_unlinks (ohci, ohci_frame_no(ohci));
if ((ints & OHCI_INTR_SF) != 0 && !ohci->ed_rm_list if ((ints & OHCI_INTR_SF) != 0 && !ohci->ed_rm_list
&& HC_IS_RUNNING(hcd->state)) && HC_IS_RUNNING(hcd->state))
ohci_writel (ohci, OHCI_INTR_SF, &regs->intrdisable); ohci_writel (ohci, OHCI_INTR_SF, &regs->intrdisable);
spin_unlock (&ohci->lock); spin_unlock (&ohci->lock);
if (HC_IS_RUNNING(hcd->state)) { if (HC_IS_RUNNING(hcd->state)) {
ohci_writel (ohci, ints, &regs->intrstatus); ohci_writel (ohci, ints, &regs->intrstatus);
ohci_writel (ohci, OHCI_INTR_MIE, &regs->intrenable); ohci_writel (ohci, OHCI_INTR_MIE, &regs->intrenable);
// flush those writes // flush those writes
(void) ohci_readl (ohci, &ohci->regs->control); (void) ohci_readl (ohci, &ohci->regs->control);
} }
...@@ -794,7 +738,7 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd) ...@@ -794,7 +738,7 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static void ohci_stop (struct usb_hcd *hcd) static void ohci_stop (struct usb_hcd *hcd)
{ {
struct ohci_hcd *ohci = hcd_to_ohci (hcd); struct ohci_hcd *ohci = hcd_to_ohci (hcd);
ohci_dbg (ohci, "stop %s controller (state 0x%02x)\n", ohci_dbg (ohci, "stop %s controller (state 0x%02x)\n",
...@@ -812,8 +756,8 @@ static void ohci_stop (struct usb_hcd *hcd) ...@@ -812,8 +756,8 @@ static void ohci_stop (struct usb_hcd *hcd)
remove_debug_files (ohci); remove_debug_files (ohci);
ohci_mem_cleanup (ohci); ohci_mem_cleanup (ohci);
if (ohci->hcca) { if (ohci->hcca) {
dma_free_coherent (hcd->self.controller, dma_free_coherent (hcd->self.controller,
sizeof *ohci->hcca, sizeof *ohci->hcca,
ohci->hcca, ohci->hcca_dma); ohci->hcca, ohci->hcca_dma);
ohci->hcca = NULL; ohci->hcca = NULL;
ohci->hcca_dma = 0; ohci->hcca_dma = 0;
...@@ -836,7 +780,7 @@ static int ohci_restart (struct ohci_hcd *ohci) ...@@ -836,7 +780,7 @@ static int ohci_restart (struct ohci_hcd *ohci)
* recycle any "live" eds/tds (and urbs) right away. * recycle any "live" eds/tds (and urbs) right away.
* later, khubd disconnect processing will recycle the other state, * later, khubd disconnect processing will recycle the other state,
* (either as disconnect/reconnect, or maybe someday as a reset). * (either as disconnect/reconnect, or maybe someday as a reset).
*/ */
spin_lock_irq(&ohci->lock); spin_lock_irq(&ohci->lock);
disable (ohci); disable (ohci);
usb_root_hub_lost_power(ohci_to_hcd(ohci)->self.root_hub); usb_root_hub_lost_power(ohci_to_hcd(ohci)->self.root_hub);
...@@ -875,11 +819,11 @@ static int ohci_restart (struct ohci_hcd *ohci) ...@@ -875,11 +819,11 @@ static int ohci_restart (struct ohci_hcd *ohci)
/* empty the interrupt branches */ /* empty the interrupt branches */
for (i = 0; i < NUM_INTS; i++) ohci->load [i] = 0; for (i = 0; i < NUM_INTS; i++) ohci->load [i] = 0;
for (i = 0; i < NUM_INTS; i++) ohci->hcca->int_table [i] = 0; for (i = 0; i < NUM_INTS; i++) ohci->hcca->int_table [i] = 0;
/* no EDs to remove */ /* no EDs to remove */
ohci->ed_rm_list = NULL; ohci->ed_rm_list = NULL;
/* empty control and bulk lists */ /* empty control and bulk lists */
ohci->ed_controltail = NULL; ohci->ed_controltail = NULL;
ohci->ed_bulktail = NULL; ohci->ed_bulktail = NULL;
......
/* /*
* OHCI HCD (Host Controller Driver) for USB. * OHCI HCD (Host Controller Driver) for USB.
* *
* (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at> * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
* (C) Copyright 2000-2004 David Brownell <dbrownell@users.sourceforge.net> * (C) Copyright 2000-2004 David Brownell <dbrownell@users.sourceforge.net>
* *
* This file is licenced under GPL * This file is licenced under GPL
*/ */
...@@ -23,13 +23,13 @@ ...@@ -23,13 +23,13 @@
(temp & RH_PS_PSSC) ? " PSSC" : "", \ (temp & RH_PS_PSSC) ? " PSSC" : "", \
(temp & RH_PS_PESC) ? " PESC" : "", \ (temp & RH_PS_PESC) ? " PESC" : "", \
(temp & RH_PS_CSC) ? " CSC" : "", \ (temp & RH_PS_CSC) ? " CSC" : "", \
\ \
(temp & RH_PS_LSDA) ? " LSDA" : "", \ (temp & RH_PS_LSDA) ? " LSDA" : "", \
(temp & RH_PS_PPS) ? " PPS" : "", \ (temp & RH_PS_PPS) ? " PPS" : "", \
(temp & RH_PS_PRS) ? " PRS" : "", \ (temp & RH_PS_PRS) ? " PRS" : "", \
(temp & RH_PS_POCI) ? " POCI" : "", \ (temp & RH_PS_POCI) ? " POCI" : "", \
(temp & RH_PS_PSS) ? " PSS" : "", \ (temp & RH_PS_PSS) ? " PSS" : "", \
\ \
(temp & RH_PS_PES) ? " PES" : "", \ (temp & RH_PS_PES) ? " PES" : "", \
(temp & RH_PS_CCS) ? " CCS" : "" \ (temp & RH_PS_CCS) ? " CCS" : "" \
); );
...@@ -484,7 +484,7 @@ ohci_hub_descriptor ( ...@@ -484,7 +484,7 @@ ohci_hub_descriptor (
temp = 0; temp = 0;
if (rh & RH_A_NPS) /* no power switching? */ if (rh & RH_A_NPS) /* no power switching? */
temp |= 0x0002; temp |= 0x0002;
if (rh & RH_A_PSM) /* per-port power switching? */ if (rh & RH_A_PSM) /* per-port power switching? */
temp |= 0x0001; temp |= 0x0001;
if (rh & RH_A_NOCP) /* no overcurrent reporting? */ if (rh & RH_A_NOCP) /* no overcurrent reporting? */
temp |= 0x0010; temp |= 0x0010;
...@@ -573,7 +573,7 @@ static inline void root_port_reset (struct ohci_hcd *ohci, unsigned port) ...@@ -573,7 +573,7 @@ static inline void root_port_reset (struct ohci_hcd *ohci, unsigned port)
if (!(temp & RH_PS_PRS)) if (!(temp & RH_PS_PRS))
break; break;
udelay (500); udelay (500);
} }
if (!(temp & RH_PS_CCS)) if (!(temp & RH_PS_CCS))
break; break;
......
...@@ -38,7 +38,7 @@ static void lh7a404_start_hc(struct platform_device *dev) ...@@ -38,7 +38,7 @@ static void lh7a404_start_hc(struct platform_device *dev)
CSC_PWRCNT |= CSC_PWRCNT_USBH_EN; /* Enable clock */ CSC_PWRCNT |= CSC_PWRCNT_USBH_EN; /* Enable clock */
udelay(1000); udelay(1000);
USBH_CMDSTATUS = OHCI_HCR; USBH_CMDSTATUS = OHCI_HCR;
printk(KERN_DEBUG __FILE__ printk(KERN_DEBUG __FILE__
": Clock to USB host has been enabled \n"); ": Clock to USB host has been enabled \n");
} }
...@@ -89,7 +89,7 @@ int usb_hcd_lh7a404_probe (const struct hc_driver *driver, ...@@ -89,7 +89,7 @@ int usb_hcd_lh7a404_probe (const struct hc_driver *driver,
retval = -EBUSY; retval = -EBUSY;
goto err1; goto err1;
} }
hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
if (!hcd->regs) { if (!hcd->regs) {
pr_debug("ioremap failed"); pr_debug("ioremap failed");
...@@ -174,7 +174,7 @@ static const struct hc_driver ohci_lh7a404_hc_driver = { ...@@ -174,7 +174,7 @@ static const struct hc_driver ohci_lh7a404_hc_driver = {
*/ */
.start = ohci_lh7a404_start, .start = ohci_lh7a404_start,
.stop = ohci_stop, .stop = ohci_stop,
.shutdown = ohci_shutdown, .shutdown = ohci_shutdown,
/* /*
* managing i/o requests and associated device resources * managing i/o requests and associated device resources
...@@ -242,7 +242,7 @@ static int ohci_hcd_lh7a404_drv_resume(struct platform_device *dev) ...@@ -242,7 +242,7 @@ static int ohci_hcd_lh7a404_drv_resume(struct platform_device *dev)
static struct platform_driver ohci_hcd_lh7a404_driver = { static struct platform_driver ohci_hcd_lh7a404_driver = {
.probe = ohci_hcd_lh7a404_drv_probe, .probe = ohci_hcd_lh7a404_drv_probe,
.remove = ohci_hcd_lh7a404_drv_remove, .remove = ohci_hcd_lh7a404_drv_remove,
.shutdown = usb_hcd_platform_shutdown, .shutdown = usb_hcd_platform_shutdown,
/*.suspend = ohci_hcd_lh7a404_drv_suspend, */ /*.suspend = ohci_hcd_lh7a404_drv_suspend, */
/*.resume = ohci_hcd_lh7a404_drv_resume, */ /*.resume = ohci_hcd_lh7a404_drv_resume, */
.driver = { .driver = {
......
/* /*
* OHCI HCD (Host Controller Driver) for USB. * OHCI HCD (Host Controller Driver) for USB.
* *
* (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at> * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
* (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net> * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
* *
* This file is licenced under the GPL. * This file is licenced under the GPL.
*/ */
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
/* /*
* There's basically three types of memory: * OHCI deals with three types of memory:
* - data used only by the HCD ... kmalloc is fine * - data used only by the HCD ... kmalloc is fine
* - async and periodic schedules, shared by HC and HCD ... these * - async and periodic schedules, shared by HC and HCD ... these
* need to use dma_pool or dma_alloc_coherent * need to use dma_pool or dma_alloc_coherent
* - driver buffers, read/written by HC ... the hcd glue or the * - driver buffers, read/written by HC ... the hcd glue or the
* device driver provides us with dma addresses * device driver provides us with dma addresses
* *
* There's also PCI "register" data, which is memory mapped. * There's also "register" data, which is memory mapped.
* No memory seen by this driver is pagable. * No memory seen by this driver (or any HCD) may be paged out.
*/ */
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
......
...@@ -447,7 +447,7 @@ static const struct hc_driver ohci_omap_hc_driver = { ...@@ -447,7 +447,7 @@ static const struct hc_driver ohci_omap_hc_driver = {
.reset = ohci_omap_init, .reset = ohci_omap_init,
.start = ohci_omap_start, .start = ohci_omap_start,
.stop = ohci_omap_stop, .stop = ohci_omap_stop,
.shutdown = ohci_shutdown, .shutdown = ohci_shutdown,
/* /*
* managing i/o requests and associated device resources * managing i/o requests and associated device resources
...@@ -533,7 +533,7 @@ static int ohci_omap_resume(struct platform_device *dev) ...@@ -533,7 +533,7 @@ static int ohci_omap_resume(struct platform_device *dev)
static struct platform_driver ohci_hcd_omap_driver = { static struct platform_driver ohci_hcd_omap_driver = {
.probe = ohci_hcd_omap_drv_probe, .probe = ohci_hcd_omap_drv_probe,
.remove = ohci_hcd_omap_drv_remove, .remove = ohci_hcd_omap_drv_remove,
.shutdown = usb_hcd_platform_shutdown, .shutdown = usb_hcd_platform_shutdown,
#ifdef CONFIG_PM #ifdef CONFIG_PM
.suspend = ohci_omap_suspend, .suspend = ohci_omap_suspend,
.resume = ohci_omap_resume, .resume = ohci_omap_resume,
......
...@@ -3,17 +3,17 @@ ...@@ -3,17 +3,17 @@
* *
* (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at> * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
* (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net> * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
* *
* [ Initialisation is based on Linus' ] * [ Initialisation is based on Linus' ]
* [ uhci code and gregs ohci fragments ] * [ uhci code and gregs ohci fragments ]
* [ (C) Copyright 1999 Linus Torvalds ] * [ (C) Copyright 1999 Linus Torvalds ]
* [ (C) Copyright 1999 Gregory P. Smith] * [ (C) Copyright 1999 Gregory P. Smith]
* *
* PCI Bus Glue * PCI Bus Glue
* *
* This file is licenced under the GPL. * This file is licenced under the GPL.
*/ */
#ifndef CONFIG_PCI #ifndef CONFIG_PCI
#error "This file is PCI bus glue. CONFIG_PCI must be defined." #error "This file is PCI bus glue. CONFIG_PCI must be defined."
#endif #endif
...@@ -83,7 +83,7 @@ ohci_pci_start (struct usb_hcd *hcd) ...@@ -83,7 +83,7 @@ ohci_pci_start (struct usb_hcd *hcd)
pci_dev_put(b); pci_dev_put(b);
} }
/* Check for Compaq's ZFMicro chipset, which needs short /* Check for Compaq's ZFMicro chipset, which needs short
* delays before control or bulk queues get re-activated * delays before control or bulk queues get re-activated
* in finish_unlinks() * in finish_unlinks()
*/ */
...@@ -238,8 +238,8 @@ static struct pci_driver ohci_pci_driver = { ...@@ -238,8 +238,8 @@ static struct pci_driver ohci_pci_driver = {
.shutdown = usb_hcd_pci_shutdown, .shutdown = usb_hcd_pci_shutdown,
}; };
static int __init ohci_hcd_pci_init (void) static int __init ohci_hcd_pci_init (void)
{ {
printk (KERN_DEBUG "%s: " DRIVER_INFO " (PCI)\n", hcd_name); printk (KERN_DEBUG "%s: " DRIVER_INFO " (PCI)\n", hcd_name);
if (usb_disabled()) if (usb_disabled())
...@@ -253,8 +253,8 @@ module_init (ohci_hcd_pci_init); ...@@ -253,8 +253,8 @@ module_init (ohci_hcd_pci_init);
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static void __exit ohci_hcd_pci_cleanup (void) static void __exit ohci_hcd_pci_cleanup (void)
{ {
pci_unregister_driver (&ohci_pci_driver); pci_unregister_driver (&ohci_pci_driver);
} }
module_exit (ohci_hcd_pci_cleanup); module_exit (ohci_hcd_pci_cleanup);
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* driver for Philips PNX4008 USB Host * driver for Philips PNX4008 USB Host
* *
* Authors: Dmitry Chigirev <source@mvista.com> * Authors: Dmitry Chigirev <source@mvista.com>
* Vitaly Wool <vitalywool@gmail.com> * Vitaly Wool <vitalywool@gmail.com>
* *
* register initialization is based on code examples provided by Philips * register initialization is based on code examples provided by Philips
* Copyright (c) 2005 Koninklijke Philips Electronics N.V. * Copyright (c) 2005 Koninklijke Philips Electronics N.V.
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <asm/arch/irqs.h> #include <asm/arch/irqs.h>
#include <asm/arch/gpio.h> #include <asm/arch/gpio.h>
#define USB_CTRL IO_ADDRESS(PNX4008_PWRMAN_BASE + 0x64) #define USB_CTRL IO_ADDRESS(PNX4008_PWRMAN_BASE + 0x64)
/* USB_CTRL bit defines */ /* USB_CTRL bit defines */
#define USB_SLAVE_HCLK_EN (1 << 24) #define USB_SLAVE_HCLK_EN (1 << 24)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net> * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
* (C) Copyright 2002 Hewlett-Packard Company * (C) Copyright 2002 Hewlett-Packard Company
* (C) Copyright 2003-2005 MontaVista Software Inc. * (C) Copyright 2003-2005 MontaVista Software Inc.
* *
* Bus Glue for PPC On-Chip OHCI driver * Bus Glue for PPC On-Chip OHCI driver
* Tested on Freescale MPC5200 and IBM STB04xxx * Tested on Freescale MPC5200 and IBM STB04xxx
* *
...@@ -85,7 +85,7 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver, ...@@ -85,7 +85,7 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver,
err2: err2:
release_mem_region(hcd->rsrc_start, hcd->rsrc_len); release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
err1: err1:
usb_put_hcd(hcd); usb_put_hcd(hcd);
return retval; return retval;
} }
...@@ -148,7 +148,7 @@ static const struct hc_driver ohci_ppc_soc_hc_driver = { ...@@ -148,7 +148,7 @@ static const struct hc_driver ohci_ppc_soc_hc_driver = {
*/ */
.start = ohci_ppc_soc_start, .start = ohci_ppc_soc_start,
.stop = ohci_stop, .stop = ohci_stop,
.shutdown = ohci_shutdown, .shutdown = ohci_shutdown,
/* /*
* managing i/o requests and associated device resources * managing i/o requests and associated device resources
...@@ -197,7 +197,7 @@ static int ohci_hcd_ppc_soc_drv_remove(struct platform_device *pdev) ...@@ -197,7 +197,7 @@ static int ohci_hcd_ppc_soc_drv_remove(struct platform_device *pdev)
static struct platform_driver ohci_hcd_ppc_soc_driver = { static struct platform_driver ohci_hcd_ppc_soc_driver = {
.probe = ohci_hcd_ppc_soc_drv_probe, .probe = ohci_hcd_ppc_soc_drv_probe,
.remove = ohci_hcd_ppc_soc_drv_remove, .remove = ohci_hcd_ppc_soc_drv_remove,
.shutdown = usb_hcd_platform_shutdown, .shutdown = usb_hcd_platform_shutdown,
#ifdef CONFIG_PM #ifdef CONFIG_PM
/*.suspend = ohci_hcd_ppc_soc_drv_suspend,*/ /*.suspend = ohci_hcd_ppc_soc_drv_suspend,*/
/*.resume = ohci_hcd_ppc_soc_drv_resume,*/ /*.resume = ohci_hcd_ppc_soc_drv_resume,*/
......
...@@ -47,7 +47,7 @@ static int pxa27x_ohci_select_pmm( int mode ) ...@@ -47,7 +47,7 @@ static int pxa27x_ohci_select_pmm( int mode )
switch ( mode ) { switch ( mode ) {
case PMM_NPS_MODE: case PMM_NPS_MODE:
UHCRHDA |= RH_A_NPS; UHCRHDA |= RH_A_NPS;
break; break;
case PMM_GLOBAL_MODE: case PMM_GLOBAL_MODE:
UHCRHDA &= ~(RH_A_NPS & RH_A_PSM); UHCRHDA &= ~(RH_A_NPS & RH_A_PSM);
break; break;
...@@ -60,7 +60,7 @@ static int pxa27x_ohci_select_pmm( int mode ) ...@@ -60,7 +60,7 @@ static int pxa27x_ohci_select_pmm( int mode )
break; break;
default: default:
printk( KERN_ERR printk( KERN_ERR
"Invalid mode %d, set to non-power switch mode.\n", "Invalid mode %d, set to non-power switch mode.\n",
mode ); mode );
UHCRHDA |= RH_A_NPS; UHCRHDA |= RH_A_NPS;
...@@ -270,7 +270,7 @@ static const struct hc_driver ohci_pxa27x_hc_driver = { ...@@ -270,7 +270,7 @@ static const struct hc_driver ohci_pxa27x_hc_driver = {
*/ */
.start = ohci_pxa27x_start, .start = ohci_pxa27x_start,
.stop = ohci_stop, .stop = ohci_stop,
.shutdown = ohci_shutdown, .shutdown = ohci_shutdown,
/* /*
* managing i/o requests and associated device resources * managing i/o requests and associated device resources
...@@ -359,9 +359,9 @@ static int ohci_hcd_pxa27x_drv_resume(struct platform_device *pdev) ...@@ -359,9 +359,9 @@ static int ohci_hcd_pxa27x_drv_resume(struct platform_device *pdev)
static struct platform_driver ohci_hcd_pxa27x_driver = { static struct platform_driver ohci_hcd_pxa27x_driver = {
.probe = ohci_hcd_pxa27x_drv_probe, .probe = ohci_hcd_pxa27x_drv_probe,
.remove = ohci_hcd_pxa27x_drv_remove, .remove = ohci_hcd_pxa27x_drv_remove,
.shutdown = usb_hcd_platform_shutdown, .shutdown = usb_hcd_platform_shutdown,
#ifdef CONFIG_PM #ifdef CONFIG_PM
.suspend = ohci_hcd_pxa27x_drv_suspend, .suspend = ohci_hcd_pxa27x_drv_suspend,
.resume = ohci_hcd_pxa27x_drv_resume, .resume = ohci_hcd_pxa27x_drv_resume,
#endif #endif
.driver = { .driver = {
......
/* /*
* OHCI HCD (Host Controller Driver) for USB. * OHCI HCD (Host Controller Driver) for USB.
* *
* (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at> * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
* (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net> * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
* *
* This file is licenced under the GPL. * This file is licenced under the GPL.
*/ */
...@@ -89,7 +89,7 @@ __acquires(ohci->lock) ...@@ -89,7 +89,7 @@ __acquires(ohci->lock)
/*-------------------------------------------------------------------------* /*-------------------------------------------------------------------------*
* ED handling functions * ED handling functions
*-------------------------------------------------------------------------*/ *-------------------------------------------------------------------------*/
/* search for the right schedule branch to use for a periodic ed. /* search for the right schedule branch to use for a periodic ed.
* does some load balancing; returns the branch, or negative errno. * does some load balancing; returns the branch, or negative errno.
...@@ -107,7 +107,6 @@ static int balance (struct ohci_hcd *ohci, int interval, int load) ...@@ -107,7 +107,6 @@ static int balance (struct ohci_hcd *ohci, int interval, int load)
*/ */
for (i = 0; i < interval ; i++) { for (i = 0; i < interval ; i++) {
if (branch < 0 || ohci->load [branch] > ohci->load [i]) { if (branch < 0 || ohci->load [branch] > ohci->load [i]) {
#if 1 /* CONFIG_USB_BANDWIDTH */
int j; int j;
/* usb 1.1 says 90% of one frame */ /* usb 1.1 says 90% of one frame */
...@@ -117,8 +116,7 @@ static int balance (struct ohci_hcd *ohci, int interval, int load) ...@@ -117,8 +116,7 @@ static int balance (struct ohci_hcd *ohci, int interval, int load)
} }
if (j < NUM_INTS) if (j < NUM_INTS)
continue; continue;
#endif branch = i;
branch = i;
} }
} }
return branch; return branch;
...@@ -171,7 +169,7 @@ static void periodic_link (struct ohci_hcd *ohci, struct ed *ed) ...@@ -171,7 +169,7 @@ static void periodic_link (struct ohci_hcd *ohci, struct ed *ed)
/* link an ed into one of the HC chains */ /* link an ed into one of the HC chains */
static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed) static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed)
{ {
int branch; int branch;
if (ohci_to_hcd(ohci)->state == HC_STATE_QUIESCING) if (ohci_to_hcd(ohci)->state == HC_STATE_QUIESCING)
...@@ -248,7 +246,7 @@ static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed) ...@@ -248,7 +246,7 @@ static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed)
} }
ed->branch = branch; ed->branch = branch;
periodic_link (ohci, ed); periodic_link (ohci, ed);
} }
/* the HC may not see the schedule updates yet, but if it does /* the HC may not see the schedule updates yet, but if it does
* then they'll be properly ordered. * then they'll be properly ordered.
...@@ -277,7 +275,7 @@ static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed) ...@@ -277,7 +275,7 @@ static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed)
*prev = ed->ed_next; *prev = ed->ed_next;
} }
ohci->load [i] -= ed->load; ohci->load [i] -= ed->load;
} }
ohci_to_hcd(ohci)->self.bandwidth_allocated -= ed->load / ed->interval; ohci_to_hcd(ohci)->self.bandwidth_allocated -= ed->load / ed->interval;
ohci_vdbg (ohci, "unlink %sed %p branch %d [%dus.], interval %d\n", ohci_vdbg (ohci, "unlink %sed %p branch %d [%dus.], interval %d\n",
...@@ -285,7 +283,7 @@ static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed) ...@@ -285,7 +283,7 @@ static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed)
ed, ed->branch, ed->load, ed->interval); ed, ed->branch, ed->load, ed->interval);
} }
/* unlink an ed from one of the HC chains. /* unlink an ed from one of the HC chains.
* just the link to the ed is unlinked. * just the link to the ed is unlinked.
* the link from the ed still points to another operational ed or 0 * the link from the ed still points to another operational ed or 0
* so the HC can eventually finish the processing of the unlinked ed * so the HC can eventually finish the processing of the unlinked ed
...@@ -307,7 +305,7 @@ static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed) ...@@ -307,7 +305,7 @@ static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed)
* When finish_unlinks() runs later, after SOF interrupt, it will often * When finish_unlinks() runs later, after SOF interrupt, it will often
* complete one or more URB unlinks before making that state change. * complete one or more URB unlinks before making that state change.
*/ */
static void ed_deschedule (struct ohci_hcd *ohci, struct ed *ed) static void ed_deschedule (struct ohci_hcd *ohci, struct ed *ed)
{ {
ed->hwINFO |= cpu_to_hc32 (ohci, ED_SKIP); ed->hwINFO |= cpu_to_hc32 (ohci, ED_SKIP);
wmb (); wmb ();
...@@ -397,7 +395,7 @@ static struct ed *ed_get ( ...@@ -397,7 +395,7 @@ static struct ed *ed_get (
unsigned int pipe, unsigned int pipe,
int interval int interval
) { ) {
struct ed *ed; struct ed *ed;
unsigned long flags; unsigned long flags;
spin_lock_irqsave (&ohci->lock, flags); spin_lock_irqsave (&ohci->lock, flags);
...@@ -413,9 +411,9 @@ static struct ed *ed_get ( ...@@ -413,9 +411,9 @@ static struct ed *ed_get (
goto done; goto done;
} }
/* dummy td; end of td list for ed */ /* dummy td; end of td list for ed */
td = td_alloc (ohci, GFP_ATOMIC); td = td_alloc (ohci, GFP_ATOMIC);
if (!td) { if (!td) {
/* out of memory */ /* out of memory */
ed_free (ohci, ed); ed_free (ohci, ed);
ed = NULL; ed = NULL;
...@@ -462,7 +460,7 @@ static struct ed *ed_get ( ...@@ -462,7 +460,7 @@ static struct ed *ed_get (
done: done:
spin_unlock_irqrestore (&ohci->lock, flags); spin_unlock_irqrestore (&ohci->lock, flags);
return ed; return ed;
} }
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
...@@ -474,7 +472,7 @@ done: ...@@ -474,7 +472,7 @@ done:
* and that ed->state is ED_OPER * and that ed->state is ED_OPER
*/ */
static void start_ed_unlink (struct ohci_hcd *ohci, struct ed *ed) static void start_ed_unlink (struct ohci_hcd *ohci, struct ed *ed)
{ {
ed->hwINFO |= cpu_to_hc32 (ohci, ED_DEQUEUE); ed->hwINFO |= cpu_to_hc32 (ohci, ED_DEQUEUE);
ed_deschedule (ohci, ed); ed_deschedule (ohci, ed);
...@@ -541,7 +539,7 @@ td_fill (struct ohci_hcd *ohci, u32 info, ...@@ -541,7 +539,7 @@ td_fill (struct ohci_hcd *ohci, u32 info,
td->ed = urb_priv->ed; td->ed = urb_priv->ed;
td->next_dl_td = NULL; td->next_dl_td = NULL;
td->index = index; td->index = index;
td->urb = urb; td->urb = urb;
td->data_dma = data; td->data_dma = data;
if (!len) if (!len)
data = 0; data = 0;
...@@ -553,8 +551,8 @@ td_fill (struct ohci_hcd *ohci, u32 info, ...@@ -553,8 +551,8 @@ td_fill (struct ohci_hcd *ohci, u32 info,
(data & 0x0FFF) | 0xE000); (data & 0x0FFF) | 0xE000);
td->ed->last_iso = info & 0xffff; td->ed->last_iso = info & 0xffff;
} else { } else {
td->hwCBP = cpu_to_hc32 (ohci, data); td->hwCBP = cpu_to_hc32 (ohci, data);
} }
if (data) if (data)
td->hwBE = cpu_to_hc32 (ohci, data + len - 1); td->hwBE = cpu_to_hc32 (ohci, data + len - 1);
else else
...@@ -597,7 +595,7 @@ static void td_submit_urb ( ...@@ -597,7 +595,7 @@ static void td_submit_urb (
* use the device toggle bits for resetting, and rely on the fact * use the device toggle bits for resetting, and rely on the fact
* that resetting toggle is meaningless if the endpoint is active. * that resetting toggle is meaningless if the endpoint is active.
*/ */
if (!usb_gettoggle (urb->dev, usb_pipeendpoint (urb->pipe), is_out)) { if (!usb_gettoggle (urb->dev, usb_pipeendpoint (urb->pipe), is_out)) {
usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe),
is_out, 1); is_out, 1);
urb_priv->ed->hwHeadP &= ~cpu_to_hc32 (ohci, ED_C); urb_priv->ed->hwHeadP &= ~cpu_to_hc32 (ohci, ED_C);
...@@ -721,16 +719,16 @@ static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td) ...@@ -721,16 +719,16 @@ static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td)
list_del (&td->td_list); list_del (&td->td_list);
/* ISO ... drivers see per-TD length/status */ /* ISO ... drivers see per-TD length/status */
if (tdINFO & TD_ISO) { if (tdINFO & TD_ISO) {
u16 tdPSW = ohci_hwPSW (ohci, td, 0); u16 tdPSW = ohci_hwPSW (ohci, td, 0);
int dlen = 0; int dlen = 0;
/* NOTE: assumes FC in tdINFO == 0, and that /* NOTE: assumes FC in tdINFO == 0, and that
* only the first of 0..MAXPSW psws is used. * only the first of 0..MAXPSW psws is used.
*/ */
cc = (tdPSW >> 12) & 0xF; cc = (tdPSW >> 12) & 0xF;
if (tdINFO & TD_CC) /* hc didn't touch? */ if (tdINFO & TD_CC) /* hc didn't touch? */
return; return;
if (usb_pipeout (urb->pipe)) if (usb_pipeout (urb->pipe))
...@@ -758,7 +756,7 @@ static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td) ...@@ -758,7 +756,7 @@ static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td)
int type = usb_pipetype (urb->pipe); int type = usb_pipetype (urb->pipe);
u32 tdBE = hc32_to_cpup (ohci, &td->hwBE); u32 tdBE = hc32_to_cpup (ohci, &td->hwBE);
cc = TD_CC_GET (tdINFO); cc = TD_CC_GET (tdINFO);
/* update packet status if needed (short is normally ok) */ /* update packet status if needed (short is normally ok) */
if (cc == TD_DATAUNDERRUN if (cc == TD_DATAUNDERRUN
...@@ -787,7 +785,7 @@ static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td) ...@@ -787,7 +785,7 @@ static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td)
urb, td, 1 + td->index, cc, urb, td, 1 + td->index, cc,
urb->actual_length, urb->actual_length,
urb->transfer_buffer_length); urb->transfer_buffer_length);
} }
} }
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
...@@ -795,7 +793,7 @@ static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td) ...@@ -795,7 +793,7 @@ static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td)
static inline struct td * static inline struct td *
ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev) ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev)
{ {
struct urb *urb = td->urb; struct urb *urb = td->urb;
struct ed *ed = td->ed; struct ed *ed = td->ed;
struct list_head *tmp = td->td_list.next; struct list_head *tmp = td->td_list.next;
__hc32 toggle = ed->hwHeadP & cpu_to_hc32 (ohci, ED_C); __hc32 toggle = ed->hwHeadP & cpu_to_hc32 (ohci, ED_C);
...@@ -805,7 +803,7 @@ ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev) ...@@ -805,7 +803,7 @@ ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev)
*/ */
ed->hwINFO |= cpu_to_hc32 (ohci, ED_SKIP); ed->hwINFO |= cpu_to_hc32 (ohci, ED_SKIP);
wmb (); wmb ();
ed->hwHeadP &= ~cpu_to_hc32 (ohci, ED_H); ed->hwHeadP &= ~cpu_to_hc32 (ohci, ED_H);
/* put any later tds from this urb onto the donelist, after 'td', /* put any later tds from this urb onto the donelist, after 'td',
* order won't matter here: no errors, and nothing was transferred. * order won't matter here: no errors, and nothing was transferred.
...@@ -833,7 +831,7 @@ ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev) ...@@ -833,7 +831,7 @@ ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev)
info &= ~cpu_to_hc32 (ohci, TD_CC); info &= ~cpu_to_hc32 (ohci, TD_CC);
next->hwINFO = info; next->hwINFO = info;
next->next_dl_td = rev; next->next_dl_td = rev;
rev = next; rev = next;
ed->hwHeadP = next->hwNextTD | toggle; ed->hwHeadP = next->hwNextTD | toggle;
...@@ -881,8 +879,8 @@ static struct td *dl_reverse_done_list (struct ohci_hcd *ohci) ...@@ -881,8 +879,8 @@ static struct td *dl_reverse_done_list (struct ohci_hcd *ohci)
/* get TD from hc's singly linked list, and /* get TD from hc's singly linked list, and
* prepend to ours. ed->td_list changes later. * prepend to ours. ed->td_list changes later.
*/ */
while (td_dma) { while (td_dma) {
int cc; int cc;
td = dma_to_td (ohci, td_dma); td = dma_to_td (ohci, td_dma);
if (!td) { if (!td) {
...@@ -901,10 +899,10 @@ static struct td *dl_reverse_done_list (struct ohci_hcd *ohci) ...@@ -901,10 +899,10 @@ static struct td *dl_reverse_done_list (struct ohci_hcd *ohci)
&& (td->ed->hwHeadP & cpu_to_hc32 (ohci, ED_H))) && (td->ed->hwHeadP & cpu_to_hc32 (ohci, ED_H)))
td_rev = ed_halted (ohci, td, cc, td_rev); td_rev = ed_halted (ohci, td, cc, td_rev);
td->next_dl_td = td_rev; td->next_dl_td = td_rev;
td_rev = td; td_rev = td;
td_dma = hc32_to_cpup (ohci, &td->hwNextTD); td_dma = hc32_to_cpup (ohci, &td->hwNextTD);
} }
return td_rev; return td_rev;
} }
...@@ -1013,9 +1011,9 @@ rescan_this: ...@@ -1013,9 +1011,9 @@ rescan_this:
if (modified) if (modified)
goto rescan_all; goto rescan_all;
} }
/* maybe reenable control and bulk lists */ /* maybe reenable control and bulk lists */
if (HC_IS_RUNNING(ohci_to_hcd(ohci)->state) if (HC_IS_RUNNING(ohci_to_hcd(ohci)->state)
&& ohci_to_hcd(ohci)->state != HC_STATE_QUIESCING && ohci_to_hcd(ohci)->state != HC_STATE_QUIESCING
&& !ohci->ed_rm_list) { && !ohci->ed_rm_list) {
...@@ -1041,20 +1039,20 @@ rescan_this: ...@@ -1041,20 +1039,20 @@ rescan_this:
&ohci->regs->ed_bulkcurrent); &ohci->regs->ed_bulkcurrent);
} }
} }
/* CLE/BLE to enable, CLF/BLF to (maybe) kickstart */ /* CLE/BLE to enable, CLF/BLF to (maybe) kickstart */
if (control) { if (control) {
ohci->hc_control |= control; ohci->hc_control |= control;
if (ohci->flags & OHCI_QUIRK_ZFMICRO) if (ohci->flags & OHCI_QUIRK_ZFMICRO)
mdelay(1); mdelay(1);
ohci_writel (ohci, ohci->hc_control, ohci_writel (ohci, ohci->hc_control,
&ohci->regs->control); &ohci->regs->control);
} }
if (command) { if (command) {
if (ohci->flags & OHCI_QUIRK_ZFMICRO) if (ohci->flags & OHCI_QUIRK_ZFMICRO)
mdelay(1); mdelay(1);
ohci_writel (ohci, command, &ohci->regs->cmdstatus); ohci_writel (ohci, command, &ohci->regs->cmdstatus);
} }
} }
} }
...@@ -1074,19 +1072,19 @@ dl_done_list (struct ohci_hcd *ohci) ...@@ -1074,19 +1072,19 @@ dl_done_list (struct ohci_hcd *ohci)
{ {
struct td *td = dl_reverse_done_list (ohci); struct td *td = dl_reverse_done_list (ohci);
while (td) { while (td) {
struct td *td_next = td->next_dl_td; struct td *td_next = td->next_dl_td;
struct urb *urb = td->urb; struct urb *urb = td->urb;
urb_priv_t *urb_priv = urb->hcpriv; urb_priv_t *urb_priv = urb->hcpriv;
struct ed *ed = td->ed; struct ed *ed = td->ed;
/* update URB's length and status from TD */ /* update URB's length and status from TD */
td_done (ohci, urb, td); td_done (ohci, urb, td);
urb_priv->td_cnt++; urb_priv->td_cnt++;
/* If all this urb's TDs are done, call complete() */ /* If all this urb's TDs are done, call complete() */
if (urb_priv->td_cnt == urb_priv->length) if (urb_priv->td_cnt == urb_priv->length)
finish_urb (ohci, urb); finish_urb (ohci, urb);
/* clean schedule: unlink EDs that are no longer busy */ /* clean schedule: unlink EDs that are no longer busy */
if (list_empty (&ed->td_list)) { if (list_empty (&ed->td_list)) {
...@@ -1094,25 +1092,26 @@ dl_done_list (struct ohci_hcd *ohci) ...@@ -1094,25 +1092,26 @@ dl_done_list (struct ohci_hcd *ohci)
start_ed_unlink (ohci, ed); start_ed_unlink (ohci, ed);
/* ... reenabling halted EDs only after fault cleanup */ /* ... reenabling halted EDs only after fault cleanup */
} else if ((ed->hwINFO & cpu_to_hc32 (ohci, ED_SKIP | ED_DEQUEUE)) } else if ((ed->hwINFO & cpu_to_hc32 (ohci,
ED_SKIP | ED_DEQUEUE))
== cpu_to_hc32 (ohci, ED_SKIP)) { == cpu_to_hc32 (ohci, ED_SKIP)) {
td = list_entry (ed->td_list.next, struct td, td_list); td = list_entry (ed->td_list.next, struct td, td_list);
if (!(td->hwINFO & cpu_to_hc32 (ohci, TD_DONE))) { if (!(td->hwINFO & cpu_to_hc32 (ohci, TD_DONE))) {
ed->hwINFO &= ~cpu_to_hc32 (ohci, ED_SKIP); ed->hwINFO &= ~cpu_to_hc32 (ohci, ED_SKIP);
/* ... hc may need waking-up */ /* ... hc may need waking-up */
switch (ed->type) { switch (ed->type) {
case PIPE_CONTROL: case PIPE_CONTROL:
ohci_writel (ohci, OHCI_CLF, ohci_writel (ohci, OHCI_CLF,
&ohci->regs->cmdstatus); &ohci->regs->cmdstatus);
break; break;
case PIPE_BULK: case PIPE_BULK:
ohci_writel (ohci, OHCI_BLF, ohci_writel (ohci, OHCI_BLF,
&ohci->regs->cmdstatus); &ohci->regs->cmdstatus);
break; break;
} }
} }
} }
td = td_next; td = td_next;
} }
} }
...@@ -447,7 +447,7 @@ static const struct hc_driver ohci_s3c2410_hc_driver = { ...@@ -447,7 +447,7 @@ static const struct hc_driver ohci_s3c2410_hc_driver = {
*/ */
.start = ohci_s3c2410_start, .start = ohci_s3c2410_start,
.stop = ohci_stop, .stop = ohci_stop,
.shutdown = ohci_shutdown, .shutdown = ohci_shutdown,
/* /*
* managing i/o requests and associated device resources * managing i/o requests and associated device resources
...@@ -492,7 +492,7 @@ static int ohci_hcd_s3c2410_drv_remove(struct platform_device *pdev) ...@@ -492,7 +492,7 @@ static int ohci_hcd_s3c2410_drv_remove(struct platform_device *pdev)
static struct platform_driver ohci_hcd_s3c2410_driver = { static struct platform_driver ohci_hcd_s3c2410_driver = {
.probe = ohci_hcd_s3c2410_drv_probe, .probe = ohci_hcd_s3c2410_drv_probe,
.remove = ohci_hcd_s3c2410_drv_remove, .remove = ohci_hcd_s3c2410_drv_remove,
.shutdown = usb_hcd_platform_shutdown, .shutdown = usb_hcd_platform_shutdown,
/*.suspend = ohci_hcd_s3c2410_drv_suspend, */ /*.suspend = ohci_hcd_s3c2410_drv_suspend, */
/*.resume = ohci_hcd_s3c2410_drv_resume, */ /*.resume = ohci_hcd_s3c2410_drv_resume, */
.driver = { .driver = {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at> * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
* (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net> * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
* (C) Copyright 2002 Hewlett-Packard Company * (C) Copyright 2002 Hewlett-Packard Company
* *
* SA1111 Bus Glue * SA1111 Bus Glue
* *
* Written by Christopher Hoover <ch@hpl.hp.com> * Written by Christopher Hoover <ch@hpl.hp.com>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* *
* This file is licenced under the GPL. * This file is licenced under the GPL.
*/ */
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/arch/assabet.h> #include <asm/arch/assabet.h>
...@@ -31,7 +31,7 @@ static void sa1111_start_hc(struct sa1111_dev *dev) ...@@ -31,7 +31,7 @@ static void sa1111_start_hc(struct sa1111_dev *dev)
{ {
unsigned int usb_rst = 0; unsigned int usb_rst = 0;
printk(KERN_DEBUG __FILE__ printk(KERN_DEBUG __FILE__
": starting SA-1111 OHCI USB Controller\n"); ": starting SA-1111 OHCI USB Controller\n");
#ifdef CONFIG_SA1100_BADGE4 #ifdef CONFIG_SA1100_BADGE4
...@@ -65,7 +65,7 @@ static void sa1111_start_hc(struct sa1111_dev *dev) ...@@ -65,7 +65,7 @@ static void sa1111_start_hc(struct sa1111_dev *dev)
static void sa1111_stop_hc(struct sa1111_dev *dev) static void sa1111_stop_hc(struct sa1111_dev *dev)
{ {
unsigned int usb_rst; unsigned int usb_rst;
printk(KERN_DEBUG __FILE__ printk(KERN_DEBUG __FILE__
": stopping SA-1111 OHCI USB Controller\n"); ": stopping SA-1111 OHCI USB Controller\n");
/* /*
......
/* /*
* OHCI HCD (Host Controller Driver) for USB. * OHCI HCD (Host Controller Driver) for USB.
* *
* (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at> * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
* (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net> * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
* *
* This file is licenced under the GPL. * This file is licenced under the GPL.
*/ */
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
typedef __u32 __bitwise __hc32; typedef __u32 __bitwise __hc32;
typedef __u16 __bitwise __hc16; typedef __u16 __bitwise __hc16;
/* /*
* OHCI Endpoint Descriptor (ED) ... holds TD queue * OHCI Endpoint Descriptor (ED) ... holds TD queue
* See OHCI spec, section 4.2 * See OHCI spec, section 4.2
...@@ -24,7 +24,7 @@ typedef __u16 __bitwise __hc16; ...@@ -24,7 +24,7 @@ typedef __u16 __bitwise __hc16;
*/ */
struct ed { struct ed {
/* first fields are hardware-specified */ /* first fields are hardware-specified */
__hc32 hwINFO; /* endpoint config bitmap */ __hc32 hwINFO; /* endpoint config bitmap */
/* info bits defined by hcd */ /* info bits defined by hcd */
#define ED_DEQUEUE (1 << 27) #define ED_DEQUEUE (1 << 27)
/* info bits defined by the hardware */ /* info bits defined by the hardware */
...@@ -52,11 +52,11 @@ struct ed { ...@@ -52,11 +52,11 @@ struct ed {
* usually: OPER --> UNLINK --> (IDLE | OPER) --> ... * usually: OPER --> UNLINK --> (IDLE | OPER) --> ...
*/ */
u8 state; /* ED_{IDLE,UNLINK,OPER} */ u8 state; /* ED_{IDLE,UNLINK,OPER} */
#define ED_IDLE 0x00 /* NOT linked to HC */ #define ED_IDLE 0x00 /* NOT linked to HC */
#define ED_UNLINK 0x01 /* being unlinked from hc */ #define ED_UNLINK 0x01 /* being unlinked from hc */
#define ED_OPER 0x02 /* IS linked to hc */ #define ED_OPER 0x02 /* IS linked to hc */
u8 type; /* PIPE_{BULK,...} */ u8 type; /* PIPE_{BULK,...} */
/* periodic scheduling params (for intr and iso) */ /* periodic scheduling params (for intr and iso) */
u8 branch; u8 branch;
...@@ -70,7 +70,7 @@ struct ed { ...@@ -70,7 +70,7 @@ struct ed {
#define ED_MASK ((u32)~0x0f) /* strip hw status in low addr bits */ #define ED_MASK ((u32)~0x0f) /* strip hw status in low addr bits */
/* /*
* OHCI Transfer Descriptor (TD) ... one per transfer segment * OHCI Transfer Descriptor (TD) ... one per transfer segment
* See OHCI spec, sections 4.3.1 (general = control/bulk/interrupt) * See OHCI spec, sections 4.3.1 (general = control/bulk/interrupt)
...@@ -107,22 +107,22 @@ struct td { ...@@ -107,22 +107,22 @@ struct td {
/* (no hwINFO #defines yet for iso tds) */ /* (no hwINFO #defines yet for iso tds) */
__hc32 hwCBP; /* Current Buffer Pointer (or 0) */ __hc32 hwCBP; /* Current Buffer Pointer (or 0) */
__hc32 hwNextTD; /* Next TD Pointer */ __hc32 hwNextTD; /* Next TD Pointer */
__hc32 hwBE; /* Memory Buffer End Pointer */ __hc32 hwBE; /* Memory Buffer End Pointer */
/* PSW is only for ISO. Only 1 PSW entry is used, but on /* PSW is only for ISO. Only 1 PSW entry is used, but on
* big-endian PPC hardware that's the second entry. * big-endian PPC hardware that's the second entry.
*/ */
#define MAXPSW 2 #define MAXPSW 2
__hc16 hwPSW [MAXPSW]; __hc16 hwPSW [MAXPSW];
/* rest are purely for the driver's use */ /* rest are purely for the driver's use */
__u8 index; __u8 index;
struct ed *ed; struct ed *ed;
struct td *td_hash; /* dma-->td hashtable */ struct td *td_hash; /* dma-->td hashtable */
struct td *next_dl_td; struct td *next_dl_td;
struct urb *urb; struct urb *urb;
dma_addr_t td_dma; /* addr of this TD */ dma_addr_t td_dma; /* addr of this TD */
dma_addr_t data_dma; /* addr of data it points to */ dma_addr_t data_dma; /* addr of data it points to */
...@@ -152,8 +152,8 @@ struct td { ...@@ -152,8 +152,8 @@ struct td {
#define TD_NOTACCESSED 0x0F #define TD_NOTACCESSED 0x0F
/* map OHCI TD status codes (CC) to errno values */ /* map OHCI TD status codes (CC) to errno values */
static const int cc_to_error [16] = { static const int cc_to_error [16] = {
/* No Error */ 0, /* No Error */ 0,
/* CRC Error */ -EILSEQ, /* CRC Error */ -EILSEQ,
/* Bit Stuff */ -EPROTO, /* Bit Stuff */ -EPROTO,
...@@ -169,7 +169,7 @@ static const int cc_to_error [16] = { ...@@ -169,7 +169,7 @@ static const int cc_to_error [16] = {
/* BufferOver */ -ECOMM, /* BufferOver */ -ECOMM,
/* BuffUnder */ -ENOSR, /* BuffUnder */ -ENOSR,
/* (for HCD) */ -EALREADY, /* (for HCD) */ -EALREADY,
/* (for HCD) */ -EALREADY /* (for HCD) */ -EALREADY
}; };
...@@ -182,7 +182,7 @@ struct ohci_hcca { ...@@ -182,7 +182,7 @@ struct ohci_hcca {
#define NUM_INTS 32 #define NUM_INTS 32
__hc32 int_table [NUM_INTS]; /* periodic schedule */ __hc32 int_table [NUM_INTS]; /* periodic schedule */
/* /*
* OHCI defines u16 frame_no, followed by u16 zero pad. * OHCI defines u16 frame_no, followed by u16 zero pad.
* Since some processors can't do 16 bit bus accesses, * Since some processors can't do 16 bit bus accesses,
* portable access must be a 32 bits wide. * portable access must be a 32 bits wide.
...@@ -262,10 +262,10 @@ struct ohci_regs { ...@@ -262,10 +262,10 @@ struct ohci_regs {
* HcCommandStatus (cmdstatus) register masks * HcCommandStatus (cmdstatus) register masks
*/ */
#define OHCI_HCR (1 << 0) /* host controller reset */ #define OHCI_HCR (1 << 0) /* host controller reset */
#define OHCI_CLF (1 << 1) /* control list filled */ #define OHCI_CLF (1 << 1) /* control list filled */
#define OHCI_BLF (1 << 2) /* bulk list filled */ #define OHCI_BLF (1 << 2) /* bulk list filled */
#define OHCI_OCR (1 << 3) /* ownership change request */ #define OHCI_OCR (1 << 3) /* ownership change request */
#define OHCI_SOC (3 << 16) /* scheduling overrun count */ #define OHCI_SOC (3 << 16) /* scheduling overrun count */
/* /*
* masks used with interrupt registers: * masks used with interrupt registers:
...@@ -285,20 +285,20 @@ struct ohci_regs { ...@@ -285,20 +285,20 @@ struct ohci_regs {
/* OHCI ROOT HUB REGISTER MASKS */ /* OHCI ROOT HUB REGISTER MASKS */
/* roothub.portstatus [i] bits */ /* roothub.portstatus [i] bits */
#define RH_PS_CCS 0x00000001 /* current connect status */ #define RH_PS_CCS 0x00000001 /* current connect status */
#define RH_PS_PES 0x00000002 /* port enable status*/ #define RH_PS_PES 0x00000002 /* port enable status*/
#define RH_PS_PSS 0x00000004 /* port suspend status */ #define RH_PS_PSS 0x00000004 /* port suspend status */
#define RH_PS_POCI 0x00000008 /* port over current indicator */ #define RH_PS_POCI 0x00000008 /* port over current indicator */
#define RH_PS_PRS 0x00000010 /* port reset status */ #define RH_PS_PRS 0x00000010 /* port reset status */
#define RH_PS_PPS 0x00000100 /* port power status */ #define RH_PS_PPS 0x00000100 /* port power status */
#define RH_PS_LSDA 0x00000200 /* low speed device attached */ #define RH_PS_LSDA 0x00000200 /* low speed device attached */
#define RH_PS_CSC 0x00010000 /* connect status change */ #define RH_PS_CSC 0x00010000 /* connect status change */
#define RH_PS_PESC 0x00020000 /* port enable status change */ #define RH_PS_PESC 0x00020000 /* port enable status change */
#define RH_PS_PSSC 0x00040000 /* port suspend status change */ #define RH_PS_PSSC 0x00040000 /* port suspend status change */
#define RH_PS_OCIC 0x00080000 /* over current indicator change */ #define RH_PS_OCIC 0x00080000 /* over current indicator change */
#define RH_PS_PRSC 0x00100000 /* port reset status change */ #define RH_PS_PRSC 0x00100000 /* port reset status change */
/* roothub.status bits */ /* roothub.status bits */
#define RH_HS_LPS 0x00000001 /* local power status */ #define RH_HS_LPS 0x00000001 /* local power status */
...@@ -333,7 +333,7 @@ typedef struct urb_priv { ...@@ -333,7 +333,7 @@ typedef struct urb_priv {
} urb_priv_t; } urb_priv_t;
#define TD_HASH_SIZE 64 /* power'o'two */ #define TD_HASH_SIZE 64 /* power'o'two */
// sizeof (struct td) ~= 64 == 2^6 ... // sizeof (struct td) ~= 64 == 2^6 ...
#define TD_HASH_FUNC(td_dma) ((td_dma ^ (td_dma >> 6)) % TD_HASH_SIZE) #define TD_HASH_FUNC(td_dma) ((td_dma ^ (td_dma >> 6)) % TD_HASH_SIZE)
...@@ -364,11 +364,11 @@ struct ohci_hcd { ...@@ -364,11 +364,11 @@ struct ohci_hcd {
struct ed *ed_bulktail; /* last in bulk list */ struct ed *ed_bulktail; /* last in bulk list */
struct ed *ed_controltail; /* last in ctrl list */ struct ed *ed_controltail; /* last in ctrl list */
struct ed *periodic [NUM_INTS]; /* shadow int_table */ struct ed *periodic [NUM_INTS]; /* shadow int_table */
/* /*
* OTG controllers and transceivers need software interaction; * OTG controllers and transceivers need software interaction;
* other external transceivers should be software-transparent * other external transceivers should be software-transparent
*/ */
struct otg_transceiver *transceiver; struct otg_transceiver *transceiver;
...@@ -385,7 +385,7 @@ struct ohci_hcd { ...@@ -385,7 +385,7 @@ struct ohci_hcd {
*/ */
int num_ports; int num_ports;
int load [NUM_INTS]; int load [NUM_INTS];
u32 hc_control; /* copy of hc control reg */ u32 hc_control; /* copy of hc control reg */
unsigned long next_statechange; /* suspend/resume */ unsigned long next_statechange; /* suspend/resume */
u32 fminterval; /* saved register */ u32 fminterval; /* saved register */
unsigned autostop:1; /* rh auto stopping/stopped */ unsigned autostop:1; /* rh auto stopping/stopped */
...@@ -598,7 +598,7 @@ static inline void disable (struct ohci_hcd *ohci) ...@@ -598,7 +598,7 @@ static inline void disable (struct ohci_hcd *ohci)
} }
#define FI 0x2edf /* 12000 bits per frame (-1) */ #define FI 0x2edf /* 12000 bits per frame (-1) */
#define FSMP(fi) (0x7fff & ((6 * ((fi) - 210)) / 7)) #define FSMP(fi) (0x7fff & ((6 * ((fi) - 210)) / 7))
#define FIT (1 << 31) #define FIT (1 << 31)
#define LSTHRESH 0x628 /* lowspeed bit threshold */ #define LSTHRESH 0x628 /* lowspeed bit threshold */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment