Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
65815c0b
Commit
65815c0b
authored
May 18, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: remove ehci and ohci's private sleep function and use msleep() instead.
parent
ad72bf4f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
21 deletions
+9
-21
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-hcd.c
+2
-2
drivers/usb/host/ehci.h
drivers/usb/host/ehci.h
+0
-6
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-hcd.c
+2
-2
drivers/usb/host/ohci-hub.c
drivers/usb/host/ohci-hub.c
+2
-2
drivers/usb/host/ohci-pci.c
drivers/usb/host/ohci-pci.c
+3
-3
drivers/usb/host/ohci.h
drivers/usb/host/ohci.h
+0
-6
No files found.
drivers/usb/host/ehci-hcd.c
View file @
65815c0b
...
...
@@ -632,7 +632,7 @@ static int ehci_suspend (struct usb_hcd *hcd, u32 state)
struct
ehci_hcd
*
ehci
=
hcd_to_ehci
(
hcd
);
while
(
time_before
(
jiffies
,
ehci
->
next_statechange
))
ms
ec_delay
(
100
);
ms
leep
(
100
);
#ifdef CONFIG_USB_SUSPEND
(
void
)
usb_suspend_device
(
hcd
->
self
.
root_hub
);
...
...
@@ -654,7 +654,7 @@ static int ehci_resume (struct usb_hcd *hcd)
// maybe restore (PCI) FLADJ
while
(
time_before
(
jiffies
,
ehci
->
next_statechange
))
ms
ec_delay
(
100
);
ms
leep
(
100
);
#ifdef CONFIG_USB_SUSPEND
retval
=
usb_resume_device
(
hcd
->
self
.
root_hub
);
...
...
drivers/usb/host/ehci.h
View file @
65815c0b
...
...
@@ -596,12 +596,6 @@ ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc)
/*-------------------------------------------------------------------------*/
static
inline
void
msec_delay
(
unsigned
msec
)
{
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
msecs_to_jiffies
(
msec
));
}
#ifndef DEBUG
#define STUB_DEBUG_FILES
#endif
/* DEBUG */
...
...
drivers/usb/host/ohci-hcd.c
View file @
65815c0b
...
...
@@ -417,7 +417,7 @@ static int hc_reset (struct ohci_hcd *ohci)
writel
(
OHCI_INTR_OC
,
&
ohci
->
regs
->
intrenable
);
writel
(
OHCI_OCR
,
&
ohci
->
regs
->
cmdstatus
);
while
(
readl
(
&
ohci
->
regs
->
control
)
&
OHCI_CTRL_IR
)
{
ms
ec_delay
(
10
);
ms
leep
(
10
);
if
(
--
temp
==
0
)
{
ohci_err
(
ohci
,
"USB HC TakeOver failed!
\n
"
);
return
-
1
;
...
...
@@ -451,7 +451,7 @@ static int hc_reset (struct ohci_hcd *ohci)
}
// flush those pci writes
(
void
)
readl
(
&
ohci
->
regs
->
control
);
ms
ec_delay
(
50
);
ms
leep
(
50
);
/* HC Reset requires max 10 us delay */
writel
(
OHCI_HCR
,
&
ohci
->
regs
->
cmdstatus
);
...
...
drivers/usb/host/ohci-hub.c
View file @
65815c0b
...
...
@@ -248,7 +248,7 @@ static int ohci_hub_resume (struct usb_hcd *hcd)
/* Then re-enable operations */
writel
(
OHCI_USB_OPER
,
&
ohci
->
regs
->
control
);
(
void
)
readl
(
&
ohci
->
regs
->
control
);
ms
ec_delay
(
3
);
ms
leep
(
3
);
temp
=
OHCI_CONTROL_INIT
|
OHCI_USB_OPER
;
if
(
ohci
->
hcd
.
can_wakeup
)
...
...
@@ -258,7 +258,7 @@ static int ohci_hub_resume (struct usb_hcd *hcd)
(
void
)
readl
(
&
ohci
->
regs
->
control
);
/* TRSMRCY */
ms
ec_delay
(
10
);
ms
leep
(
10
);
root
->
dev
.
power
.
power_state
=
0
;
/* keep it alive for ~5x suspend + resume costs */
...
...
drivers/usb/host/ohci-pci.c
View file @
65815c0b
...
...
@@ -122,7 +122,7 @@ static int ohci_pci_suspend (struct usb_hcd *hcd, u32 state)
/* suspend root hub, hoping it keeps power during suspend */
while
(
time_before
(
jiffies
,
ohci
->
next_statechange
))
ms
ec_delay
(
100
);
ms
leep
(
100
);
#ifdef CONFIG_USB_SUSPEND
(
void
)
usb_suspend_device
(
hcd
->
self
.
root_hub
);
...
...
@@ -133,7 +133,7 @@ static int ohci_pci_suspend (struct usb_hcd *hcd, u32 state)
#endif
/* let things settle down a bit */
ms
ec_delay
(
100
);
ms
leep
(
100
);
#ifdef CONFIG_PMAC_PBOOK
if
(
_machine
==
_MACH_Pmac
)
...
...
@@ -170,7 +170,7 @@ static int ohci_pci_resume (struct usb_hcd *hcd)
/* resume root hub */
while
(
time_before
(
jiffies
,
ohci
->
next_statechange
))
ms
ec_delay
(
100
);
ms
leep
(
100
);
#ifdef CONFIG_USB_SUSPEND
/* get extra cleanup even if remote wakeup isn't in use */
retval
=
usb_resume_device
(
hcd
->
self
.
root_hub
);
...
...
drivers/usb/host/ohci.h
View file @
65815c0b
...
...
@@ -397,12 +397,6 @@ static inline void disable (struct ohci_hcd *ohci)
ohci
->
hcd
.
state
=
USB_STATE_HALT
;
}
static
inline
void
msec_delay
(
unsigned
msec
)
{
set_current_state
(
TASK_UNINTERRUPTIBLE
);
schedule_timeout
(
msecs_to_jiffies
(
msec
));
}
#define FI 0x2edf
/* 12000 bits per frame (-1) */
#define DEFAULT_FMINTERVAL ((((6 * (FI - 210)) / 7) << 16) | FI)
#define LSTHRESH 0x628
/* lowspeed bit threshold */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment