diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-09-30 13:14:31 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-10-13 11:04:03 +0200 |
commit | eff73e281852fe9dc1c028a96a6e12c2373cfdd5 (patch) | |
tree | 07ed79a4719cf291015a02f3f667faa497bffdf4 | |
parent | dfac05be204f5829b15b52fe23d08722e5dc1eac (diff) | |
download | seabios-eff73e281852fe9dc1c028a96a6e12c2373cfdd5.tar.gz |
usb: add boot prio support for mmio host adapters
Add mmio field to usb controller struct, add support for mmio-mapped
usb host adapters to boot order handling.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20200930111433.21533-2-kraxel@redhat.com
-rw-r--r-- | src/boot.c | 10 | ||||
-rw-r--r-- | src/hw/usb.h | 1 |
2 files changed, 10 insertions, 1 deletions
@@ -425,7 +425,15 @@ int bootprio_find_usb(struct usbdevice_s *usbdev, int lun) return -1; // Find usb - for example: /pci@i0cf8/usb@1,2/storage@1/channel@0/disk@0,0 char desc[256], *p; - p = build_pci_path(desc, sizeof(desc), "usb", usbdev->hub->cntl->pci); + + if (usbdev->hub->cntl->pci) + p = build_pci_path(desc, sizeof(desc), "usb", usbdev->hub->cntl->pci); + else if (usbdev->hub->cntl->mmio) + p = desc + snprintf(desc, sizeof(desc), "/*@%016x" + , (u32)usbdev->hub->cntl->mmio); + else + return -1; + p = build_usb_path(p, desc+sizeof(desc)-p, usbdev->hub); snprintf(p, desc+sizeof(desc)-p, "/storage@%x/*@0/*@0,%x" , usb_portmap(usbdev), lun); diff --git a/src/hw/usb.h b/src/hw/usb.h index 2cfb5721..887f2064 100644 --- a/src/hw/usb.h +++ b/src/hw/usb.h @@ -35,6 +35,7 @@ struct usb_s { struct usb_pipe *freelist; struct mutex_s resetlock; struct pci_device *pci; + void *mmio; u8 type; u8 maxaddr; }; |