
On 26 Jul 2007 at 17:39, Liew Tsi Chung-r5aahp wrote:
is CFG_UART_PORT (in cpu_init.c) meant to be there? Configurable console port is great, I need it myself, but shouldn´t it be named CONFIG_CONSOLE_PORT or something?
Cannot have too generic name like CONFIG_CONSOLE_PORT. To avoid confusion with others, CFG_UART_PORT is good so far.
OK, was just an idea.
is it useful to have the GPIO part of UART configuration in cpu_init.c? IIRC the console port should be changeable from the environment, then the GPIO setting for the UART should be in mcfuart, or at least somewhere accessible from there
The mcfuart.c not only use for mcf532x or mcf527x but it also use for mcf547x, mcf548x, mcf52x2, etc. Making gpio init to be part of mcfuart.c, isn't that have to change the file if new platform is
added? Unless, you are suggesting such as port_configuration() in mcfuart.c but the actual function is in cpu_init.c something like that? Well, this work for me. And, no environment settings for UART gpio, if the environment value some how corrupted or erased, user will have to use P&E to reprogram.
Maybe others more into basic U-Boot concept should comment here. The solution with port_configuration() in cpu_init.c looks perfect to me, though.
why do we need #ifdef CONFIG_MCFSERIAL in mcfuart.c?
Same reason with ns16550 driver (drivers/ns16550.c). Note: The CONFIG_MCFSERIAL has renamed to CONFIG_MCFUART. Double declaration in configuration file. #define CONFIG_MCFSERIAL and #define CONFIG_MCFUART.
Thanks. I thought the architecture would already be sufficient to compile the correct driver, such that there does not have to be an additional #ifdef in that driver. I will think about it once more. ;-)
gpio->par_timer &= 0x0F; gpio->par_timer |= (GPIO_PAR_TIN3_URXD2 | GPIO_PAR_TIN2_UTXD2);
The TIN out/in is actually transmit/receive signal from these pins. I don't think the u-boot will ever use it, anyware I will change it.
Before, there was gpio->par_uart accessed instead of gpio->par_timer. The "&=" was just additional security.
[CFI already answered by Stefan]
Last but not least, there is a missing #endif at the bottom of mcfuart.h?!
I don't see a missing #endif. It is there!
Funny. It was definitely missing before I first opened mcfuart.h, giving me a compiler parse error. Seems I still have some git problems?!
Regards, TsiChung
Regards, Wolfgang