Greg,
We found another boot fix that needs to be backported to v3.12.x and above. Please cherry-pick:
b42285f66f87 "PCI: mvebu: move clock enable before register access"
See the below explanation for context.
On Wed, Apr 09, 2014 at 11:51:12AM +0200, Thomas Petazzoni wrote:
Ezequiel, Kevin,
On Tue, 8 Apr 2014 20:37:07 -0300, Ezequiel Garcia wrote:
Hm... unfortunately it's not that simple. multi_v7_defconfig does *not* select PCI, while mvebu_defconfig does. And the problem seems to be PCI-related.
Could you try the following patch? It applies on v3.12.17.
Ok, let's try to explain what happened.
As of v3.12, the PCI driver was doing this:
1/ Access some registers 2/ Take + enable the PCIe clock
Obviously, it isn't correct, but it was working, because by default when you boot, the PCIe clock is left enabled by the bootloader, so the above sequence 1/ then 2/ above worked perfectly fine.
However, as of v3.12.10, the following commits were merged:
020043ee82cf6f8b61b76cb90af73818f66e9f60 ARM: mvebu: Fix kernel hang in mvebu_soc_id_init() when of_iomap failed a4496ba6f8961044812d6362426774c231bbe6df ARM: mvebu: Add quirk for i2c for the OpenBlocks AX3-4 board 710398e3b203763d847a6310a65006bba7205d27 ARM: mvebu: Add support to get the ID and the revision of a SoC
These commits add a small piece of code in arch/arm/mach-mvebu/ to implement a SoC identification mechanism. And it happens that on Marvell EBU platforms, the way to retrieve the SoC identifier is by poking into PCIe registers. So what this mvebu-soc-id thing does is:
1/ Take + enable the PCIe clock 2/ Fetch the useful values from PCIe registers to identify the SoC 3/ Disable and drop the PCIe clock
After this is done, the PCIe driver comes and does:
1/ Access some registers => BANG, because the PCIe clock has been disabled by step (3) above. 2/ We never get there :-)
The sequence of (1) and (2) in the PCI driver has already been fixed as of:
b42285f66f871a9898a0e79e2d74bc7e7a101995 PCI: mvebu: move clock enable before register access
This commit needs to be backported to all the stable versions where the mvebu-soc-id patches were backported.
Thanks for the great explanation, Thomas!
thx,
Jason.