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