[U-Boot] [PATCH] MX: serial_mxc: cleanup removing nasty #ifdef
Marek Vasut
marek.vasut at gmail.com
Thu Nov 24 03:44:15 CET 2011
> On Thu, Nov 24, 2011 at 8:08 AM, Marek Vasut <marek.vasut at gmail.com> wrote:
> >> Am 23/11/2011 11:44, schrieb Marek Vasut:
> >> >> On 23/11/2011 03:48, Jason Hui wrote:
> >> >>> From the u-boot/README:
> >> >>>
> >> >>> * Configuration _OPTIONS_:
> >> >>> These are selectable by the user and have names beginning with
> >> >>> "CONFIG_".
> >> >>>
> >> >>> * Configuration _SETTINGS_:
> >> >>> These depend on the hardware etc. and should not be meddled with
> >> >>> if you don't know what you're doing; they have names beginning with
> >> >>> "CONFIG_SYS_".
> >> >>>
> >> >>> It's better to use #define CONFIG_SYS_MXC_UART_BASE UART1_BASE
> >> >>>
> >> >>> [...]
> >> >>
> >> >> Agree, I do it in V2
> >> >>
> >> >> Best regards,
> >> >> Stefano Babic
> >> >
> >> > But this is not completely right. Why CONFIG_SYS, if the user can
> >> > change it quite safely to adjust his serial port.
> >>
> >> So we have a case where we can use CONFIG_ (because it is an option
> >> selectable by user) or CONFIG_SYS_ because it depends on HW... I see
> >> other cases where a CONFIG_ (CONFIG_SERIAL_BASE, CONFIG_FFUART, ..) is
> >> used to select the UART on different SOCs. And I see also other cases
> >> with CONFIG_SYS_ (CONFIG_SYS_UART_BASE, for example). Both are currently
> >> used - I will not change, I think that CONFIG_MXC_UART_BASE explains
> >> already well what is supposed to do.
> >
> > Definitelly.
>
> Really? As I understand:
>
> CONFIG_OPTION is for an option selectable by user, so if we:
> #define CONFIG_OPTION
>
> means we select this feature or something like that.
>
> CONFIG_SYS_XXXX: means the option is depend on the HW, typically,
> it will have one value at the end. For example:
>
> #define CONFIG_SYS_XXX yyy
>
> Since there is a lot of inconsistency in the u-boot. I don't know what is
> definitely correct way.
>
> Maybe, Wolfgang can comment on this?
>
Someone should step up and make it consistent then ;-)
M
More information about the U-Boot
mailing list