From owner-svn-src-head@FreeBSD.ORG Sun Jan 5 16:45:35 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05A2CCD1; Sun, 5 Jan 2014 16:45:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CCB071138; Sun, 5 Jan 2014 16:45:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s05GjYwR072614; Sun, 5 Jan 2014 16:45:34 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s05GjYJm072613; Sun, 5 Jan 2014 16:45:34 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201401051645.s05GjYJm072613@svn.freebsd.org> From: Ian Lepore Date: Sun, 5 Jan 2014 16:45:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260323 - head/sys/arm/tegra X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jan 2014 16:45:35 -0000 Author: ian Date: Sun Jan 5 16:45:34 2014 New Revision: 260323 URL: http://svnweb.freebsd.org/changeset/base/260323 Log: Eliminate use of fdt_immr_addr(), it's not needed for this SoC. Convert to the newer arm_devmap_add_entry() routine for creating device mappings. Modified: head/sys/arm/tegra/tegra2_machdep.c Modified: head/sys/arm/tegra/tegra2_machdep.c ============================================================================== --- head/sys/arm/tegra/tegra2_machdep.c Sun Jan 5 16:40:41 2014 (r260322) +++ head/sys/arm/tegra/tegra2_machdep.c Sun Jan 5 16:45:34 2014 (r260323) @@ -50,17 +50,12 @@ __FBSDID("$FreeBSD$"); #include -/* FIXME move to tegrareg.h */ -#define TEGRA2_BASE 0xE0000000 /* KVM base for peripherials */ -#define TEGRA2_UARTA_VA_BASE 0xE0006000 -#define TEGRA2_UARTA_PA_BASE 0x70006000 - #define TEGRA2_CLK_RST_PA_BASE 0x60006000 #define TEGRA2_CLK_RST_OSC_FREQ_DET_REG 0x58 #define TEGRA2_CLK_RST_OSC_FREQ_DET_STAT_REG 0x5C -#define OSC_FREQ_DET_TRIG (1<<31) -#define OSC_FREQ_DET_BUSY (1<<31) +#define OSC_FREQ_DET_TRIG (1U<<31) +#define OSC_FREQ_DET_BUSY (1U<<31) #if 0 static int @@ -107,15 +102,12 @@ vm_offset_t initarm_lastaddr(void) { - return (fdt_immr_va); + return (arm_devmap_lastaddr()); } void initarm_early_init(void) { - - if (fdt_immr_addr(TEGRA2_BASE) != 0) /* FIXME ???? */ - while (1); } void @@ -128,26 +120,16 @@ initarm_late_init(void) { } -#define FDT_DEVMAP_MAX (1 + 2 + 1 + 1) /* FIXME */ -static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = { - { 0, 0, 0, 0, 0, } -}; - /* - * Construct pmap_devmap[] with DT-derived config data. + * Add a static mapping for the register range that includes the debug uart. + * It's not clear this is needed, but the original code established this mapping + * before conversion to the newer arm_devmap_add_entry() routine. */ int initarm_devmap_init(void) { - int i = 0; - fdt_devmap[i].pd_va = 0xe0000000; - fdt_devmap[i].pd_pa = 0x70000000; - fdt_devmap[i].pd_size = 0x100000; - fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE; - fdt_devmap[i].pd_cache = PTE_NOCACHE; - i++; - arm_devmap_register_table(&fdt_devmap[0]); + arm_devmap_add_entry(0x70000000, 0x00100000); return (0); }