Commit 5f48d798eb151f50d79b93913b59190a679ee9b5
1 parent
f134ed7df1
Exists in
v2017.01-smarct4x
and in
30 other branches
pci: Add a constant for an invalid interrupt
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>
Showing 2 changed files with 4 additions and 1 deletions Side-by-side Diff
drivers/pci/pci.c
... | ... | @@ -269,7 +269,8 @@ |
269 | 269 | /* Disable interrupt line, if device says it wants to use interrupts */ |
270 | 270 | pci_hose_read_config_byte(hose, dev, PCI_INTERRUPT_PIN, &pin); |
271 | 271 | if (pin != 0) { |
272 | - pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE, 0xff); | |
272 | + pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE, | |
273 | + PCI_INTERRUPT_LINE_DISABLE); | |
273 | 274 | } |
274 | 275 | |
275 | 276 | pci_hose_read_config_dword(hose, dev, PCI_COMMAND, &old_command); |
include/pci.h
... | ... | @@ -231,6 +231,8 @@ |
231 | 231 | #define PCI_MIN_GNT 0x3e /* 8 bits */ |
232 | 232 | #define PCI_MAX_LAT 0x3f /* 8 bits */ |
233 | 233 | |
234 | +#define PCI_INTERRUPT_LINE_DISABLE 0xff | |
235 | + | |
234 | 236 | /* Header type 1 (PCI-to-PCI bridges) */ |
235 | 237 | #define PCI_PRIMARY_BUS 0x18 /* Primary bus number */ |
236 | 238 | #define PCI_SECONDARY_BUS 0x19 /* Secondary bus number */ |