Skip to content

Commit

Permalink
powerpc/85xx: Fix SWIOTLB initalization for MPC85xxMDS boards
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
  • Loading branch information
Anton Vorontsov authored and Kumar Gala committed Aug 4, 2010
1 parent f933a41 commit bb863e8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions arch/powerpc/platforms/85xx/mpc85xx_mds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
}


Expand Down

0 comments on commit bb863e8

Please sign in to comment.