linux/arch/arm/mach-mvebu
Thomas Petazzoni b25bcf1bca ARM: mvebu: mvebu-soc-id: keep clock enabled if PCIe unit is enabled
Since the mvebu-soc-id code in mach-mvebu/ was introduced, several
users have noticed a regression: the PCIe card connected in the first
PCIe interface is not detected properly.

This is due to the fact that the mvebu-soc-id code enables the PCIe
clock of the first PCIe interface, reads the SoC device ID and
revision number (yes this information is made available as part of
PCIe registers), and then disables the clock. However, by doing this,
we gate the clock and therefore loose the complex PCIe configuration
that was done by the bootloader.

Unfortunately, as of today, the kernel is not capable of doing this
complex configuration by itself, so we really need to keep the PCIe
clock enabled. However, we don't want to keep it enabled
unconditionally: if the PCIe interface is not enabled or PCI support
is not compiled into the kernel, there is no reason to keep the PCIe
clock running.

This issue was discussed with Kevin Hilman, and the suggested solution
was to make the mvebu-soc-id code keep the clock enabled in case it
will be needed for PCIe. This is therefore the solution implemented in
this patch.

Long term, we hope to make the kernel more capable in terms of PCIe
configuration for this platform, which will anyway be needed to
support the compilation of the PCIe host controller driver as a
module. In the mean time however, we don't have much other choice than
to implement the currently proposed solution.

Reported-by: Neil Greatorex <neil@fatboyfat.co.uk>
Cc: Neil Greatorex <neil@fatboyfat.co.uk>
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1399903900-29977-3-git-send-email-thomas.petazzoni@free-electrons.com
Fixes: af8d1c63af ("ARM: mvebu: Add support to get the ID and the revision of a SoC")
Cc: <stable@vger.kernel.org> # 3.14+: 42a18d1cf4: ARM: mvebu: mvebu-soc-id: add missing clk_put() call
Cc: <stable@vger.kernel.org> # 3.14+
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-05-13 14:57:27 +00:00
..
include/mach ARM: mvebu: Simplify headers and make local 2014-02-22 21:19:59 +00:00
armada-370-xp.h ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h 2013-12-27 18:08:19 +00:00
board-t5325.c ARM: kirkwood: Add HP T5325 thin client 2014-02-25 20:32:16 +00:00
board-v7.c ARM: SoC specific changes 2014-04-05 14:19:54 -07:00
board.h ARM: kirkwood: Add HP T5325 thin client 2014-02-25 20:32:16 +00:00
coherency_ll.S ARM: mvebu: support running big-endian 2013-10-19 20:46:34 +01:00
coherency.c ARM: mvebu: fix some sparse warnings 2013-11-24 03:27:54 +00:00
coherency.h ARM: mvebu: fix some sparse warnings 2013-11-24 03:27:54 +00:00
common.h ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h 2013-12-27 18:08:19 +00:00
dove.c ARM: mvebu: move DT Dove to MVEBU 2014-03-04 04:13:48 +00:00
headsmp.S ARM: mvebu: support running big-endian 2013-10-19 20:46:34 +01:00
hotplug.c ARM: mvebu: fix some sparse warnings 2013-11-24 03:27:54 +00:00
Kconfig ARM: SoC specific changes 2014-04-05 14:19:54 -07:00
kirkwood-pm.c ARM: mvebu: Simplify headers and make local 2014-02-22 21:19:59 +00:00
kirkwood-pm.h ARM: mvebu: Move kirkwood DT boards into mach-mvebu 2014-02-22 21:19:55 +00:00
kirkwood.c ARM: kirkwood: Add HP T5325 thin client 2014-02-25 20:32:16 +00:00
kirkwood.h ARM: mvebu: Simplify headers and make local 2014-02-22 21:19:59 +00:00
Makefile ARM: mvebu: move DT Dove to MVEBU 2014-03-04 04:13:48 +00:00
mvebu-soc-id.c ARM: mvebu: mvebu-soc-id: keep clock enabled if PCIe unit is enabled 2014-05-13 14:57:27 +00:00
mvebu-soc-id.h ARM: mvebu: Add support to get the ID and the revision of a SoC 2014-01-14 01:59:16 +00:00
platsmp.c ARM: mvebu: fix some sparse warnings 2013-11-24 03:27:54 +00:00
pmsu.c ARM: mvebu: fix some sparse warnings 2013-11-24 03:27:54 +00:00
pmsu.h arm: mvebu: Add initial support for power managmement service unit 2012-11-21 16:49:36 +01:00
system-controller.c ARM: mvebu: add Armada 375 support to the system-controller driver 2014-02-22 00:41:09 +00:00