Quellcode durchsuchen

[usb] Add basic support for USB devices

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown vor 9 Jahren
Ursprung
Commit
018b13dcec
5 geänderte Dateien mit 2822 neuen und 1 gelöschten Zeilen
  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 Datei anzeigen

@@ -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
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 4
- 1
src/include/ipxe/device.h Datei anzeigen

@@ -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 Datei anzeigen

@@ -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
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


Laden…
Abbrechen
Speichern