diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2010-02-17 23:24:42 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2010-02-17 23:24:42 -0500 |
commit | 7149fc813139cf564a4456815461c18a8b208e89 (patch) | |
tree | b0866113b1380d34b1d9e1d4a1ffd8fc375f289f /src/usb-msc.h | |
parent | 3c160dde75b9920f048d4276026d680d0f582dc9 (diff) | |
download | seabios-7149fc813139cf564a4456815461c18a8b208e89.tar.gz |
Initial support for booting from USB drives.
This patch adds initial support for USB Mass Storage Controllers.
This includes support for bulk transfers on UHCI controllers.
Code to detect a USB MSC device is added, and wrappers for sending
"cdb" block commands over USB are added.
The scsi "inquiry" command is also added.
Diffstat (limited to 'src/usb-msc.h')
-rw-r--r-- | src/usb-msc.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/usb-msc.h b/src/usb-msc.h new file mode 100644 index 00000000..4bad91f3 --- /dev/null +++ b/src/usb-msc.h @@ -0,0 +1,25 @@ +#ifndef __USB_MSC_H +#define __USB_MSC_H + +// usb-msc.c +struct disk_op_s; +int usb_cmd_data(struct disk_op_s *op, void *cdbcmd, u16 blocksize); +struct usb_interface_descriptor; +int usb_msc_init(u32 endp, struct usb_interface_descriptor *iface, int imax); +int process_usb_op(struct disk_op_s *op); +struct drive_s; +void describe_usb(struct drive_s *drive_g); + + +/**************************************************************** + * MSC flags + ****************************************************************/ + +#define US_SC_SCSI 0x06 + +#define US_PR_BULK 0x50 + +#define USB_MSC_TYPE_DISK 0x00 +#define USB_MSC_TYPE_CDROM 0x05 + +#endif // ush-msc.h |