
We have a built a custom board with onboard flash and using CFI. Our design supports a jumper that enables hardware write-protection on the flash, but u-boot will not come up with the jumper installed. It fails due to code in drivers/cfi_flash.c that must write a command word to detect the flash configuration.
Is there an elegant way to override the CFI discovery process, prefilling flash_info[] with the details of our flash hardware? Our board will boot if we hardcode our flash settings and bypass auto-detection, but I was wondering if somebody has a patch to cfi_flash.c to do it through configuration parameters.
In case you are wondering, we cannot use software write-protect because our equipment must conform with a security directive from the U.S. Department of Defense, paraphrased: "There shall be no user-modifiable, non-removable, persistent storage." The onboard flash cannot be removed from the unit, and therefore may not be allowed to be written by an operator (e.g., by stopping in u-boot). Forcing somebody to disassemble the unit to switch a jumper is apparently acceptable to the security guys.
Thanks,
Ed Jubenville