Lines Matching +full:big +full:- +full:endian +full:- +full:desc
1 /* SPDX-License-Identifier: GPL-1.0+ */
6 * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
27 /* first fields are hardware-specified */
49 struct ed *ed_prev; /* for non-interrupt EDs */
53 /* create --> IDLE --> OPER --> ... --> IDLE --> destroy
54 * usually: OPER --> UNLINK --> (IDLE | OPER) --> ...
76 ((int) (ohci->wdh_cnt - ed->takeback_wdh_cnt) >= 0)
89 /* first fields are hardware-specified */
124 * big-endian PPC hardware that's the second entry.
132 struct td *td_hash; /* dma-->td hashtable */
145 * Hardware transfer status codes -- CC from td->hwINFO or td->hwPSW
167 /* CRC Error */ -EILSEQ,
168 /* Bit Stuff */ -EPROTO,
169 /* Data Togg */ -EILSEQ,
170 /* Stall */ -EPIPE,
171 /* DevNotResp */ -ETIME,
172 /* PIDCheck */ -EPROTO,
173 /* UnExpPID */ -EPROTO,
174 /* DataOver */ -EOVERFLOW,
175 /* DataUnder */ -EREMOTEIO,
176 /* (for hw) */ -EIO,
177 /* (for hw) */ -EIO,
178 /* BufferOver */ -ECOMM,
179 /* BuffUnder */ -ENOSR,
180 /* (for HCD) */ -EALREADY,
181 /* (for HCD) */ -EALREADY
188 * told the base address of it. It must be 256-byte aligned.
264 /* pre-shifted values for HCFS */
334 /* hcd-private per-urb state */
366 * I/O memory used to communicate with the HC (dma-consistent)
371 * main memory used to communicate with the HC (dma-consistent).
419 #define OHCI_QUIRK_FRAME_NO 0x80 /* no big endian frame_no shift */
422 #define OHCI_QUIRK_AMD_PREFETCH 0x400 /* pre-fetch for ISO transfer */
437 /* platform-specific data -- must come last */
445 return ohci->flags & OHCI_QUIRK_NEC; in quirk_nec()
449 return ohci->flags & OHCI_QUIRK_ZFMICRO; in quirk_zfmicro()
453 return ohci->flags & OHCI_QUIRK_AMD_PLL; in quirk_amdiso()
457 return ohci->flags & OHCI_QUIRK_AMD_PREFETCH; in quirk_amdprefetch()
481 return (struct ohci_hcd *) (hcd->hcd_priv); in hcd_to_ohci()
488 /*-------------------------------------------------------------------------*/
491 dev_dbg (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
493 dev_err (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
495 dev_info (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
497 dev_warn (ohci_to_hcd(ohci)->self.controller , fmt , ## args )
499 /*-------------------------------------------------------------------------*/
503 * in-memory communication descriptors in little-endian format,
505 * processors) implement them in big endian format.
508 * Spider (aka SCC) cell southbridge are "mixed" endian, that is,
509 * they have a different endianness for registers vs. in-memory
521 * --------------- ----------------------
522 * little endian CONFIG_USB_OHCI_LITTLE_ENDIAN
524 * fully big endian CONFIG_USB_OHCI_BIG_ENDIAN_DESC _and_
527 * mixed endian CONFIG_USB_OHCI_LITTLE_ENDIAN _and_
528 * CONFIG_USB_OHCI_BIG_ENDIAN_{MMIO,DESC}
530 * (If you have a mixed endian controller, you -must- also define
532 * both your mixed endian and a fully big endian controller support in
538 #define big_endian_desc(ohci) (ohci->flags & OHCI_QUIRK_BE_DESC)
540 #define big_endian_desc(ohci) 1 /* only big endian */
543 #define big_endian_desc(ohci) 0 /* only little endian */
548 #define big_endian_mmio(ohci) (ohci->flags & OHCI_QUIRK_BE_MMIO)
550 #define big_endian_mmio(ohci) 1 /* only big endian */
553 #define big_endian_mmio(ohci) 0 /* only little endian */
557 * Big-endian read/write functions are arch-specific.
589 /*-------------------------------------------------------------------------*/
649 /*-------------------------------------------------------------------------*/
655 * [15:0] (OHCI_QUIRK_FRAME_NO) on big endian hosts.
657 * Somewhat similarly, the 16-bit PSW fields in a transfer descriptor are
665 tmp = be32_to_cpup((__force __be32 *)&ohci->hcca->frame_no); in ohci_frame_no()
666 if (!(ohci->flags & OHCI_QUIRK_FRAME_NO)) in ohci_frame_no()
669 tmp = le32_to_cpup((__force __le32 *)&ohci->hcca->frame_no); in ohci_frame_no()
678 &td->hwPSW[index ^ 1] : &td->hwPSW[index]); in ohci_hwPSWp()
687 /*-------------------------------------------------------------------------*/
689 #define FI 0x2edf /* 12000 bits per frame (-1) */
690 #define FSMP(fi) (0x7fff & ((6 * ((fi) - 210)) / 7))
696 u32 fi = ohci->fminterval & 0x03fff; in periodic_reinit()
697 u32 fit = ohci_readl(ohci, &ohci->regs->fminterval) & FIT; in periodic_reinit()
699 ohci_writel (ohci, (fit ^ FIT) | ohci->fminterval, in periodic_reinit()
700 &ohci->regs->fminterval); in periodic_reinit()
702 &ohci->regs->periodicstart); in periodic_reinit()
705 /* AMD-756 (D2 rev) reports corrupt register contents in some cases.
710 u32 temp = ohci_readl (hc, &hc->regs->roothub.register); \
711 if (temp == -1) \
712 hc->rh_state = OHCI_RH_HALTED; \
713 else if (hc->flags & OHCI_QUIRK_AMD756) \
715 temp = ohci_readl (hc, &hc->regs->roothub.register); \
721 { return ohci_readl (hc, &hc->regs->roothub.b); } in roothub_b()
723 { return ohci_readl (hc, &hc->regs->roothub.status); } in roothub_status()