diff options
author | Krzysztof Hałasa <khalasa@piap.pl> | 2014-09-16 06:37:16 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2014-09-25 17:35:01 -0400 |
commit | 367dc4b75f4349d5363bc3ebdc030939db944786 (patch) | |
tree | 22d640b9c8e104bba156f4f7371c92848fd35bc5 | |
parent | defaa4d1dc97320ccc0ea83bc3851443b1c9083a (diff) |
CNS3xxx: Fix PCIe read size limit.
Max_Read_Request_Size is 3 bits wide, not 2 bits.
Also fix the message.
Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | arch/arm/mach-cns3xxx/pcie.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c index fbfe852286e8..45d6bd09e6ef 100644 --- a/arch/arm/mach-cns3xxx/pcie.c +++ b/arch/arm/mach-cns3xxx/pcie.c | |||
@@ -299,12 +299,15 @@ static void __init cns3xxx_pcie_hw_init(struct cns3xxx_pcie *cnspci) | |||
299 | devfn = PCI_DEVFN(0, 0); | 299 | devfn = PCI_DEVFN(0, 0); |
300 | pos = pci_bus_find_capability(&bus, devfn, PCI_CAP_ID_EXP); | 300 | pos = pci_bus_find_capability(&bus, devfn, PCI_CAP_ID_EXP); |
301 | pci_bus_read_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, &dc); | 301 | pci_bus_read_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, &dc); |
302 | dc &= ~(0x3 << 12); /* Clear Device Control Register [14:12] */ | 302 | if (dc & PCI_EXP_DEVCTL_READRQ) { |
303 | pci_bus_write_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, dc); | 303 | dc &= ~PCI_EXP_DEVCTL_READRQ; |
304 | pci_bus_read_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, &dc); | 304 | pci_bus_write_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, dc); |
305 | if (!(dc & (0x3 << 12))) | 305 | pci_bus_read_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, &dc); |
306 | pr_info("PCIe: Set Device Max_Read_Request_Size to 128 byte\n"); | 306 | if (dc & PCI_EXP_DEVCTL_READRQ) |
307 | 307 | pr_warn("PCIe: Unable to set device Max_Read_Request_Size\n"); | |
308 | else | ||
309 | pr_info("PCIe: Max_Read_Request_Size set to 128 bytes\n"); | ||
310 | } | ||
308 | /* Disable PCIe0 Interrupt Mask INTA to INTD */ | 311 | /* Disable PCIe0 Interrupt Mask INTA to INTD */ |
309 | __raw_writel(~0x3FFF, MISC_PCIE_INT_MASK(port)); | 312 | __raw_writel(~0x3FFF, MISC_PCIE_INT_MASK(port)); |
310 | } | 313 | } |