linux-uconsole/drivers/pci
Yoshihiro Shimoda 2de11b2e5d PCI: rcar: Fix missing MACCTLR register setting in initialization sequence
[ Upstream commit 7c7e53e1c9 ]

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 inizialization 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".

Reported-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Fixes: c25da47788 ("PCI: rcar: Add Renesas R-Car PCIe driver")
Fixes: be20bbcb0a ("PCI: rcar: Add the initialization of PCIe link in resume_noirq()")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: <stable@vger.kernel.org> # v5.2+
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-17 20:35:54 +01:00
..
controller PCI: rcar: Fix missing MACCTLR register setting in initialization sequence 2019-12-17 20:35:54 +01:00
endpoint
hotplug ACPI / hotplug / PCI: Allocate resources directly under the non-hotplug bridge 2019-12-17 20:35:04 +01:00
pcie PCI/ERR: Run error recovery callbacks for all affected devices 2019-11-20 18:47:39 +01:00
switch switchtec: Fix unintended mask of MRPC event 2019-06-15 11:54:07 +02:00
access.c
ats.c
bus.c
ecam.c
host-bridge.c
iov.c
irq.c
Kconfig
Makefile
mmap.c
msi.c PCI/MSI: Return -ENOSPC from pci_alloc_irq_vectors_affinity() 2019-12-05 09:21:06 +01:00
of.c
pci-acpi.c ACPI/PCI: PM: Add missing wakeup.flags.valid checks 2019-06-22 08:15:17 +02:00
pci-driver.c PCI: Always allow probing with driver_override 2019-09-19 09:09:37 +02:00
pci-label.c
pci-mid.c x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:17:53 +02:00
pci-pf-stub.c
pci-stub.c
pci-sysfs.c PCI: sysfs: Ignore lockdep for remove attribute 2019-07-31 07:27:02 +02:00
pci.c PCI/ERR: Use slot reset if available 2019-11-20 18:47:13 +01:00
pci.h PCI/ERR: Use slot reset if available 2019-11-20 18:47:13 +01:00
probe.c PCI: Init PCIe feature bits for managed host bridge alloc 2019-05-25 18:23:37 +02:00
proc.c
quirks.c PCI: Fix Switchtec DMA aliasing quirk dmesg noise 2019-11-06 13:05:21 +01:00
remove.c PCI/ASPM: Fix link_state teardown on device removal 2018-11-13 11:08:45 -08:00
rom.c
search.c
setup-bus.c
setup-irq.c
setup-res.c
slot.c PCI/ERR: Use slot reset if available 2019-11-20 18:47:13 +01:00
syscall.c
vc.c
vpd.c
xen-pcifront.c