Tue Dec 19 09:15:23 2017 UTC ()
Remove duplicate DEVMAP_* macros


(skrll)
diff -r1.1 -r1.2 src/sys/arch/arm/ti/ti_platform.c

cvs diff -r1.1 -r1.2 src/sys/arch/arm/ti/Attic/ti_platform.c (expand / switch to unified diff)

--- src/sys/arch/arm/ti/Attic/ti_platform.c 2017/10/26 01:16:32 1.1
+++ src/sys/arch/arm/ti/Attic/ti_platform.c 2017/12/19 09:15:23 1.2
@@ -1,41 +1,29 @@ @@ -1,41 +1,29 @@
1/* $NetBSD: ti_platform.c,v 1.1 2017/10/26 01:16:32 jakllsch Exp $ */ 1/* $NetBSD: ti_platform.c,v 1.2 2017/12/19 09:15:23 skrll Exp $ */
2 2
3#include "opt_fdt_arm.h" 3#include "opt_fdt_arm.h"
4 4
5#include <sys/cdefs.h> 5#include <sys/cdefs.h>
6__KERNEL_RCSID(0, "$NetBSD: ti_platform.c,v 1.1 2017/10/26 01:16:32 jakllsch Exp $"); 6__KERNEL_RCSID(0, "$NetBSD: ti_platform.c,v 1.2 2017/12/19 09:15:23 skrll Exp $");
7 7
8#include <sys/param.h> 8#include <sys/param.h>
9 9
10#include <dev/fdt/fdtvar.h> 10#include <dev/fdt/fdtvar.h>
11#include <arm/fdt/arm_fdtvar.h> 11#include <arm/fdt/arm_fdtvar.h>
12 12
13#include <uvm/uvm_extern.h> 13#include <uvm/uvm_extern.h>
14 14
15#include <dev/ic/comreg.h> 15#include <dev/ic/comreg.h>
16 16
17#define DEVMAP_ALIGN(a) ((a) & ~L1_S_OFFSET) 
18#define DEVMAP_SIZE(s) roundup2((s), L1_S_SIZE) 
19#define DEVMAP_ENTRY(va, pa, sz) \ 
20 { \ 
21 .pd_va = DEVMAP_ALIGN(va), \ 
22 .pd_pa = DEVMAP_ALIGN(pa), \ 
23 .pd_size = DEVMAP_SIZE(sz), \ 
24 .pd_prot = VM_PROT_READ|VM_PROT_WRITE, \ 
25 .pd_cache = PTE_NOCACHE \ 
26 } 
27#define DEVMAP_ENTRY_END { 0 } 
28 
29extern struct bus_space armv7_generic_bs_tag; 17extern struct bus_space armv7_generic_bs_tag;
30extern struct bus_space armv7_generic_a4x_bs_tag; 18extern struct bus_space armv7_generic_a4x_bs_tag;
31extern struct arm32_bus_dma_tag armv7_generic_dma_tag; 19extern struct arm32_bus_dma_tag armv7_generic_dma_tag;
32 20
33static const struct pmap_devmap * 21static const struct pmap_devmap *
34am33xx_platform_devmap(void) 22am33xx_platform_devmap(void)
35{ 23{
36 static const struct pmap_devmap devmap[] = { 24 static const struct pmap_devmap devmap[] = {
37 DEVMAP_ENTRY(0xe4c00000, 0x44c00000, 0x00400000), 25 DEVMAP_ENTRY(0xe4c00000, 0x44c00000, 0x00400000),
38 DEVMAP_ENTRY(0xe8000000, 0x48000000, 0x01000000), 26 DEVMAP_ENTRY(0xe8000000, 0x48000000, 0x01000000),
39 DEVMAP_ENTRY(0xea000000, 0x4a000000, 0x01000000), 27 DEVMAP_ENTRY(0xea000000, 0x4a000000, 0x01000000),
40 DEVMAP_ENTRY_END 28 DEVMAP_ENTRY_END
41 }; 29 };