Module Name:    src
Committed By:   matt
Date:           Fri Feb  8 23:24:02 UTC 2013

Modified Files:
        src/sys/arch/arm/broadcom: bcm53xx_board.c

Log Message:
Properly deal with the non-coherent dma tag too.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/broadcom/bcm53xx_board.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/broadcom/bcm53xx_board.c
diff -u src/sys/arch/arm/broadcom/bcm53xx_board.c:1.10 src/sys/arch/arm/broadcom/bcm53xx_board.c:1.11
--- src/sys/arch/arm/broadcom/bcm53xx_board.c:1.10	Fri Feb  8 23:21:35 2013
+++ src/sys/arch/arm/broadcom/bcm53xx_board.c	Fri Feb  8 23:24:02 2013
@@ -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 @@ bcm53xx_dma_bootstrap(psize_t memsize)
 	if (memsize < 256*1024*1024) {
 		bcm53xx_dma_ranges[0].dr_len = memsize;
 		bcm53xx_coherent_dma_ranges[0].dr_len = memsize;
-#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
 		bcm53xx_dma_tag._nranges = 1;
+#ifdef _ARM32_NEED_BUS_DMA_BOUNCE
 		bcm53xx_coherent_dma_tag._nranges = 1;
+#endif
 	} else {
 		/*
 		 * By setting up two ranges, bus_dmamem_alloc will always
@@ -536,6 +537,7 @@ bcm53xx_dma_bootstrap(psize_t memsize)
 		 * 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
 	}

Reply via email to