Browse Source

[usb] Add basic support for USB devices

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 years ago
parent
commit
018b13dcec
5 changed files with 2822 additions and 1 deletions
  1. 20
    0
      src/config/config_usb.c
  2. 1648
    0
      src/drivers/bus/usb.c
  3. 4
    1
      src/include/ipxe/device.h
  4. 1
    0
      src/include/ipxe/errfile.h
  5. 1149
    0
      src/include/ipxe/usb.h

+ 20
- 0
src/config/config_usb.c View File

@@ -0,0 +1,20 @@
1
+/*
2
+ * This program is free software; you can redistribute it and/or
3
+ * modify it under the terms of the GNU General Public License as
4
+ * published by the Free Software Foundation; either version 2, or (at
5
+ * your option) any later version.
6
+ */
7
+
8
+FILE_LICENCE ( GPL2_OR_LATER );
9
+
10
+#include <config/general.h>
11
+
12
+/** @file
13
+ *
14
+ * USB configuration options
15
+ *
16
+ */
17
+
18
+/*
19
+ * Drag in USB controllers
20
+ */

+ 1648
- 0
src/drivers/bus/usb.c
File diff suppressed because it is too large
View File


+ 4
- 1
src/include/ipxe/device.h View File

@@ -66,10 +66,13 @@ struct device_description {
66 66
 /** Hyper-V bus type */
67 67
 #define BUS_TYPE_HV 9
68 68
 
69
+/** USB bus type */
70
+#define BUS_TYPE_USB 10
71
+
69 72
 /** A hardware device */
70 73
 struct device {
71 74
 	/** Name */
72
-	char name[16];
75
+	char name[32];
73 76
 	/** Driver name */
74 77
 	const char *driver_name;
75 78
 	/** Device description */

+ 1
- 0
src/include/ipxe/errfile.h View File

@@ -76,6 +76,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
76 76
 #define ERRFILE_pci		     ( ERRFILE_DRIVER | 0x00040000 )
77 77
 #define ERRFILE_linux		     ( ERRFILE_DRIVER | 0x00050000 )
78 78
 #define ERRFILE_pcivpd		     ( ERRFILE_DRIVER | 0x00060000 )
79
+#define ERRFILE_usb		     ( ERRFILE_DRIVER | 0x00070000 )
79 80
 
80 81
 #define ERRFILE_nvs		     ( ERRFILE_DRIVER | 0x00100000 )
81 82
 #define ERRFILE_spi		     ( ERRFILE_DRIVER | 0x00110000 )

+ 1149
- 0
src/include/ipxe/usb.h
File diff suppressed because it is too large
View File


Loading…
Cancel
Save