
Dear Sascha,
in message 20070703223156.GD8839@pengutronix.de you wrote:
Yes, but "provide a little bit of debug output" means printf() and friends, plus console drivers, which in turn means reading the environment (for the console baudrate) and probably the device tree (for the hardware configuration of the console port), etc.
I think you're talking about two different things here. The debug output
No, actually I'm not.
you want to see has nothing to do with the output in normal use. When bringing up a green board I would not ask the environment for the baudrate, because there is none.
You are right as far as dedicated debug output is concerned, which is normally not active or even present in the code of a release version. But please see my other messages: I still want to be able to *see* what's going on in my system and where it eventually might get stuck, including in the release versions of the code.
Thinking about this U-Boot already has this. Only the way it is done became very messy over the years. Not only this mailing list but also the code looks like a struggling between the people who want early debug output and the people who want to configure their console in the environment, possibly disabling it completely. People with multiple serial ports not to mention...
Please be aware that work is going on to make hardware features (including the console port) configurable at runtime by interpreting information passed in a device tree image. This is a requirement that makes things even more complicated here. And one that cannot be dropped easily as it solves a real problem for a couple of users.
The console thing is symptomatic for other cases in U-Boot aswell. This is why I think we need to start with a cleaner codebase where a driver or board support only enters after it works with a to be defined API.
Well, then we have to make sure that console driver can be entered very, very early. Ideally, it is the first thing U-Boot should do.
Assume something like a MPC8xx with console on SMC1 or SMC2, depending on that the device tree says...
Sounds like calling the president for turning on the lights. Please do
I'm not sure what you mean here.
not forget that there are also other people. None of our customers ever asked for a even configurable console. 115200 port0 seems to fit everyone. Instead we have to deal with Booting from small boot sectors.
I never said that U-Boot was a trivial thing, and I am very well aware that we have a wide range of requirements, which sometimes may even be conflicting.
We are discussing these things here so that you understand our requirements, as we understand yours. Then lets together find a solution which works for everybody.
Best regards,
Wolfgang Denk