Lines Matching refs:eeprom
1 /* $NetBSD: eeprom.c,v 1.35 2024/12/20 23:52:00 tsutsui Exp $ */
33 * Access functions for the EEPROM (Electrically Eraseable PROM)
35 * handle the painful task of updating the EEPROM contents.
41 __KERNEL_RCSID(0, "$NetBSD: eeprom.c,v 1.35 2024/12/20 23:52:00 tsutsui Exp $");
54 #include <machine/eeprom.h>
60 struct eeprom *eeprom_copy; /* soft copy. */
72 CFATTACH_DECL_NEW(eeprom, 0,
98 if (sizeof(struct eeprom) != EEPROM_SIZE)
99 panic("eeprom struct wrong");
107 /* Keep a "soft" copy of the EEPROM to make access simpler. */
119 /* Do only byte access in the EEPROM. */
143 error = tsleep(&ee_busy, PZERO | PCATCH, "eeprom", 0);
164 * This is called by mem.c to handle /dev/eeprom
199 * Update the EEPROM from the soft copy.
201 * the ONLY place we touch the EEPROM H/W.
228 * EEPROM has a limited number of write cycles.
234 * We have written the EEPROM, so now we must
237 * the EEPROM while it recovers.
239 (void)tsleep(eeprom_va, PZERO - 1, "eeprom", hz / 50);