mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 10:19:26 +00:00
- Fix PCI routing code
This commit is contained in:
parent
5ac0137013
commit
63080dcd94
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/mips/; revision=195474
@ -513,8 +513,11 @@ ar71xx_pci_maxslots(device_t dev)
|
||||
static int
|
||||
ar71xx_pci_route_interrupt(device_t pcib, device_t device, int pin)
|
||||
{
|
||||
if (pci_get_slot(device) < AR71XX_PCI_BASE_SLOT)
|
||||
panic("%s: PCI slot %d is less then AR71XX_PCI_BASE_SLOT",
|
||||
__func__, pci_get_slot(device));
|
||||
|
||||
return (pin);
|
||||
return (pci_get_slot(device) - AR71XX_PCI_BASE_SLOT);
|
||||
}
|
||||
|
||||
static device_method_t ar71xx_pci_methods[] = {
|
||||
|
@ -42,6 +42,10 @@
|
||||
#define AR71XX_PCI_IRQ_START 0
|
||||
#define AR71XX_PCI_IRQ_END 2
|
||||
#define AR71XX_PCI_NIRQS 3
|
||||
/*
|
||||
* PCI devices slots are starting from this number
|
||||
*/
|
||||
#define AR71XX_PCI_BASE_SLOT 17
|
||||
|
||||
/* PCI config registers */
|
||||
#define AR71XX_PCI_LCONF_CMD 0x17010000
|
||||
|
Loading…
Reference in New Issue
Block a user