1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2415a613bSKumar Gala /* 3415a613bSKumar Gala * Copyright 2004 Freescale Semiconductor. 4415a613bSKumar Gala */ 5415a613bSKumar Gala 6415a613bSKumar Gala #ifndef __EEPROM_H_ 7415a613bSKumar Gala #define __EEPROM_H_ 8415a613bSKumar Gala 9415a613bSKumar Gala 10415a613bSKumar Gala /* 11415a613bSKumar Gala * EEPROM Board System Register interface. 12415a613bSKumar Gala */ 13415a613bSKumar Gala 14415a613bSKumar Gala 15415a613bSKumar Gala /* 16415a613bSKumar Gala * CPU Board Revision 17415a613bSKumar Gala */ 18415a613bSKumar Gala #define MPC85XX_CPU_BOARD_REV(maj, min) ((((maj)&0xff) << 8) | ((min) & 0xff)) 19415a613bSKumar Gala #define MPC85XX_CPU_BOARD_MAJOR(rev) (((rev) >> 8) & 0xff) 20415a613bSKumar Gala #define MPC85XX_CPU_BOARD_MINOR(rev) ((rev) & 0xff) 21415a613bSKumar Gala 22415a613bSKumar Gala #define MPC85XX_CPU_BOARD_REV_UNKNOWN MPC85XX_CPU_BOARD_REV(0,0) 23415a613bSKumar Gala #define MPC85XX_CPU_BOARD_REV_1_0 MPC85XX_CPU_BOARD_REV(1,0) 24415a613bSKumar Gala #define MPC85XX_CPU_BOARD_REV_1_1 MPC85XX_CPU_BOARD_REV(1,1) 25415a613bSKumar Gala 26415a613bSKumar Gala /* 27415a613bSKumar Gala * Returns CPU board revision register as a 16-bit value with 28415a613bSKumar Gala * the Major in the high byte, and Minor in the low byte. 29415a613bSKumar Gala */ 30415a613bSKumar Gala extern unsigned int get_cpu_board_revision(void); 31415a613bSKumar Gala 32415a613bSKumar Gala 33415a613bSKumar Gala #endif /* __CADMUS_H_ */ 34