aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-12-19 00:49:07 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 23:05:42 -0500
commit56c8eaee65d688b526c12dca54a30276335679e5 (patch)
tree548a09c91edd507a9e8341d43edd67b215f7f9b6 /arch/powerpc/sysdev
parent1beb6a7d6cbed3ac03500ce9b5b9bb632c512039 (diff)
[PATCH] powerpc: Fix g5 DART init
The patch enabling the new G5's with U4 broke initialization of the DART driver, causing it to trigger a BUG_ON for a case that is actually valid. This patch fixes it: Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/dart_iommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c
index df0dbdee762a..e00b46b9514e 100644
--- a/arch/powerpc/sysdev/dart_iommu.c
+++ b/arch/powerpc/sysdev/dart_iommu.c
@@ -216,12 +216,12 @@ static int dart_init(struct device_node *dart_node)
216 base = dart_tablebase >> DART_PAGE_SHIFT; 216 base = dart_tablebase >> DART_PAGE_SHIFT;
217 size = dart_tablesize >> DART_PAGE_SHIFT; 217 size = dart_tablesize >> DART_PAGE_SHIFT;
218 if (dart_is_u4) { 218 if (dart_is_u4) {
219 BUG_ON(size & ~DART_SIZE_U4_SIZE_MASK); 219 size &= DART_SIZE_U4_SIZE_MASK;
220 DART_OUT(DART_BASE_U4, base); 220 DART_OUT(DART_BASE_U4, base);
221 DART_OUT(DART_SIZE_U4, size); 221 DART_OUT(DART_SIZE_U4, size);
222 DART_OUT(DART_CNTL, DART_CNTL_U4_ENABLE); 222 DART_OUT(DART_CNTL, DART_CNTL_U4_ENABLE);
223 } else { 223 } else {
224 BUG_ON(size & ~DART_CNTL_U3_SIZE_MASK); 224 size &= DART_CNTL_U3_SIZE_MASK;
225 DART_OUT(DART_CNTL, 225 DART_OUT(DART_CNTL,
226 DART_CNTL_U3_ENABLE | 226 DART_CNTL_U3_ENABLE |
227 (base << DART_CNTL_U3_BASE_SHIFT) | 227 (base << DART_CNTL_U3_BASE_SHIFT) |