diff options
author | ian <ian@FreeBSD.org> | 2017-03-01 19:55:04 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2017-03-01 19:55:04 +0000 |
commit | b6db1fb93d0aefdf2d82e9b20ca36094d5a3cb32 (patch) | |
tree | 74ac95ca667cdb4a171c9b715afd910264fb413d /sys/arm/arm | |
parent | fc497a4640d662955a6d75b5e5ca52703fbb525a (diff) | |
download | FreeBSD-src-b6db1fb93d0aefdf2d82e9b20ca36094d5a3cb32.zip FreeBSD-src-b6db1fb93d0aefdf2d82e9b20ca36094d5a3cb32.tar.gz |
MFC r306262, r306267, r310021: (needed to avoid conflicts on later merges)
Remove bus_dma_get_range and bus_dma_get_range_nb on armv6. We only need
this on a few earlier arm SoCs.
Restrict where we need to define fdt_fixup_table to just PowerPC and
Marvell.
Add the missing void to function signatures in much of the arm code.
Diffstat (limited to 'sys/arm/arm')
-rw-r--r-- | sys/arm/arm/busdma_machdep-v6.c | 43 | ||||
-rw-r--r-- | sys/arm/arm/cpufunc.c | 4 | ||||
-rw-r--r-- | sys/arm/arm/db_trace.c | 2 | ||||
-rw-r--r-- | sys/arm/arm/physmem.c | 2 | ||||
-rw-r--r-- | sys/arm/arm/platform.c | 1 | ||||
-rw-r--r-- | sys/arm/arm/undefined.c | 2 |
6 files changed, 5 insertions, 49 deletions
diff --git a/sys/arm/arm/busdma_machdep-v6.c b/sys/arm/arm/busdma_machdep-v6.c index 0a1331f..5bf4626 100644 --- a/sys/arm/arm/busdma_machdep-v6.c +++ b/sys/arm/arm/busdma_machdep-v6.c @@ -33,7 +33,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/systm.h> #include <sys/malloc.h> @@ -90,14 +89,6 @@ struct bus_dma_tag { bus_dma_lock_t *lockfunc; void *lockfuncarg; struct bounce_zone *bounce_zone; - /* - * DMA range for this tag. If the page doesn't fall within - * one of these ranges, an error is returned. The caller - * may then decide what to do with the transfer. If the - * range pointer is NULL, it is ignored. - */ - struct arm32_dma_range *ranges; - int _nranges; }; struct bounce_page { @@ -402,22 +393,6 @@ must_bounce(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t paddr, return (0); } -static __inline struct arm32_dma_range * -_bus_dma_inrange(struct arm32_dma_range *ranges, int nranges, - bus_addr_t curaddr) -{ - struct arm32_dma_range *dr; - int i; - - for (i = 0, dr = ranges; i < nranges; i++, dr++) { - if (curaddr >= dr->dr_sysbase && - round_page(curaddr) <= (dr->dr_sysbase + dr->dr_len)) - return (dr); - } - - return (NULL); -} - /* * Convenience function for manipulating driver locks from busdma (during * busdma_swi, for example). Drivers that don't provide their own locks @@ -502,8 +477,6 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, newtag->flags = flags; newtag->ref_count = 1; /* Count ourself */ newtag->map_count = 0; - newtag->ranges = bus_dma_get_range(); - newtag->_nranges = bus_dma_get_range_nb(); if (lockfunc != NULL) { newtag->lockfunc = lockfunc; newtag->lockfuncarg = lockfuncarg; @@ -987,22 +960,6 @@ _bus_dmamap_addseg(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t curaddr, sgsize = (baddr - curaddr); } - if (dmat->ranges) { - struct arm32_dma_range *dr; - - dr = _bus_dma_inrange(dmat->ranges, dmat->_nranges, - curaddr); - if (dr == NULL) { - _bus_dmamap_unload(dmat, map); - return (0); - } - /* - * In a valid DMA range. Translate the physical - * memory address to an address in the DMA window. - */ - curaddr = (curaddr - dr->dr_sysbase) + dr->dr_busbase; - } - /* * Insert chunk into a segment, coalescing with * previous segment if possible. diff --git a/sys/arm/arm/cpufunc.c b/sys/arm/arm/cpufunc.c index 9a848f5..eb5c5a1 100644 --- a/sys/arm/arm/cpufunc.c +++ b/sys/arm/arm/cpufunc.c @@ -585,7 +585,7 @@ static int arm_dcache_l2_assoc; static int arm_dcache_l2_linesize; static void -get_cachetype_cp15() +get_cachetype_cp15(void) { u_int ctype, isize, dsize, cpuid; u_int clevel, csize, i, sel; @@ -700,7 +700,7 @@ get_cachetype_cp15() */ int -set_cpufuncs() +set_cpufuncs(void) { cputype = cpu_ident(); cputype &= CPU_ID_CPU_MASK; diff --git a/sys/arm/arm/db_trace.c b/sys/arm/arm/db_trace.c index 846ad4e..c2b1ed2 100644 --- a/sys/arm/arm/db_trace.c +++ b/sys/arm/arm/db_trace.c @@ -130,7 +130,7 @@ db_stack_trace_cmd(struct unwind_state *state) } void -db_md_list_watchpoints() +db_md_list_watchpoints(void) { dbg_show_watchpoint(); diff --git a/sys/arm/arm/physmem.c b/sys/arm/arm/physmem.c index f6222c3..ec68c36 100644 --- a/sys/arm/arm/physmem.c +++ b/sys/arm/arm/physmem.c @@ -145,7 +145,7 @@ physmem_dump_tables(int (*prfunc)(const char *, ...)) * Print the contents of the static mapping table. Used for bootverbose. */ void -arm_physmem_print_tables() +arm_physmem_print_tables(void) { physmem_dump_tables(printf); diff --git a/sys/arm/arm/platform.c b/sys/arm/arm/platform.c index 85e60c6..64e8a30 100644 --- a/sys/arm/arm/platform.c +++ b/sys/arm/arm/platform.c @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); * through a previously registered kernel object. */ -#define _ARM32_BUS_DMA_PRIVATE #include <sys/param.h> #include <sys/bus.h> #include <sys/kernel.h> diff --git a/sys/arm/arm/undefined.c b/sys/arm/arm/undefined.c index fec194e6..5dfa0d4 100644 --- a/sys/arm/arm/undefined.c +++ b/sys/arm/arm/undefined.c @@ -165,7 +165,7 @@ gdb_trapper(u_int addr, u_int insn, struct trapframe *frame, int code) static struct undefined_handler gdb_uh; void -undefined_init() +undefined_init(void) { int loop; |