FreeBSD/sys/dev/cfi/cfi_core.c
/*
 * Read the contents of the Protection Lock Register.
 */
Read the contents of the Protection Lock Register.
Read the contents of the Protection Lock Register .
int 
cfi_intel_get_plr(struct cfi_softc *sc, uint32_t *plr)
{
	if (sc->sc_cmdset != CFI_VEND_INTEL_ECS)
		return EOPNOTSUPP;
	KASSERT(sc->sc_width == 2, ("sc_width %d", sc->sc_width));
	cfi_write(sc, 0, CFI_INTEL_READ_ID);
	*plr = cfi_get16(sc, CFI_INTEL_PLR);
	cfi_write(sc, 0, CFI_BCS_READ_ARRAY);
	return 0;
}
int cfi_intel_get_plr ( struct cfi_softc * sc , uint32_t * plr ) { if ( sc -> sc_cmdset != CFI_VEND_INTEL_ECS ) return EOPNOTSUPP ; KASSERT ( sc -> sc_width == 2 , ( " " , sc -> sc_width ) ) ; cfi_write ( sc , 0 , CFI_INTEL_READ_ID ) ; * plr = cfi_get16 ( sc , CFI_INTEL_PLR ) ; cfi_write ( sc , 0 , CFI_BCS_READ_ARRAY ) ; return 0 ; }
Read the contents of the Protection Lock Register.
Read the contents of the Protection Lock Register .