imx51_machdep.c revision 259322
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: stable/10/sys/arm/freescale/imx/imx51_machdep.c 259322 2013-12-13 18:26:22Z ian $"); 31248557Sray 32248557Sray#include <sys/param.h> 33248557Sray#include <sys/systm.h> 34248557Sray#include <sys/bus.h> 35248557Sray#include <sys/reboot.h> 36248557Sray 37248557Sray#include <machine/machdep.h> 38259322Sian#include <arm/freescale/imx/imx_machdep.h> 39248557Sray 40248557Sray/* 41259322Sian * Set up static device mappings. This is hand-optimized platform-specific 42259322Sian * config data which covers most of the common on-chip devices with a few 1MB 43259322Sian * section mappings. 44259322Sian * 45259322Sian * Notably missing are entries for GPU, IPU, in general anything video related. 46259322Sian * 47259322Sian * Note that for imx this is called from initarm_lastaddr() so that the lowest 48259322Sian * kva address used for static device mapping can be known at that point. 49248557Sray */ 50248557Srayvoid 51259322Sianimx_devmap_init(void) 52248557Sray{ 53248557Sray 54259322Sian imx_devmap_addentry(0x70000000, 0x00100000); 55259322Sian imx_devmap_addentry(0x73f00000, 0x00100000); 56259322Sian imx_devmap_addentry(0x83f00000, 0x00100000); 57248557Sray} 58248557Sray 59248557Srayvoid 60259322Siancpu_reset(void) 61248557Sray{ 62248557Sray 63259322Sian imx_wdog_cpu_reset(0x73F98000); 64248557Sray} 65248557Sray 66259322Sianu_int imx_soc_type() 67248557Sray{ 68259322Sian return (IMXSOC_51); 69248557Sray} 70248557Sray 71