| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: bcm53xx_board.c,v 1.19 2014/02/19 23:19:16 matt Exp $ */ | | 1 | /* $NetBSD: bcm53xx_board.c,v 1.20 2014/02/19 23:21:02 matt Exp $ */ |
2 | /*- | | 2 | /*- |
3 | * Copyright (c) 2012 The NetBSD Foundation, Inc. | | 3 | * Copyright (c) 2012 The NetBSD Foundation, Inc. |
4 | * All rights reserved. | | 4 | * All rights reserved. |
5 | * | | 5 | * |
6 | * This code is derived from software contributed to The NetBSD Foundation | | 6 | * This code is derived from software contributed to The NetBSD Foundation |
7 | * by Matt Thomas of 3am Software Foundry. | | 7 | * by Matt Thomas of 3am Software Foundry. |
8 | * | | 8 | * |
9 | * Redistribution and use in source and binary forms, with or without | | 9 | * Redistribution and use in source and binary forms, with or without |
10 | * modification, are permitted provided that the following conditions | | 10 | * modification, are permitted provided that the following conditions |
11 | * are met: | | 11 | * are met: |
12 | * 1. Redistributions of source code must retain the above copyright | | 12 | * 1. Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. | | 13 | * notice, this list of conditions and the following disclaimer. |
14 | * 2. Redistributions in binary form must reproduce the above copyright | | 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| @@ -25,27 +25,27 @@ | | | @@ -25,27 +25,27 @@ |
25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
28 | * POSSIBILITY OF SUCH DAMAGE. | | 28 | * POSSIBILITY OF SUCH DAMAGE. |
29 | */ | | 29 | */ |
30 | | | 30 | |
31 | #include "opt_broadcom.h" | | 31 | #include "opt_broadcom.h" |
32 | #include "arml2cc.h" | | 32 | #include "arml2cc.h" |
33 | | | 33 | |
34 | #define _ARM32_BUS_DMA_PRIVATE | | 34 | #define _ARM32_BUS_DMA_PRIVATE |
35 | | | 35 | |
36 | #include <sys/cdefs.h> | | 36 | #include <sys/cdefs.h> |
37 | | | 37 | |
38 | __KERNEL_RCSID(1, "$NetBSD: bcm53xx_board.c,v 1.19 2014/02/19 23:19:16 matt Exp $"); | | 38 | __KERNEL_RCSID(1, "$NetBSD: bcm53xx_board.c,v 1.20 2014/02/19 23:21:02 matt Exp $"); |
39 | | | 39 | |
40 | #include <sys/param.h> | | 40 | #include <sys/param.h> |
41 | #include <sys/bus.h> | | 41 | #include <sys/bus.h> |
42 | #include <sys/cpu.h> | | 42 | #include <sys/cpu.h> |
43 | #include <sys/device.h> | | 43 | #include <sys/device.h> |
44 | | | 44 | |
45 | #include <prop/proplib.h> | | 45 | #include <prop/proplib.h> |
46 | | | 46 | |
47 | #include <net/if.h> | | 47 | #include <net/if.h> |
48 | #include <net/if_ether.h> | | 48 | #include <net/if_ether.h> |
49 | | | 49 | |
50 | #define CCA_PRIVATE | | 50 | #define CCA_PRIVATE |
51 | #define CRU_PRIVATE | | 51 | #define CRU_PRIVATE |
| @@ -76,27 +76,27 @@ struct arm32_dma_range bcm53xx_dma_range | | | @@ -76,27 +76,27 @@ struct arm32_dma_range bcm53xx_dma_range |
76 | .dr_len = 0x10000000, | | 76 | .dr_len = 0x10000000, |
77 | }, [1] = { | | 77 | }, [1] = { |
78 | .dr_sysbase = 0x90000000, | | 78 | .dr_sysbase = 0x90000000, |
79 | .dr_busbase = 0x90000000, | | 79 | .dr_busbase = 0x90000000, |
80 | }, | | 80 | }, |
81 | #elif defined(BCM563XX) | | 81 | #elif defined(BCM563XX) |
82 | [0] = { | | 82 | [0] = { |
83 | .dr_sysbase = 0x60000000, | | 83 | .dr_sysbase = 0x60000000, |
84 | .dr_busbase = 0x60000000, | | 84 | .dr_busbase = 0x60000000, |
85 | .dr_len = 0x20000000, | | 85 | .dr_len = 0x20000000, |
86 | }, [1] = { | | 86 | }, [1] = { |
87 | .dr_sysbase = 0x80000000, | | 87 | .dr_sysbase = 0x80000000, |
88 | .dr_busbase = 0x80000000, | | 88 | .dr_busbase = 0x80000000, |
89 | }. | | 89 | }, |
90 | #endif | | 90 | #endif |
91 | }; | | 91 | }; |
92 | | | 92 | |
93 | struct arm32_bus_dma_tag bcm53xx_dma_tag = { | | 93 | struct arm32_bus_dma_tag bcm53xx_dma_tag = { |
94 | ._ranges = bcm53xx_dma_ranges, | | 94 | ._ranges = bcm53xx_dma_ranges, |
95 | ._nranges = __arraycount(bcm53xx_dma_ranges), | | 95 | ._nranges = __arraycount(bcm53xx_dma_ranges), |
96 | _BUS_DMAMAP_FUNCS, | | 96 | _BUS_DMAMAP_FUNCS, |
97 | _BUS_DMAMEM_FUNCS, | | 97 | _BUS_DMAMEM_FUNCS, |
98 | _BUS_DMATAG_FUNCS, | | 98 | _BUS_DMATAG_FUNCS, |
99 | }; | | 99 | }; |
100 | | | 100 | |
101 | struct arm32_dma_range bcm53xx_coherent_dma_ranges[] = { | | 101 | struct arm32_dma_range bcm53xx_coherent_dma_ranges[] = { |
102 | #ifdef BCM5301X | | 102 | #ifdef BCM5301X |