Merge tag 'fixes-3.10-3' of git://git.infradead.org/users/jcooper/linux into fixes
authorOlof Johansson <olof@lixom.net>
Sat, 1 Jun 2013 05:20:10 +0000 (22:20 -0700)
committerOlof Johansson <olof@lixom.net>
Sun, 2 Jun 2013 18:50:40 +0000 (11:50 -0700)
From Jason Cooper, mvebu fixes for v3.10 round 3:
 - mvebu
    - fix bug in coherency fabric low level init
 - kirkwood
    - fix crash from pcie double init

Signed-off-by: Olof Johansson <olof@lixom.net>
* tag 'fixes-3.10-3' of git://git.infradead.org/users/jcooper/linux:
  ARM: mvebu: Fix bug in coherency fabric low level init function
  ARM: Kirkwood: TS219: Fix crash by double PCIe instantiation

arch/arm/mach-kirkwood/board-ts219.c
arch/arm/mach-mvebu/coherency_ll.S

index acb0187c7ee1d036d4c119574e46fab6dbbef48d..4695d5f35fc937dc6eab658fc979d5ee2ecef721 100644 (file)
@@ -41,13 +41,3 @@ void __init qnap_dt_ts219_init(void)
 
        pm_power_off = qnap_tsx1x_power_off;
 }
-
-/* FIXME: Will not work with DT. Maybe use MPP40_GPIO? */
-static int __init ts219_pci_init(void)
-{
-       if (machine_is_ts219())
-               kirkwood_pcie_init(KW_PCIE0);
-
-       return 0;
-}
-subsys_initcall(ts219_pci_init);
index 53e8391192cd25d7495cd4e6b6602552182a1dc2..5476669ba9056ff80d63fab31d8f266ef25a2652 100644 (file)
@@ -32,15 +32,21 @@ ENTRY(ll_set_cpu_coherent)
 
        /* Add CPU to SMP group - Atomic */
        add     r3, r0, #ARMADA_XP_CFB_CTL_REG_OFFSET
-       ldr     r2, [r3]
+1:
+       ldrex   r2, [r3]
        orr     r2, r2, r1
-       str     r2, [r3]
+       strex   r0, r2, [r3]
+       cmp     r0, #0
+       bne 1b
 
        /* Enable coherency on CPU - Atomic */
-       add     r3, r0, #ARMADA_XP_CFB_CFG_REG_OFFSET
-       ldr     r2, [r3]
+       add     r3, r3, #ARMADA_XP_CFB_CFG_REG_OFFSET
+1:
+       ldrex   r2, [r3]
        orr     r2, r2, r1
-       str     r2, [r3]
+       strex   r0, r2, [r3]
+       cmp     r0, #0
+       bne 1b
 
        dsb