2 * (C) Copyright 2004-2009 Texas Insturments
5 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
6 * Marius Groeger <mgroeger@sysgo.de>
9 * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
11 * See file CREDITS for list of people who contributed to this
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * version 2 as published by the Free Software Foundation.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
36 /* See also ARM Ref. Man. */
37 #define C1_MMU (1<<0) /* mmu off/on */
38 #define C1_ALIGN (1<<1) /* alignment faults off/on */
39 #define C1_DC (1<<2) /* dcache off/on */
40 #define C1_WB (1<<3) /* merging write buffer on/off */
41 #define C1_BIG_ENDIAN (1<<7) /* big endian off/on */
42 #define C1_SYS_PROT (1<<8) /* system protection */
43 #define C1_ROM_PROT (1<<9) /* ROM protection */
44 #define C1_IC (1<<12) /* icache off/on */
45 #define C1_HIGH_VECTORS (1<<13) /* location of vectors: low/high addresses */
46 #define RESERVED_1 (0xf << 3) /* must be 111b for R/W */
53 unsigned int cortex_a9_rev(void)
58 /* turn off I/D-cache */
59 asm ("mrc p15, 0, %0, c0, c0, 0" : "=r" (i));
64 unsigned int omap_revision(void)
66 switch (cortex_a9_rev()) {
69 return OMAP4430_ES1_0;
72 switch ((__raw_readl(OMAP44XX_CTRL_ID_CODE) >> 28) & 0xF) {
76 return OMAP4430_ES2_0;
78 return OMAP4430_ES2_1;
80 return OMAP4430_ES2_2;
84 return OMAP4430_SILICON_ID_INVALID;