Skip to contentSkip to conversation

powerpc/85xx: Fix SWIOTLB initalization for MPC85xxMDS boards

PATCH Applied Anton Vorontsov 2 participants 2 messages Jun 8, 2010 – Aug 4, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 powerpc/85xx: Fix SWIOTLB initalization for MPC85xxMDS boards

The code inside '#ifdef CONFIG_QUICC_ENGINE' makes the mpc85xx_mds_setup_arch() return early if no QE nodes present, and so SWIOTLB is never initialized.

This patch fixes the issue by moving SWIOTLB code above QE.

---
 arch/powerpc/platforms/85xx/mpc85xx_mds.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
arch/powerpc/platforms/85xx/mpc85xx_mds.c +8 -8
index 8fe87fc..35ab2b4 100644
@@ -202,6 +202,14 @@ static void __init mpc85xx_mds_setup_arch(void)
 	mpc85xx_smp_init();
 #endif
 
+#ifdef CONFIG_SWIOTLB
+	if (lmb_end_of_DRAM() > max) {
+		ppc_swiotlb_enable = 1;
+		set_pci_dma_ops(&swiotlb_dma_ops);
+		ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
+	}
+#endif
+
 #ifdef CONFIG_QUICC_ENGINE
 	np = of_find_compatible_node(NULL, NULL, "fsl,qe");
 	if (!np) {
@@ -323,14 +331,6 @@ static void __init mpc85xx_mds_setup_arch(void)
 
 	}
 #endif	/* CONFIG_QUICC_ENGINE */
-
-#ifdef CONFIG_SWIOTLB
-	if (lmb_end_of_DRAM() > max) {
-		ppc_swiotlb_enable = 1;
-		set_pci_dma_ops(&swiotlb_dma_ops);
-		ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
-	}
-#endif
 }
 
 
Signature · 1 line
1.7.0.5
Applied
#1 lore raw
Quoted 11 lines · Anton Vorontsov

The code inside '#ifdef CONFIG_QUICC_ENGINE' makes the mpc85xx_mds_setup_arch() return early if no QE nodes present, and so SWIOTLB is never initialized.

This patch fixes the issue by moving SWIOTLB code above QE.

---
arch/powerpc/platforms/85xx/mpc85xx_mds.c | 16 ++++++++--------

1 files changed, 8 insertions(+), 8 deletions(-)

applied to next

- k