
Dear Haavard Skinnemoen,
In message 20080811131944.500ef1e9@hskinnemo-gx745.norway.atmel.com you wrote:
The intention is to allow boards to use a single serial port for two purposes: Communicating with some other device (which will get really confused if u-boot interferes) and as a debug port. The user/developer must have a way to switch between the two roles, and if the first role is selected, u-boot must stay the hell away from the serial port.
I understand this. But then, the "silencing" should be done based on the jumper setting ONLY, without any environment variable setting.
The user will be able to switch between the two by means of an on-board jumper, so if he needs to interact with u-boot, he can simply flip the jumper and hook up a PC.
If the user typed "setenv silent=1;saveenv;reset" then hooking up a PC will not help at all because he still has a "silent" board.
But I guess there's another side-effect from this patch which is somewhat more nasty: The user can _also_ disable the debug port by simply setting an environment variable. That might be a bad idea, and probably not even necessary for Mark's purposes.
Now you get it. That's what the whole discussion is about. See Detlev's posting that started it.
So how about introducing a new flag, e.g. GD_FLG_DISABLE_CONSOLE, and use that instead? If set, it will disable both input and output, while GD_FLG_SILENT will just disable console output.
Sounds much better to me.
Best regards,
Wolfgang Denk