Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PCI: rcar: Fix missing MACCTLR register setting in initialization seq…
…uence The R-Car Gen2/3 manual - available at: https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz/rzg/rzg1m.html#documents "RZ/G Series User's Manual: Hardware" section strictly enforces the MACCTLR initialization value - 39.3.1 - "Initial Setting of PCI Express": "Be sure to write the initial value (= H'80FF 0000) to MACCTLR before enabling PCIETCTLR.CFINIT". To avoid unexpected behavior and to match the SW initialization sequence guidelines, this patch programs the MACCTLR with the correct value. Note that the MACCTLR.SPCHG bit in the MACCTLR register description reports that "Only writing 1 is valid and writing 0 is invalid" but this "invalid" has to be interpreted as a write-ignore aka "ignored", not "prohibited". In Renesas Linux BSP, PM noirq resume function needs to initialize the rcar-pcie register to call the read function of pci_ops from pci framework. As a result, rcar_pcie_config_access() is called by rcar_pcie_read_conf(). Thus, there is PCIe link initialization in rcar_pcie_config_access() during system resume. Reported-by: Eugeniu Rosca <[email protected]> Fixes: c25da47 ("PCI: rcar: Add Renesas R-Car PCIe driver") Fixes: be20bbc ("PCI: rcar: Add the initialization of PCIe link in resume_noirq()") Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Cc: <[email protected]> # v5.2+ (cherry picked from commit 7c7e53e) [hoang vo: update commit log] Signed-off-by: Hoang Vo <[email protected]>
- Loading branch information