Skip to content
Snippets Groups Projects
Commit 571f49fa authored by Ed Swarthout's avatar Ed Swarthout Committed by Wolfgang Denk
Browse files

Support PCIe extended config registers


FSL PCIe block has extended cfg registers in the 100 and 400 range.
For example, to read the LTSSM register: pci display <busn>.0 404 1

Signed-off-by: default avatarEd Swarthout <Ed.Swarthout@freescale.com>
parent ba5feb12
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,7 @@ indirect_##rw##_config_##size(struct pci_controller *hose, \ ...@@ -45,7 +45,7 @@ indirect_##rw##_config_##size(struct pci_controller *hose, \
cfg_##rw(val, hose->cfg_data + (offset & mask), type, op); \ cfg_##rw(val, hose->cfg_data + (offset & mask), type, op); \
return 0; \ return 0; \
} }
#elif defined(CONFIG_E500) #elif defined(CONFIG_E500) || defined(CONFIG_MPC86xx)
#define INDIRECT_PCI_OP(rw, size, type, op, mask) \ #define INDIRECT_PCI_OP(rw, size, type, op, mask) \
static int \ static int \
indirect_##rw##_config_##size(struct pci_controller *hose, \ indirect_##rw##_config_##size(struct pci_controller *hose, \
...@@ -55,7 +55,7 @@ indirect_##rw##_config_##size(struct pci_controller *hose, \ ...@@ -55,7 +55,7 @@ indirect_##rw##_config_##size(struct pci_controller *hose, \
b = PCI_BUS(dev); d = PCI_DEV(dev); f = PCI_FUNC(dev); \ b = PCI_BUS(dev); d = PCI_DEV(dev); f = PCI_FUNC(dev); \
b = b - hose->first_busno; \ b = b - hose->first_busno; \
dev = PCI_BDF(b, d, f); \ dev = PCI_BDF(b, d, f); \
*(hose->cfg_addr) = dev | (offset & 0xfc) | 0x80000000; \ *(hose->cfg_addr) = dev | (offset & 0xfc) | ((offset & 0xf00) << 16) | 0x80000000; \
sync(); \ sync(); \
cfg_##rw(val, hose->cfg_data + (offset & mask), type, op); \ cfg_##rw(val, hose->cfg_data + (offset & mask), type, op); \
return 0; \ return 0; \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment