1ec4081c1SIan Lepore /*- 2ec4081c1SIan Lepore * Copyright (c) 2013 Ian Lepore <ian@freebsd.org> 3ec4081c1SIan Lepore * All rights reserved. 4ec4081c1SIan Lepore * 5ec4081c1SIan Lepore * Redistribution and use in source and binary forms, with or without 6ec4081c1SIan Lepore * modification, are permitted provided that the following conditions 7ec4081c1SIan Lepore * are met: 8ec4081c1SIan Lepore * 1. Redistributions of source code must retain the above copyright 9ec4081c1SIan Lepore * notice, this list of conditions and the following disclaimer. 10ec4081c1SIan Lepore * 2. Redistributions in binary form must reproduce the above copyright 11ec4081c1SIan Lepore * notice, this list of conditions and the following disclaimer in the 12ec4081c1SIan Lepore * documentation and/or other materials provided with the distribution. 13ec4081c1SIan Lepore * 14ec4081c1SIan Lepore * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15ec4081c1SIan Lepore * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16ec4081c1SIan Lepore * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17ec4081c1SIan Lepore * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18ec4081c1SIan Lepore * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19ec4081c1SIan Lepore * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20ec4081c1SIan Lepore * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21ec4081c1SIan Lepore * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22ec4081c1SIan Lepore * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23ec4081c1SIan Lepore * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24ec4081c1SIan Lepore * SUCH DAMAGE. 25ec4081c1SIan Lepore * 26ec4081c1SIan Lepore * $FreeBSD$ 27ec4081c1SIan Lepore */ 28ec4081c1SIan Lepore 29ec4081c1SIan Lepore #ifndef IMX_MACHDEP_H 30ec4081c1SIan Lepore #define IMX_MACHDEP_H 31ec4081c1SIan Lepore 32ec4081c1SIan Lepore #include <sys/types.h> 33bd6b2f9bSIan Lepore #include <sys/sysctl.h> 34bd6b2f9bSIan Lepore 35bd6b2f9bSIan Lepore SYSCTL_DECL(_hw_imx); 36ec4081c1SIan Lepore 37ec4081c1SIan Lepore /* Common functions, implemented in imx_machdep.c. */ 38ec4081c1SIan Lepore 39ec4081c1SIan Lepore void imx_wdog_cpu_reset(vm_offset_t _wdcr_phys) __attribute__((__noreturn__)); 40bd6b2f9bSIan Lepore void imx_wdog_init_last_reset(vm_offset_t _wdsr_phys); 41ec4081c1SIan Lepore 42f955880fSIan Lepore /* From here down, routines are implemented in imxNN_machdep.c. */ 43f955880fSIan Lepore 44ec4081c1SIan Lepore /* 45ec4081c1SIan Lepore * SoC identity. 46f955880fSIan Lepore * According to the documentation, there is such a thing as an i.MX6 Dual 47f955880fSIan Lepore * (non-lite flavor). However, Freescale doesn't seem to have assigned it a 48f955880fSIan Lepore * number in their code for determining the SoC type in u-boot. 49f955880fSIan Lepore * 50f955880fSIan Lepore * To-do: put silicon revision numbers into the low-order bits somewhere. 51ec4081c1SIan Lepore */ 52f955880fSIan Lepore #define IMXSOC_51 0x51000000 53f955880fSIan Lepore #define IMXSOC_53 0x53000000 54f955880fSIan Lepore #define IMXSOC_6SL 0x60000000 55f955880fSIan Lepore #define IMXSOC_6DL 0x61000000 56f955880fSIan Lepore #define IMXSOC_6S 0x62000000 57f955880fSIan Lepore #define IMXSOC_6Q 0x63000000 58*c1411a76SIan Lepore #define IMXSOC_6UL 0x64000000 59f955880fSIan Lepore #define IMXSOC_FAMSHIFT 28 60ec4081c1SIan Lepore 61ec4081c1SIan Lepore u_int imx_soc_type(void); 62ec4081c1SIan Lepore u_int imx_soc_family(void); 63ec4081c1SIan Lepore 64ec4081c1SIan Lepore #endif 65ec4081c1SIan Lepore 66