]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
pci: Add a constant for an invalid interrupt
authorSimon Glass <sjg@chromium.org>
Mon, 27 Jul 2015 21:47:17 +0000 (15:47 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:00:53 +0000 (08:00 +0200)
Rather than using 0xff in the code, add a constant.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/pci/pci.c
include/pci.h

index df50b480035f4bf14c62b81422f3f532957f19a7..645ecd423f8fa72a62cb0412b1f8c0cbe301c7cf 100644 (file)
@@ -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);
index dce159f27760eddbf116ba12e8e423e1ab1a8a40..628ede0957b12c1c606e0fefc593b74cae230d86 100644 (file)
 #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 */