Skip to content

Fix i2c bus hang on A0 version of the Armada XP SoCs

Gregory CLEMENT linux-arm-kernel linux-devicetree linux-i2c 9 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest posting 4/40 of 4 patches 0 repliesNew
  2. v5 posting 3/40 of 4 patches 0 repliesSuperseded
  3. v5 posting 2/40 of 4 patches 0 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v5 posting 1/44 patches0 repliesSuperseded
v43 patches0 repliesSuperseded
v3 posting 2/20 of 2 patches0 repliesSuperseded
v3 posting 1/22 patches0 repliesSuperseded
v22 patches0 repliesSuperseded
v1 RFC0 of 3 patches0 repliesSuperseded

Patches in v5 posting 4/4 No applies recorded yet

None of the 4 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 0/4] Fix i2c bus hang on A0 version of the Armada XP SoCs
Quoted 30 lines · Gregory CLEMENT
Quoted 21 lines · Jason Cooper

Gregory,

Quoted 11 lines · Gregory CLEMENT

Hi,

Here come the 5th version of the series fixing the i2c bus hang on A0 version of the Armada XP SoCs. It occurred on the early release of the OpenBlocks AX3-4 boards. Indeed the first variants of Armada XP SoCs (A0 stepping) have issues related to the i2c controller which prevent to use the offload mechanism and lead to a kernel hang during boot.

The main change are the use of marvell,mv78230-a0-i2c and that the function mvebu_get_soc_id() is now local to mach-mvebu.

Quoted 6 lines

The first patch add a mean to detect the SoCs version at run-time and the second one use this feature in the driver.

The 3 first patches should be applied on 3.13-rc and on stable kernel 3.12 as it fixes a regression introduce by the commit 930ab3d403ae "i2c: mv64xxx: Add I2C Transaction Generator support".

Quoted 8 lines

Ok, I've pulled this in by cherrypicking the commits. I needed to add the 'Fixes: ...' and 'Cc: stable ...' language, so the commit ids were going to change anyhow. I also added the note to the binding as we discussed. I've also based this against v3.13-rc1 as there doesn't appear to be any need to drag in everything up to -rc6.

I've pushed this to mvebu/fixes. Please take a look. If it all looks good I'll send the pull request off tomorrow.

Quoted 8 lines

Hi Jason,

Everything looks perfect!

Thanks for having improved it,

Gregory

Hi Jason,

Eventually we didn't finish with it!
Ezequiel found an issue when we try to access pci_base if it have not been properly mapped, in this case the kernel hang. Indeed the check of the return of of_iomap was wrong.

The fix would be something like:

-o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<--

arch/arm/mach-mvebu/mvebu-soc-id.c +1 -1
@@ -88,7 +88,7 @@ static int __init mvebu_soc_id_init(void)
        }
 
        pci_base = of_iomap(child, 0);
-       if (IS_ERR(pci_base)) {
+       if (pci_base == NULL) {
                pr_err("cannot map registers\n");
                ret = -ENOMEM;
                goto res_ioremap;

-o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<--

How do you want we handle it?

Do you want a proper patch to amend?
A new series?
Something else?

Thanks,

Gregory

Quoted 12 lines
Quoted 10 lines

thx,

Jason.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com