usb: Hook up USB interrupts to rest of the chipsets
This commit is contained in:
@@ -65,7 +65,11 @@ typedef struct stpc_t {
|
||||
smram_t *smram;
|
||||
usb_t *usb;
|
||||
int ide_slot;
|
||||
int usb_slot;
|
||||
sff8038i_t *bm[2];
|
||||
|
||||
/* Miscellaneous */
|
||||
usb_params_t usb_params;
|
||||
} stpc_t;
|
||||
|
||||
typedef struct stpc_serial_t {
|
||||
@@ -870,6 +874,14 @@ stpc_setup(stpc_t *dev)
|
||||
pci_set_irq_routing(PCI_INTD, PCI_IRQ_DISABLED);
|
||||
}
|
||||
|
||||
static void
|
||||
stpc_usb_raise_interrupt(usb_t* usb, void* priv)
|
||||
{
|
||||
stpc_t *dev = (stpc_t *) priv;
|
||||
|
||||
pci_set_irq(dev->usb_slot, PCI_INTA);
|
||||
}
|
||||
|
||||
static void
|
||||
stpc_close(void *priv)
|
||||
{
|
||||
@@ -895,9 +907,13 @@ stpc_init(const device_t *info)
|
||||
pci_add_card(PCI_ADD_NORTHBRIDGE, stpc_nb_read, stpc_nb_write, dev);
|
||||
dev->ide_slot = pci_add_card(PCI_ADD_SOUTHBRIDGE, stpc_isab_read, stpc_isab_write, dev);
|
||||
if (dev->local == STPC_ATLAS) {
|
||||
dev->usb_params.smi_handle = NULL;
|
||||
dev->usb_params.raise_interrupt = stpc_usb_raise_interrupt;
|
||||
dev->usb_params.parent_priv = dev;
|
||||
|
||||
dev->ide_slot = pci_add_card(PCI_ADD_SOUTHBRIDGE, stpc_ide_read, stpc_ide_write, dev);
|
||||
dev->usb = device_add(&usb_device);
|
||||
pci_add_card(PCI_ADD_SOUTHBRIDGE, stpc_usb_read, stpc_usb_write, dev);
|
||||
dev->usb = device_add_parameters(&usb_device, &dev->usb_params);
|
||||
dev->usb_slot = pci_add_card(PCI_ADD_SOUTHBRIDGE, stpc_usb_read, stpc_usb_write, dev);
|
||||
}
|
||||
|
||||
dev->bm[0] = device_add_inst(&sff8038i_device, 1);
|
||||
|
||||
Reference in New Issue
Block a user