Date: Mon, 19 Jul 2010 18:47:19 +0000 (UTC) From: Rafal Jaworowski <raj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r210247 - in head/sys: arm/include arm/mv dev/fdt dev/uart powerpc/booke powerpc/include Message-ID: <201007191847.o6JIlJYG050941@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: raj Date: Mon Jul 19 18:47:18 2010 New Revision: 210247 URL: http://svn.freebsd.org/changeset/base/210247 Log: Eliminate FDT_IMMR_VA define. This removes platform dependencies from <machine>/fdt.h for the benfit of portability. Modified: head/sys/arm/include/fdt.h head/sys/arm/mv/mv_machdep.c head/sys/dev/fdt/fdt_common.c head/sys/dev/fdt/fdt_common.h head/sys/dev/uart/uart_bus_fdt.c head/sys/powerpc/booke/machdep.c head/sys/powerpc/include/fdt.h Modified: head/sys/arm/include/fdt.h ============================================================================== --- head/sys/arm/include/fdt.h Mon Jul 19 18:41:50 2010 (r210246) +++ head/sys/arm/include/fdt.h Mon Jul 19 18:47:18 2010 (r210247) @@ -37,18 +37,10 @@ #include <vm/vm.h> #include <vm/pmap.h> +#include <machine/bus.h> #include <machine/pmap.h> #include <machine/intr.h> -#include <arm/mv/mvvar.h> -#include <arm/mv/mvwin.h> - -/* - * This is the base virtual address the internal mem-mapped registers (IMMR) - * range is available at. - */ -#define FDT_IMMR_VA MV_BASE - /* Max interrupt number */ #define FDT_INTR_MAX NIRQ Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Mon Jul 19 18:41:50 2010 (r210246) +++ head/sys/arm/mv/mv_machdep.c Mon Jul 19 18:47:18 2010 (r210247) @@ -380,7 +380,7 @@ initarm(void *mdp, void *unused __unused &memsize) != 0) while(1); - if (fdt_immr_addr() != 0) + if (fdt_immr_addr(MV_BASE) != 0) while (1); /* Platform-specific initialisation */ Modified: head/sys/dev/fdt/fdt_common.c ============================================================================== --- head/sys/dev/fdt/fdt_common.c Mon Jul 19 18:41:50 2010 (r210246) +++ head/sys/dev/fdt/fdt_common.c Mon Jul 19 18:47:18 2010 (r210247) @@ -63,7 +63,7 @@ vm_offset_t fdt_immr_va; vm_offset_t fdt_immr_size; int -fdt_immr_addr(void) +fdt_immr_addr(vm_offset_t immr_va) { pcell_t ranges[6], *rangesptr; phandle_t node; @@ -122,7 +122,7 @@ moveon: size = fdt_data_get((void *)rangesptr, size_cells); fdt_immr_pa = base; - fdt_immr_va = FDT_IMMR_VA; + fdt_immr_va = immr_va; fdt_immr_size = size; return (0); Modified: head/sys/dev/fdt/fdt_common.h ============================================================================== --- head/sys/dev/fdt/fdt_common.h Mon Jul 19 18:41:50 2010 (r210246) +++ head/sys/dev/fdt/fdt_common.h Mon Jul 19 18:47:18 2010 (r210247) @@ -90,7 +90,7 @@ int fdt_data_verify(void *, int); phandle_t fdt_find_compatible(phandle_t, const char *, int); int fdt_get_mem_regions(struct mem_region *, int *, uint32_t *); int fdt_get_phyaddr(phandle_t node, int *); -int fdt_immr_addr(void); +int fdt_immr_addr(vm_offset_t); int fdt_regsize(phandle_t, u_long *, u_long *); int fdt_intr_decode(phandle_t, pcell_t *, int *, int *, int *); int fdt_intr_to_rl(phandle_t, struct resource_list *, struct fdt_sense_level *); Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Mon Jul 19 18:41:50 2010 (r210246) +++ head/sys/dev/uart/uart_bus_fdt.c Mon Jul 19 18:47:18 2010 (r210247) @@ -188,7 +188,7 @@ uart_cpu_getdev(int devtype, struct uart err = fdt_regsize(node, &start, &size); if (err) return (ENXIO); - start += FDT_IMMR_VA; + start += fdt_immr_va; uart_bus_space_mem = fdtbus_bs_tag; uart_bus_space_io = NULL; Modified: head/sys/powerpc/booke/machdep.c ============================================================================== --- head/sys/powerpc/booke/machdep.c Mon Jul 19 18:41:50 2010 (r210246) +++ head/sys/powerpc/booke/machdep.c Mon Jul 19 18:47:18 2010 (r210247) @@ -319,7 +319,7 @@ e500_init(u_int32_t startkernel, u_int32 if (OF_init((void *)dtbp) != 0) while (1); - if (fdt_immr_addr() != 0) + if (fdt_immr_addr(CCSRBAR_VA) != 0) while (1); OF_interpret("perform-fixup", 0); Modified: head/sys/powerpc/include/fdt.h ============================================================================== --- head/sys/powerpc/include/fdt.h Mon Jul 19 18:41:50 2010 (r210246) +++ head/sys/powerpc/include/fdt.h Mon Jul 19 18:47:18 2010 (r210247) @@ -34,14 +34,6 @@ #include <machine/bus.h> #include <machine/intr_machdep.h> -#include <machine/platform.h> -#include <machine/vmparam.h> - -/* - * This is the base virtual address the internal mem-mapped registers (IMMR) - * range is available at. - */ -#define FDT_IMMR_VA CCSRBAR_VA /* Max interrupt number */ #define FDT_INTR_MAX INTR_VECTORS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007191847.o6JIlJYG050941>