Deleted Added
sdiff udiff text old ( 196219 ) new ( 198151 )
full compact
1/* $FreeBSD: head/sys/dev/usb/controller/uhci.h 198151 2009-10-15 20:07:08Z thompsa $ */
2/*-
3 * Copyright (c) 1998 The NetBSD Foundation, Inc.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to The NetBSD Foundation
7 * by Lennart Augustsson (lennart@augustsson.net) at
8 * Carlstedt Research & Technology.
9 *

--- 26 unchanged lines hidden (view full) ---

36 * POSSIBILITY OF SUCH DAMAGE.
37 */
38
39#ifndef _UHCI_H_
40#define _UHCI_H_
41
42#define UHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128)
43
44#define UHCI_FRAMELIST_COUNT 1024 /* units */
45#define UHCI_FRAMELIST_ALIGN 4096 /* bytes */
46
47/* Structures alignment (bytes) */
48#define UHCI_TD_ALIGN 16
49#define UHCI_QH_ALIGN 16
50
51#if ((USB_PAGE_SIZE < UHCI_TD_ALIGN) || (UHCI_TD_ALIGN == 0) || \
52 (USB_PAGE_SIZE < UHCI_QH_ALIGN) || (UHCI_QH_ALIGN == 0))
53#error "Invalid USB page size!"
54#endif
55
56typedef uint32_t uhci_physaddr_t;
57
58#define UHCI_PTR_T 0x00000001
59#define UHCI_PTR_TD 0x00000000
60#define UHCI_PTR_QH 0x00000002
61#define UHCI_PTR_VF 0x00000004
62
63/*
64 * The Queue Heads (QH) and Transfer Descriptors (TD) are accessed by
65 * both the CPU and the USB-controller which run concurrently. Great
66 * care must be taken. When the data-structures are linked into the
67 * USB controller's frame list, the USB-controller "owns" the
68 * td_status and qh_elink fields, which will not be written by the
69 * CPU.
70 *

--- 190 unchanged lines hidden ---