Skip to content

Commit 018b13d

Browse files
committedFeb 3, 2015
[usb] Add basic support for USB devices
Signed-off-by: Michael Brown <mcb30@ipxe.org>
1 parent 8c43891 commit 018b13d

File tree

5 files changed

+2822
-1
lines changed

5 files changed

+2822
-1
lines changed
 

‎src/config/config_usb.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
*/

‎src/drivers/bus/usb.c

Lines changed: 1648 additions & 0 deletions
Large diffs are not rendered by default.

‎src/include/ipxe/device.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,13 @@ struct device_description {
6666
/** Hyper-V bus type */
6767
#define BUS_TYPE_HV 9
6868

69+
/** USB bus type */
70+
#define BUS_TYPE_USB 10
71+
6972
/** A hardware device */
7073
struct device {
7174
/** Name */
72-
char name[16];
75+
char name[32];
7376
/** Driver name */
7477
const char *driver_name;
7578
/** Device description */

‎src/include/ipxe/errfile.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
7676
#define ERRFILE_pci ( ERRFILE_DRIVER | 0x00040000 )
7777
#define ERRFILE_linux ( ERRFILE_DRIVER | 0x00050000 )
7878
#define ERRFILE_pcivpd ( ERRFILE_DRIVER | 0x00060000 )
79+
#define ERRFILE_usb ( ERRFILE_DRIVER | 0x00070000 )
7980

8081
#define ERRFILE_nvs ( ERRFILE_DRIVER | 0x00100000 )
8182
#define ERRFILE_spi ( ERRFILE_DRIVER | 0x00110000 )

‎src/include/ipxe/usb.h

Lines changed: 1149 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.