Lines Matching +full:pm +full:- +full:api

1 // SPDX-License-Identifier: GPL-2.0+
4 * Copyright 2006, 2008-2009, 2011 Freescale Semiconductor
6 * This defines the API for storing board information in the
8 * Freescale API, but has a number of key differences. Because
10 * Varisys version of the API is implemented separately here.
33 u8 id[4]; /* 0x00 - 0x03 EEPROM Tag 'NXID' */
34 u8 sn[12]; /* 0x04 - 0x0F Serial Number */
35 u8 errata[5]; /* 0x10 - 0x14 Errata Level */
36 u8 date[6]; /* 0x15 - 0x1a Build Date */
38 u32 version; /* 0x1c - 0x1f NXID Version */
39 u8 tempcal[8]; /* 0x20 - 0x27 Temperature Calibration Factors */
40 u8 tempcalsys[2]; /* 0x28 - 0x29 System Temperature Calibration Factors */
42 u8 res_1[21]; /* 0x2b - 0x3f Reserved */
45 u8 mac[MAX_NUM_PORTS][6]; /* 0x42 - x MAC addresses */
59 static int eeprom_bus_num = -1;
74 * show_eeprom - display the contents of the EEPROM
100 e.date[3] & 0x80 ? "PM" : ""); in show_eeprom()
110 crc = crc32(0, (void *)&e, sizeof(e) - 4); in show_eeprom()
124 if (((i % 16) == 15) || (i == sizeof(e) - 1)) in show_eeprom()
131 * read_eeprom - read the EEPROM into memory
140 return -1; in read_eeprom()
168 * update_crc - update the CRC
182 * prog_eeprom - write the EEPROM from memory
193 return -1; in prog_eeprom()
211 p, min((int)(sizeof(e) - i), 8)); in prog_eeprom()
224 ret = -1; in prog_eeprom()
232 return -1; in prog_eeprom()
240 * h2i - converts hex character into a number
248 return p - '0'; in h2i()
251 return (p - 'A') + 10; in h2i()
254 return (p - 'a') + 10; in h2i()
260 * set_date - stores the build date into the EEPROM
263 * (2-digit year, 2-digit month, etc), converts it to a 6-byte BCD string,
282 * set_mac_address - stores a MAC address into the EEPROM
285 * (i.e."XX:XX:XX:XX:XX:XX", where "XX" is a two-digit hex number) and
352 strncpy((char *)e.sn, argv[2], sizeof(e.sn) - 1); in do_mac()
422 * mac_read_from_eeprom - read the MAC addresses from EEPROM
428 * This ensures that any user-saved variables are never overwritten.
432 * For NXID v1 EEPROMs, we support loading and up-converting the older NXID v0