7 * Vital Product Data (VPD) Header Module
8 * SCCS identification: %I%
11 * Date newest applied delta was created (MM/DD/YY): %G%
12 * Time newest applied delta was created (HH:MM:SS): %U%
14 * Fully qualified SCCS file name:
17 * (C) COPYRIGHT MOTOROLA, INC. 1996
28 #define VPD_EEPROM_SIZE 256 /* EEPROM size in bytes */
31 * packet tuple identifiers
33 * 0x0D - 0xBF reserved
34 * 0xC0 - 0xFE user defined
36 #define VPD_PID_GI 0x00 /* guaranteed illegal */
37 #define VPD_PID_PID 0x01 /* product identifier (ASCII) */
38 #define VPD_PID_FAN 0x02 /* factory assembly-number (ASCII) */
39 #define VPD_PID_SN 0x03 /* serial-number (ASCII) */
40 #define VPD_PID_PCO 0x04 /* product configuration options(binary) */
41 #define VPD_PID_ICS 0x05 /* internal clock speed in HZ (integer) */
42 #define VPD_PID_ECS 0x06 /* external clock speed in HZ (integer) */
43 #define VPD_PID_RCS 0x07 /* reference clock speed in HZ(integer) */
44 #define VPD_PID_EA 0x08 /* ethernet address (binary) */
45 #define VPD_PID_MT 0x09 /* microprocessor type (ASCII) */
46 #define VPD_PID_CRC 0x0A /* EEPROM CRC (integer) */
47 #define VPD_PID_FMC 0x0B /* FLASH memory configuration (binary) */
48 #define VPD_PID_VLSI 0x0C /* VLSI revisions/versions (binary) */
49 #define VPD_PID_TERM 0xFF /* termination */
52 * VPD structure (format)
54 #define VPD_EYE_SIZE 8 /* eyecatcher size */
55 typedef struct vpd_header
57 uchar eyecatcher[VPD_EYE_SIZE]; /* eyecatcher - "MOTOROLA" */
58 ushort size; /* size of EEPROM */
61 #define VPD_DATA_SIZE (VPD_EEPROM_SIZE-sizeof(vpd_header_t))
64 vpd_header_t header; /* header */
65 uchar packets[VPD_DATA_SIZE]; /* data */
69 * packet tuple structure (format)
71 typedef struct vpd_packet
73 uchar identifier; /* identifier (PIDs above) */
74 uchar size; /* size of the following data area */
75 uchar data[1]; /* data (size is dependent upon PID) */
79 * MBX product configuration options bit definitions
82 * 1. The bit numbering is reversed in perspective with the C compiler.
84 #define PCO_BBRAM (1<<0) /* battery-backed RAM (BBRAM) and socket */
85 #define PCO_BOOTROM (1<<1) /* boot ROM and socket (i.e., socketed FLASH) */
86 #define PCO_KAPWR (1<<2) /* keep alive power source (lithium battey) and control circuit */
87 #define PCO_ENET_TP (1<<3) /* ethernet twisted pair (TP) connector (RJ45) */
88 #define PCO_ENET_AUI (1<<4) /* ethernet attachment unit interface (AUI) header */
89 #define PCO_PCMCIA (1<<5) /* PCMCIA socket */
90 #define PCO_DIMM (1<<6) /* DIMM module socket */
91 #define PCO_DTT (1<<7) /* digital thermometer and thermostat (DTT) device */
92 #define PCO_LCD (1<<8) /* liquid crystal display (LCD) device */
93 #define PCO_PCI (1<<9) /* PCI-Bus bridge device (QSpan) and ISA-Bus bridge device (Winbond) */
94 #define PCO_PCIO (1<<10) /* PC I/O (COM1, COM2, FDC, LPT, Keyboard/Mouse) */
95 #define PCO_EIDE (1<<11) /* enhanced IDE (EIDE) header */
96 #define PCO_FDC (1<<12) /* floppy disk controller (FDC) header */
97 #define PCO_LPT_8XX (1<<13) /* parallel port header via MPC8xx */
98 #define PCO_LPT_PCIO (1<<14) /* parallel port header via PC I/O */
101 * FLASH memory configuration packet data
103 typedef struct vpd_fmc
105 ushort mid; /* manufacturer's idenitfier */
106 ushort did; /* manufacturer's device idenitfier */
107 uchar ddw; /* device data width (e.g., 8-bits, 16-bits) */
108 uchar nod; /* number of devices present */
109 uchar noc; /* number of columns */
110 uchar cw; /* column width in bits */
111 uchar wedw; /* write/erase data width */
114 /* function prototypes */
115 extern void vpd_init(void);
116 extern int vpd_read(uint iic_device, uchar *buf, int count, int offset);
117 extern vpd_packet_t *vpd_find_packet(u_char ident);