From owner-svn-src-head@FreeBSD.ORG Tue Aug 13 21:12:29 2013 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 ESMTP id 10777C12; Tue, 13 Aug 2013 21:12:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) 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 E23EA25E5; Tue, 13 Aug 2013 21:12:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7DLCSxg096649; Tue, 13 Aug 2013 21:12:28 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7DLCSJt096646; Tue, 13 Aug 2013 21:12:28 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201308132112.r7DLCSJt096646@svn.freebsd.org> From: Ian Lepore Date: Tue, 13 Aug 2013 21:12:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254299 - head/sys/arm/freescale/imx 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.14 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: Tue, 13 Aug 2013 21:12:29 -0000 Author: ian Date: Tue Aug 13 21:12:28 2013 New Revision: 254299 URL: http://svnweb.freebsd.org/changeset/base/254299 Log: Rename imx_machdep.c to imx51_machdep.c, because it contains hardware addresses which are specific to the imx51 chips. Added: head/sys/arm/freescale/imx/imx51_machdep.c - copied unchanged from r254281, head/sys/arm/freescale/imx/imx_machdep.c Deleted: head/sys/arm/freescale/imx/imx_machdep.c Modified: head/sys/arm/freescale/imx/files.imx51 Modified: head/sys/arm/freescale/imx/files.imx51 ============================================================================== --- head/sys/arm/freescale/imx/files.imx51 Tue Aug 13 21:01:23 2013 (r254298) +++ head/sys/arm/freescale/imx/files.imx51 Tue Aug 13 21:12:28 2013 (r254299) @@ -8,7 +8,7 @@ arm/arm/irq_dispatch.S standard kern/kern_clocksource.c standard # Init -arm/freescale/imx/imx_machdep.c standard +arm/freescale/imx/imx51_machdep.c standard arm/freescale/imx/common.c standard arm/freescale/imx/bus_space.c standard Copied: head/sys/arm/freescale/imx/imx51_machdep.c (from r254281, head/sys/arm/freescale/imx/imx_machdep.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx51_machdep.c Tue Aug 13 21:12:28 2013 (r254299, copy of r254281, head/sys/arm/freescale/imx/imx_machdep.c) @@ -0,0 +1,142 @@ +/*- + * Copyright (c) 1994-1998 Mark Brinicombe. + * Copyright (c) 1994 Brini. + * Copyright (c) 2012, 2013 The FreeBSD Foundation + * All rights reserved. + * + * + * This code is derived from software written for Brini by Mark Brinicombe + * Portions of this software were developed by Oleksandr Rybalko + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Brini. + * 4. The name of the company nor the name of the author may be used to + * endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: FreeBSD: //depot/projects/arm/src/sys/arm/at91/kb920x_machdep.c, rev 45 + */ + +#include "opt_platform.h" + +#include +__FBSDID("$FreeBSD$"); + +#define _ARM32_BUS_DMA_PRIVATE +#include +#include +#include +#include + +#include +#include + +#include +#include /* For trapframe_t, used in */ +#include +#include + +#include + +#define IMX51_DEV_VIRT_BASE 0xe0000000 +vm_offset_t +initarm_lastaddr(void) +{ + + boothowto |= RB_VERBOSE|RB_MULTIPLE; + bootverbose = 1; + + if (fdt_immr_addr(IMX51_DEV_VIRT_BASE) != 0) + while (1); + + /* Platform-specific initialisation */ + return (fdt_immr_va - ARM_NOCACHE_KVA_SIZE); +} + +/* + * Set initial values of GPIO output ports + */ +void +initarm_gpio_init(void) +{ + +} + +void +initarm_late_init(void) +{ + +} + +#define FDT_DEVMAP_MAX 2 +static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { + { 0, 0, 0, 0, 0, }, + { 0, 0, 0, 0, 0, } +}; + +/* + * Construct pmap_devmap[] with DT-derived config data. + */ +int +platform_devmap_init(void) +{ + + /* + * Map segment where UART1 and UART2 located. + */ + fdt_devmap[0].pd_va = IMX51_DEV_VIRT_BASE + 0x03f00000; + fdt_devmap[0].pd_pa = 0x73f00000; + fdt_devmap[0].pd_size = 0x00100000; + fdt_devmap[0].pd_prot = VM_PROT_READ | VM_PROT_WRITE; + fdt_devmap[0].pd_cache = PTE_NOCACHE; + + pmap_devmap_bootstrap_table = &fdt_devmap[0]; + return (0); +} + +struct arm32_dma_range * +bus_dma_get_range(void) +{ + + return (NULL); +} + +int +bus_dma_get_range_nb(void) +{ + + return (0); +} + +void +cpu_reset(void) +{ + + printf("Reset ...\n"); + /* Clear n_reset flag */ + *((volatile u_int16_t *)(IMX51_DEV_VIRT_BASE + 0x03f98000)) = + (u_int16_t)0; + while (1); +}