[U-Boot] use "boot select" jumper on NGW100 to select USART

Wolfgang Denk wd at denx.de
Tue Nov 10 11:48:39 CET 2009


Dear Thomas,

In message <e355f1140911092249l5c585dedy6970a9f8ce663b8f at mail.gmail.com> you wrote:
>
> So the patch for atmel_usart.c would look like this:
>
>  	hmatrix_slave_write(EBI, SFR, HMATRIX_BIT(EBI_SDRAM_ENABLE));
>
>  	portmux_enable_ebi(16, 23, 0, PORTMUX_DRIVE_HIGH);
> -	portmux_enable_usart1(PORTMUX_DRIVE_MIN);
> +
> +	USART_JUMPER_CONFIG();
> +	atmel_usart_enable();

Why not make USART_JUMPER_CONFIG() a function as well?

> or should USART_USE_ALT and USART_JUMPER_CONFIG become static inline
> functions (as below)?

That would probably be better, indeed.

> I was trying to make as little impact as possible, somehow a macro
> seemed 'better' than a function.

See "Documentation/CodingStyle", Chapter 12: Macros, Enums and RTL:

	Generally, inline functions are preferable to macros
	resembling functions.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
How many hardware guys does it take to change a light bulb? "Well the
diagnostics say it's fine buddy, so it's a software problem."


More information about the U-Boot mailing list