Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/broadcom Properly deal with the non-coherent dm...
details: https://anonhg.NetBSD.org/src/rev/7ab58a261fe8
branches: trunk
changeset: 784760:7ab58a261fe8
user: matt <matt%NetBSD.org@localhost>
date: Fri Feb 08 23:24:02 2013 +0000
description:
Properly deal with the non-coherent dma tag too.
diffstat:
sys/arch/arm/broadcom/bcm53xx_board.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (38 lines):
diff -r 5a9693ee51a0 -r 7ab58a261fe8 sys/arch/arm/broadcom/bcm53xx_board.c
--- a/sys/arch/arm/broadcom/bcm53xx_board.c Fri Feb 08 23:21:35 2013 +0000
+++ b/sys/arch/arm/broadcom/bcm53xx_board.c Fri Feb 08 23:24:02 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm53xx_board.c,v 1.10 2013/02/08 23:21:35 matt Exp $ */
+/* $NetBSD: bcm53xx_board.c,v 1.11 2013/02/08 23:24:02 matt Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_board.c,v 1.10 2013/02/08 23:21:35 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_board.c,v 1.11 2013/02/08 23:24:02 matt Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -526,9 +526,10 @@
if (memsize < 256*1024*1024) {
bcm53xx_dma_ranges[0].dr_len = memsize;
bcm53xx_coherent_dma_ranges[0].dr_len = memsize;
+ bcm53xx_dma_tag._nranges = 1;
#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
- bcm53xx_dma_tag._nranges = 1;
bcm53xx_coherent_dma_tag._nranges = 1;
+#endif
} else {
/*
* By setting up two ranges, bus_dmamem_alloc will always
@@ -536,6 +537,7 @@
* below 256MB which for PCI and GMAC are coherent.
*/
bcm53xx_dma_ranges[1].dr_len = memsize - 0x10000000;
+#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
bcm53xx_coherent_dma_ranges[1].dr_len = memsize - 0x10000000;
#endif
}
Home |
Main Index |
Thread Index |
Old Index