[build] Canonicalise USB configuration

Move all USB configuration from config/defaults/<platform>.h to the
top-level config/usb.h, using indented conditional blocks to clarify
which options are supported and enabled on each platform.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2026-01-16 16:08:20 +00:00
parent 6ad6af198e
commit ce6f574a9f
3 changed files with 13 additions and 31 deletions

View File

@@ -30,12 +30,6 @@ FILE_SECBOOT ( PERMITTED );
#define NAP_EFI #define NAP_EFI
#define SERIAL_SPCR #define SERIAL_SPCR
#define USB_HCD_XHCI /* xHCI USB host controller */
#define USB_HCD_EHCI /* EHCI USB host controller */
#define USB_HCD_UHCI /* UHCI USB host controller */
#define USB_EFI /* Provide EFI_USB_IO_PROTOCOL interface */
#define USB_BLOCK /* USB block devices */
#if defined ( __i386__ ) || defined ( __x86_64__ ) #if defined ( __i386__ ) || defined ( __x86_64__ )
#define IOAPI_X86 #define IOAPI_X86
#define ENTROPY_RDRAND #define ENTROPY_RDRAND

View File

@@ -35,10 +35,4 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define IOMAP_VIRT #define IOMAP_VIRT
#endif #endif
#define USB_HCD_XHCI /* xHCI USB host controller */
#define USB_HCD_EHCI /* EHCI USB host controller */
#define USB_HCD_UHCI /* UHCI USB host controller */
#define USB_KEYBOARD /* USB keyboards */
#define USB_BLOCK /* USB block devices */
#endif /* CONFIG_DEFAULTS_PCBIOS_H */ #endif /* CONFIG_DEFAULTS_PCBIOS_H */

View File

@@ -12,27 +12,21 @@ FILE_SECBOOT ( PERMITTED );
#include <config/defaults.h> #include <config/defaults.h>
/* /* USB host controllers */
* USB host controllers (all enabled by default) #define USB_HCD_EHCI /* EHCI USB host controller */
* #define USB_HCD_UHCI /* UHCI USB host controller */
*/ #define USB_HCD_XHCI /* xHCI USB host controller */
//#undef USB_HCD_XHCI /* xHCI USB host controller */
//#undef USB_HCD_EHCI /* EHCI USB host controller */
//#undef USB_HCD_UHCI /* UHCI USB host controller */
//#define USB_HCD_USBIO /* Very slow EFI USB host controller */
/* /* USB peripherals */
* USB peripherals #define USB_BLOCK /* USB block devices */
* #define USB_KEYBOARD /* USB keyboards */
*/
//#undef USB_KEYBOARD /* USB keyboards */
//#undef USB_BLOCK /* USB block devices */
/* /* USB quirks on EFI platforms */
* USB external interfaces #if defined ( PLATFORM_efi )
* #define USB_EFI /* Provide EFI_USB_IO_PROTOCOL interface */
*/ //#define USB_HCD_USBIO /* Very slow EFI USB pseudo-host controller */
//#undef USB_EFI /* Provide EFI_USB_IO_PROTOCOL interface */ #undef USB_KEYBOARD /* Use built-in EFI keyboard driver */
#endif
#include <config/named.h> #include <config/named.h>
#include NAMED_CONFIG(usb.h) #include NAMED_CONFIG(usb.h)