mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
- Convert a wrong macro to an inlined function.
svn path=/trunk/; revision=42824
This commit is contained in:
parent
a6407bcf60
commit
f6df5d0f26
1 changed files with 14 additions and 10 deletions
|
@ -72,24 +72,28 @@ extern USB_DEV_MANAGER g_dev_mgr;
|
|||
* The erratum (#4) description is incorrect. AMD's workaround waits
|
||||
* till some bits (mostly reserved) are clear; ok for all revs.
|
||||
*/
|
||||
#define read_roothub(hc, register, mask) ({ \
|
||||
ULONG temp = OHCI_READ_PORT_ULONG(&((hc)->regs->roothub.register)); \
|
||||
if (temp == -1) \
|
||||
/*disable (hc)*/; \
|
||||
/*else if (hc->flags & OHCI_QUIRK_AMD756) \
|
||||
while (temp & mask) \
|
||||
temp = ohci_readl (hc, &hc->regs->roothub.register); */ \
|
||||
temp; })
|
||||
ULONG
|
||||
FORCEINLINE
|
||||
read_roothub(POHCI_DEV hc, PULONG reg, ULONG mask)
|
||||
{
|
||||
ULONG temp = OHCI_READ_PORT_ULONG(reg);
|
||||
if (temp == -1)
|
||||
/*disable (hc)*/;
|
||||
/*else if (hc->flags & OHCI_QUIRK_AMD756)
|
||||
while (temp & mask)
|
||||
temp = ohci_readl (hc, &hc->regs->roothub.register); */
|
||||
return temp;
|
||||
}
|
||||
|
||||
static ULONG roothub_a (POHCI_DEV hc)
|
||||
{ return read_roothub (hc, a, 0xfc0fe000); }
|
||||
{ return read_roothub (hc, &hc->regs->roothub.a, 0xfc0fe000); }
|
||||
/*
|
||||
static inline u32 roothub_b (struct ohci_hcd *hc)
|
||||
{ return ohci_readl (hc, &hc->regs->roothub.b); }
|
||||
static inline u32 roothub_status (struct ohci_hcd *hc)
|
||||
{ return ohci_readl (hc, &hc->regs->roothub.status); }
|
||||
static u32 roothub_portstatus (struct ohci_hcd *hc, int i)
|
||||
{ return read_roothub (hc, portstatus [i], 0xffe0fce0); }
|
||||
{ return read_roothub (hc, &hc->regs->roothub.portstatus [i], 0xffe0fce0); }
|
||||
*/
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue