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 = {
......
This diff is collapsed.
...@@ -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