From: Simon Glass Date: Mon, 27 Jul 2015 21:47:17 +0000 (-0600) Subject: pci: Add a constant for an invalid interrupt X-Git-Tag: v2015.10-rc2~410^2~37 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5f48d798eb151f50d79b93913b59190a679ee9b5;p=oweals%2Fu-boot.git pci: Add a constant for an invalid interrupt Rather than using 0xff in the code, add a constant. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index df50b48003..645ecd423f 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -269,7 +269,8 @@ int pci_hose_config_device(struct pci_controller *hose, /* Disable interrupt line, if device says it wants to use interrupts */ pci_hose_read_config_byte(hose, dev, PCI_INTERRUPT_PIN, &pin); if (pin != 0) { - pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE, 0xff); + pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE, + PCI_INTERRUPT_LINE_DISABLE); } pci_hose_read_config_dword(hose, dev, PCI_COMMAND, &old_command); diff --git a/include/pci.h b/include/pci.h index dce159f277..628ede0957 100644 --- a/include/pci.h +++ b/include/pci.h @@ -231,6 +231,8 @@ #define PCI_MIN_GNT 0x3e /* 8 bits */ #define PCI_MAX_LAT 0x3f /* 8 bits */ +#define PCI_INTERRUPT_LINE_DISABLE 0xff + /* Header type 1 (PCI-to-PCI bridges) */ #define PCI_PRIMARY_BUS 0x18 /* Primary bus number */ #define PCI_SECONDARY_BUS 0x19 /* Secondary bus number */