Lines Matching +full:write +full:- +full:protect
1 // SPDX-License-Identifier: GPL-2.0
3 * ip22-nvram.c: NVRAM and serial EEPROM handling.
5 * Copyright (C) 2003 Ladislav Michl (ladis@linux-mips.org)
14 #define EEPROM_WEN 0x9800 /* write enable before prog modes */
15 #define EEPROM_WRITE 0xa000 /* serial memory write */
16 #define EEPROM_WRALL 0x8800 /* write all registers */
18 #define EEPROM_PRREAD 0xc000 /* read protect register */
19 #define EEPROM_PREN 0x9800 /* enable protect register mode */
20 #define EEPROM_PRCLEAR 0xffff /* clear protect register */
21 #define EEPROM_PRWRITE 0xa000 /* write protect register */
22 #define EEPROM_PRDS 0x8000 /* disable protect register, forever */
24 #define EEPROM_EPROT 0x01 /* Protect register enable */
61 ser_cmd = cmd | (reg << (16 - BITS_IN_COMMAND)); in eeprom_cmd()
112 return ip22_eeprom_read(&hpc3c0->eeprom, reg); in ip22_nvram_read()
117 tmp = hpc3c0->bbram[reg++] & 0xff; in ip22_nvram_read()
118 return (tmp << 8) | (hpc3c0->bbram[reg] & 0xff); in ip22_nvram_read()