aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/cell/iommu.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index a276064471b3..1f7b25474086 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -917,6 +917,18 @@ static int __init cell_iommu_fixed_mapping_init(void)
917 return -1; 917 return -1;
918 } 918 }
919 919
920 /* We must have dma-ranges properties for fixed mapping to work */
921 for (np = NULL; (np = of_find_all_nodes(np));) {
922 if (of_find_property(np, "dma-ranges", NULL))
923 break;
924 }
925 of_node_put(np);
926
927 if (!np) {
928 pr_debug("iommu: no dma-ranges found, no fixed mapping\n");
929 return -1;
930 }
931
920 /* The default setup is to have the fixed mapping sit after the 932 /* The default setup is to have the fixed mapping sit after the
921 * dynamic region, so find the top of the largest IOMMU window 933 * dynamic region, so find the top of the largest IOMMU window
922 * on any axon, then add the size of RAM and that's our max value. 934 * on any axon, then add the size of RAM and that's our max value.