summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/controller/avr32dci.c
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2013-01-30 15:26:04 +0000
committerhselasky <hselasky@FreeBSD.org>2013-01-30 15:26:04 +0000
commit0fbe1630154e5d48b97c66259002053ea2c04768 (patch)
treed05a4f410e0aaa7a44bf2b97f80697614ca4aee5 /sys/dev/usb/controller/avr32dci.c
parent3e5ced1b98dca63d150904313752d2ee1cf72802 (diff)
downloadFreeBSD-src-0fbe1630154e5d48b97c66259002053ea2c04768.zip
FreeBSD-src-0fbe1630154e5d48b97c66259002053ea2c04768.tar.gz
Modify the FreeBSD USB kernel code so that it can be compiled directly
into the FreeBSD boot loader, typically for non-USB aware BIOSes, EFI systems or embedded platforms. This is also useful for out of the system compilation of the FreeBSD USB stack for various purposes. The USB kernel files can now optionally include a global header file which should include all needed definitions required to compile the FreeBSD USB stack. When the global USB header file is included, no other USB header files will be included by default. Add new file containing the USB stack configuration for the FreeBSD loader build. Replace some __FBSDID()'s by /* $FreeBSD$ */ comments. Now all USB files follow the same style. Use cases: - console in loader via USB - loading kernel via USB Discussed with: Hiroki Sato, hrs @ EuroBSDCon
Diffstat (limited to 'sys/dev/usb/controller/avr32dci.c')
-rw-r--r--sys/dev/usb/controller/avr32dci.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/usb/controller/avr32dci.c b/sys/dev/usb/controller/avr32dci.c
index 14b4f64..0828311 100644
--- a/sys/dev/usb/controller/avr32dci.c
+++ b/sys/dev/usb/controller/avr32dci.c
@@ -1,6 +1,4 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+/* $FreeBSD$ */
/*-
* Copyright (c) 2009 Hans Petter Selasky. All rights reserved.
*
@@ -35,7 +33,9 @@ __FBSDID("$FreeBSD$");
* NOTE: When the chip detects BUS-reset it will also reset the
* endpoints, Function-address and more.
*/
-
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
#include <sys/stdint.h>
#include <sys/stddef.h>
#include <sys/param.h>
@@ -71,6 +71,8 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/usb_controller.h>
#include <dev/usb/usb_bus.h>
+#endif /* USB_GLOBAL_INCLUDE_FILE */
+
#include <dev/usb/controller/avr32dci.h>
#define AVR32_BUS2SC(bus) \
OpenPOWER on IntegriCloud