aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom_parse.c
diff options
context:
space:
mode:
authorWill Schmidt <will_schmidt@vnet.ibm.com>2006-05-30 14:38:40 -0400
committerPaul Mackerras <paulus@samba.org>2006-06-09 07:21:02 -0400
commit03ac829b0046d5769eef3dd841cec33a211db96e (patch)
treefbabaac94b4848f1906c49d7cbdbe9dbcd066372 /arch/powerpc/kernel/prom_parse.c
parentc5cf0e30bf3d8cb56758abb612827647c0a821cf (diff)
[PATCH] powerpc: fix of_parse_dma_window
My js20 appears to lack the ibm,#dma- properties, and boot fails with a "Kernel panic - not syncing: iommu_init_table: Can't allocate 0 bytes" message. This adds a fallback to the "#address-cells" property in case the "#ibm,dma-address-cells" property is missing. Tested on js20 and power5 lpar. Unless there is a more elegant solution... :-) Signed-off-by: Will Schmidt <willschm@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/prom_parse.c')
-rw-r--r--arch/powerpc/kernel/prom_parse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 23bb060330ef..45df420383cc 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -561,6 +561,9 @@ void of_parse_dma_window(struct device_node *dn, unsigned char *dma_window_prop,
561 *busno = *(dma_window++); 561 *busno = *(dma_window++);
562 562
563 prop = get_property(dn, "ibm,#dma-address-cells", NULL); 563 prop = get_property(dn, "ibm,#dma-address-cells", NULL);
564 if (!prop)
565 prop = get_property(dn, "#address-cells", NULL);
566
564 cells = prop ? *(u32 *)prop : prom_n_addr_cells(dn); 567 cells = prop ? *(u32 *)prop : prom_n_addr_cells(dn);
565 *phys = of_read_addr(dma_window, cells); 568 *phys = of_read_addr(dma_window, cells);
566 569