xref: /rk3399_rockchip-uboot/board/freescale/common/eeprom.h (revision 415a613babb84d5e5d5b42e8e553868c71fc3a64)
1*415a613bSKumar Gala /*
2*415a613bSKumar Gala  * Copyright 2004 Freescale Semiconductor.
3*415a613bSKumar Gala  *
4*415a613bSKumar Gala  * See file CREDITS for list of people who contributed to this
5*415a613bSKumar Gala  * project.
6*415a613bSKumar Gala  *
7*415a613bSKumar Gala  * This program is free software; you can redistribute it and/or
8*415a613bSKumar Gala  * modify it under the terms of the GNU General Public License as
9*415a613bSKumar Gala  * published by the Free Software Foundation; either version 2 of
10*415a613bSKumar Gala  * the License, or (at your option) any later version.
11*415a613bSKumar Gala  *
12*415a613bSKumar Gala  * This program is distributed in the hope that it will be useful,
13*415a613bSKumar Gala  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14*415a613bSKumar Gala  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
15*415a613bSKumar Gala  * GNU General Public License for more details.
16*415a613bSKumar Gala  *
17*415a613bSKumar Gala  * You should have received a copy of the GNU General Public License
18*415a613bSKumar Gala  * along with this program; if not, write to the Free Software
19*415a613bSKumar Gala  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20*415a613bSKumar Gala  * MA 02111-1307 USA
21*415a613bSKumar Gala  */
22*415a613bSKumar Gala 
23*415a613bSKumar Gala #ifndef __EEPROM_H_
24*415a613bSKumar Gala #define __EEPROM_H_
25*415a613bSKumar Gala 
26*415a613bSKumar Gala 
27*415a613bSKumar Gala /*
28*415a613bSKumar Gala  * EEPROM Board System Register interface.
29*415a613bSKumar Gala  */
30*415a613bSKumar Gala 
31*415a613bSKumar Gala 
32*415a613bSKumar Gala /*
33*415a613bSKumar Gala  * CPU Board Revision
34*415a613bSKumar Gala  */
35*415a613bSKumar Gala #define MPC85XX_CPU_BOARD_REV(maj, min)	((((maj)&0xff) << 8) | ((min) & 0xff))
36*415a613bSKumar Gala #define MPC85XX_CPU_BOARD_MAJOR(rev)	(((rev) >> 8) & 0xff)
37*415a613bSKumar Gala #define MPC85XX_CPU_BOARD_MINOR(rev)	((rev) & 0xff)
38*415a613bSKumar Gala 
39*415a613bSKumar Gala #define MPC85XX_CPU_BOARD_REV_UNKNOWN	MPC85XX_CPU_BOARD_REV(0,0)
40*415a613bSKumar Gala #define MPC85XX_CPU_BOARD_REV_1_0	MPC85XX_CPU_BOARD_REV(1,0)
41*415a613bSKumar Gala #define MPC85XX_CPU_BOARD_REV_1_1	MPC85XX_CPU_BOARD_REV(1,1)
42*415a613bSKumar Gala 
43*415a613bSKumar Gala /*
44*415a613bSKumar Gala  * Returns CPU board revision register as a 16-bit value with
45*415a613bSKumar Gala  * the Major in the high byte, and Minor in the low byte.
46*415a613bSKumar Gala  */
47*415a613bSKumar Gala extern unsigned int get_cpu_board_revision(void);
48*415a613bSKumar Gala 
49*415a613bSKumar Gala 
50*415a613bSKumar Gala #endif	/* __CADMUS_H_ */
51