From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 18:47:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FD54106564A; Mon, 19 Jul 2010 18:47:20 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BD818FC14; Mon, 19 Jul 2010 18:47:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JIlKqs050977; Mon, 19 Jul 2010 18:47:20 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JIlJYG050941; Mon, 19 Jul 2010 18:47:19 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007191847.o6JIlJYG050941@svn.freebsd.org> From: Rafal Jaworowski Date: Mon, 19 Jul 2010 18:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210247 - in head/sys: arm/include arm/mv dev/fdt dev/uart powerpc/booke powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 18:47:20 -0000 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 /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 #include +#include #include #include -#include -#include - -/* - * 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 #include -#include -#include - -/* - * 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