Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys/dev/usb Define and use EHCI_PAGE_MASK
details: https://anonhg.NetBSD.org/src/rev/ab8857c5c361
branches: nick-nhusb
changeset: 334106:ab8857c5c361
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Feb 01 08:39:43 2015 +0000
description:
Define and use EHCI_PAGE_MASK
diffstat:
sys/dev/usb/ehcireg.h | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (21 lines):
diff -r 6006d5ea57c4 -r ab8857c5c361 sys/dev/usb/ehcireg.h
--- a/sys/dev/usb/ehcireg.h Sun Feb 01 08:29:46 2015 +0000
+++ b/sys/dev/usb/ehcireg.h Sun Feb 01 08:39:43 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ehcireg.h,v 1.34.14.2 2014/11/30 13:46:00 skrll Exp $ */
+/* $NetBSD: ehcireg.h,v 1.34.14.3 2015/02/01 08:39:43 skrll Exp $ */
/*
* Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
@@ -189,8 +189,9 @@
/* No data structure may cross a page boundary. */
#define EHCI_PAGE_SIZE 0x1000
-#define EHCI_PAGE(x) ((x) &~ 0xfff)
-#define EHCI_PAGE_OFFSET(x) ((x) & 0xfff)
+#define EHCI_PAGE_MASK (EHCI_PAGE_SIZE - 1)
+#define EHCI_PAGE(x) ((x) & ~EHCI_PAGE_MASK)
+#define EHCI_PAGE_OFFSET(x) ((x) & EHCI_PAGE_MASK)
typedef uint32_t ehci_link_t;
#define EHCI_LINK_TERMINATE 0x00000001
Home |
Main Index |
Thread Index |
Old Index