
Dear Timur,
In message 4FB67191.4030000@freescale.com you wrote:
For example, what happens when I just use "md" or "itest *addr" or similar trying to read NOR flash while the display is on?
The reason I make a big deal about saveenv is because I use an environment variable ("video-mode") to enable video support. Once the console is switched to the video display, the only way to switch it back to the serial port is to delete the environment variable, save the environment, and reboot.
Please try to look over the rim of your plate. Even if you make "saveenv" work with some magic, your end users may have a zillion other ideas why they want to access the flash - for example, to store a copy of the environment created using "env export", or to reload such a saved profile using "env import". Why should their needs be ignored?
Feel free to provide commands to switch mode, but don't lard the code with hooks here and there trying to fix what cannot be fixed.
Is there a way to switch the console
Sure. Delete the env var, switch mode to flash access, run saveenv, run reset.
Best regards,
Wolfgang Denk