Lines Matching +full:read +full:- +full:delay
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)
13 #define EEPROM_READ 0xc000 /* serial memory read */
18 #define EEPROM_PRREAD 0xc000 /* read protect register */
31 #define delay() ({ \ macro
39 delay(); \
61 ser_cmd = cmd | (reg << (16 - BITS_IN_COMMAND)); in eeprom_cmd()
68 delay(); in eeprom_cmd()
70 delay(); in eeprom_cmd()
89 delay(); in ip22_eeprom_read()
91 delay(); in ip22_eeprom_read()
105 * Read specified register from main NVRAM
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()