1248557Sray/*- 2259322Sian * Copyright (c) 2013 Ian Lepore <ian@freebsd.org> 3248557Sray * All rights reserved. 4248557Sray * 5248557Sray * Redistribution and use in source and binary forms, with or without 6248557Sray * modification, are permitted provided that the following conditions 7248557Sray * are met: 8248557Sray * 1. Redistributions of source code must retain the above copyright 9248557Sray * notice, this list of conditions and the following disclaimer. 10248557Sray * 2. Redistributions in binary form must reproduce the above copyright 11248557Sray * notice, this list of conditions and the following disclaimer in the 12248557Sray * documentation and/or other materials provided with the distribution. 13248557Sray * 14259322Sian * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15259322Sian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16259322Sian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17259322Sian * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18259322Sian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19259322Sian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20259322Sian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21248557Sray * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22248557Sray * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23248557Sray * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24248557Sray * SUCH DAMAGE. 25248557Sray */ 26248557Sray 27248557Sray#include "opt_platform.h" 28248557Sray 29248557Sray#include <sys/cdefs.h> 30248557Sray__FBSDID("$FreeBSD: releng/10.3/sys/arm/freescale/imx/imx51_machdep.c 259365 2013-12-14 00:16:08Z ian $"); 31248557Sray 32248557Sray#include <sys/param.h> 33248557Sray#include <sys/systm.h> 34248557Sray#include <sys/bus.h> 35248557Sray#include <sys/reboot.h> 36248557Sray 37259365Sian#include <vm/vm.h> 38259365Sian 39259365Sian#include <machine/bus.h> 40259365Sian#include <machine/devmap.h> 41248557Sray#include <machine/machdep.h> 42259365Sian 43259322Sian#include <arm/freescale/imx/imx_machdep.h> 44248557Sray 45259365Sianvm_offset_t 46259365Sianinitarm_lastaddr(void) 47259365Sian{ 48259365Sian 49259365Sian return (arm_devmap_lastaddr()); 50259365Sian} 51259365Sian 52259365Sianvoid 53259365Sianinitarm_early_init(void) 54259365Sian{ 55259365Sian 56259365Sian /* XXX - Get rid of this stuff soon. */ 57259365Sian boothowto |= RB_VERBOSE|RB_MULTIPLE; 58259365Sian bootverbose = 1; 59259365Sian} 60259365Sian 61259365Sianvoid 62259365Sianinitarm_gpio_init(void) 63259365Sian{ 64259365Sian 65259365Sian} 66259365Sian 67259365Sianvoid 68259365Sianinitarm_late_init(void) 69259365Sian{ 70259365Sian 71259365Sian} 72259365Sian 73248557Sray/* 74259322Sian * Set up static device mappings. This is hand-optimized platform-specific 75259322Sian * config data which covers most of the common on-chip devices with a few 1MB 76259322Sian * section mappings. 77259322Sian * 78259322Sian * Notably missing are entries for GPU, IPU, in general anything video related. 79248557Sray */ 80259365Sianint 81259365Sianinitarm_devmap_init(void) 82248557Sray{ 83248557Sray 84259365Sian arm_devmap_add_entry(0x70000000, 0x00100000); 85259365Sian arm_devmap_add_entry(0x73f00000, 0x00100000); 86259365Sian arm_devmap_add_entry(0x83f00000, 0x00100000); 87259365Sian 88259365Sian return (0); 89248557Sray} 90248557Sray 91248557Srayvoid 92259322Siancpu_reset(void) 93248557Sray{ 94248557Sray 95259322Sian imx_wdog_cpu_reset(0x73F98000); 96248557Sray} 97248557Sray 98259322Sianu_int imx_soc_type() 99248557Sray{ 100259322Sian return (IMXSOC_51); 101248557Sray} 102248557Sray 103