diff options
-rw-r--r-- | drivers/pci/host/pcie-rcar.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c index 027876a1fc3f..ab0ab0d8253c 100644 --- a/drivers/pci/host/pcie-rcar.c +++ b/drivers/pci/host/pcie-rcar.c | |||
@@ -481,14 +481,15 @@ static int rcar_pcie_hw_init(struct rcar_pcie *pcie) | |||
481 | rcar_rmw32(pcie, RCONF(PCI_SUBORDINATE_BUS), 0xff, 1); | 481 | rcar_rmw32(pcie, RCONF(PCI_SUBORDINATE_BUS), 0xff, 1); |
482 | 482 | ||
483 | /* Initialize default capabilities. */ | 483 | /* Initialize default capabilities. */ |
484 | rcar_rmw32(pcie, REXPCAP(0), 0, PCI_CAP_ID_EXP); | 484 | rcar_rmw32(pcie, REXPCAP(0), 0xff, PCI_CAP_ID_EXP); |
485 | rcar_rmw32(pcie, REXPCAP(PCI_EXP_FLAGS), | 485 | rcar_rmw32(pcie, REXPCAP(PCI_EXP_FLAGS), |
486 | PCI_EXP_FLAGS_TYPE, PCI_EXP_TYPE_ROOT_PORT << 4); | 486 | PCI_EXP_FLAGS_TYPE, PCI_EXP_TYPE_ROOT_PORT << 4); |
487 | rcar_rmw32(pcie, RCONF(PCI_HEADER_TYPE), 0x7f, | 487 | rcar_rmw32(pcie, RCONF(PCI_HEADER_TYPE), 0x7f, |
488 | PCI_HEADER_TYPE_BRIDGE); | 488 | PCI_HEADER_TYPE_BRIDGE); |
489 | 489 | ||
490 | /* Enable data link layer active state reporting */ | 490 | /* Enable data link layer active state reporting */ |
491 | rcar_rmw32(pcie, REXPCAP(PCI_EXP_LNKCAP), 0, PCI_EXP_LNKCAP_DLLLARC); | 491 | rcar_rmw32(pcie, REXPCAP(PCI_EXP_LNKCAP), PCI_EXP_LNKCAP_DLLLARC, |
492 | PCI_EXP_LNKCAP_DLLLARC); | ||
492 | 493 | ||
493 | /* Write out the physical slot number = 0 */ | 494 | /* Write out the physical slot number = 0 */ |
494 | rcar_rmw32(pcie, REXPCAP(PCI_EXP_SLTCAP), PCI_EXP_SLTCAP_PSN, 0); | 495 | rcar_rmw32(pcie, REXPCAP(PCI_EXP_SLTCAP), PCI_EXP_SLTCAP_PSN, 0); |
@@ -497,10 +498,7 @@ static int rcar_pcie_hw_init(struct rcar_pcie *pcie) | |||
497 | rcar_rmw32(pcie, TLCTLR+1, 0x3f, 50); | 498 | rcar_rmw32(pcie, TLCTLR+1, 0x3f, 50); |
498 | 499 | ||
499 | /* Terminate list of capabilities (Next Capability Offset=0) */ | 500 | /* Terminate list of capabilities (Next Capability Offset=0) */ |
500 | rcar_rmw32(pcie, RVCCAP(0), 0xfff0, 0); | 501 | rcar_rmw32(pcie, RVCCAP(0), 0xfff00000, 0); |
501 | |||
502 | /* Enable MAC data scrambling. */ | ||
503 | rcar_rmw32(pcie, MACCTLR, SCRAMBLE_DISABLE, 0); | ||
504 | 502 | ||
505 | /* Enable MSI */ | 503 | /* Enable MSI */ |
506 | if (IS_ENABLED(CONFIG_PCI_MSI)) | 504 | if (IS_ENABLED(CONFIG_PCI_MSI)) |
@@ -517,11 +515,6 @@ static int rcar_pcie_hw_init(struct rcar_pcie *pcie) | |||
517 | /* Enable INTx interrupts */ | 515 | /* Enable INTx interrupts */ |
518 | rcar_rmw32(pcie, PCIEINTXR, 0, 0xF << 8); | 516 | rcar_rmw32(pcie, PCIEINTXR, 0, 0xF << 8); |
519 | 517 | ||
520 | /* Enable slave Bus Mastering */ | ||
521 | rcar_rmw32(pcie, RCONF(PCI_STATUS), PCI_STATUS_DEVSEL_MASK, | ||
522 | PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | | ||
523 | PCI_STATUS_CAP_LIST | PCI_STATUS_DEVSEL_FAST); | ||
524 | |||
525 | wmb(); | 518 | wmb(); |
526 | 519 | ||
527 | return 0; | 520 | return 0; |