]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: aardvark: Fix configuring Reference clock
authorPali Rohár <pali@kernel.org>
Tue, 5 Oct 2021 18:09:44 +0000 (20:09 +0200)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 7 Oct 2021 13:23:31 +0000 (14:23 +0100)
commit5819ce9b79df4f7074e69da66de419cc638c8279
tree82bc70b546740ca29d614a7ca2c38bd6466b4c53
parentcbf18ef761cc7d423e9fcc77371796d5f25c4242
PCI: aardvark: Fix configuring Reference clock

Commit bb4df11f776e ("PCI: aardvark: Add PHY support") introduced
configuration of PCIe Reference clock via PCIE_CORE_REF_CLK_REG register,
but did it incorrectly.

PCIe Reference clock differential pair is routed from system board to
endpoint card, so on CPU side it has output direction. Therefore it is
required to enable transmitting and disable receiving.

Default configuration according to Armada 3700 Functional Specifications is
enabled receiver part and disabled transmitter.

We need this change because otherwise PCIe Reference clock is configured to
some undefined state when differential pair is used for both transmitting
and receiving.

Fix this by disabling receiver part.

Link: https://lore.kernel.org/r/20211005180952.6812-6-kabel@kernel.org
Fixes: bb4df11f776e ("PCI: aardvark: Add PHY support")
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Marek Behún <kabel@kernel.org>
Cc: stable@vger.kernel.org
drivers/pci/controller/pci-aardvark.c