[U-Boot] [PATCH 1/1] mx5: drop boot cause code from board support code
Stefano Babic
sbabic at denx.de
Thu Apr 21 19:18:30 CEST 2011
On 04/20/2011 12:47 PM, Jason Liu wrote:
> The boot cause code has been factor out to soc common
> code,we need drop the part from the board support code
>
> Signed-off-by: Jason Liu <jason.hui at linaro.org>
Hi Jason,
> ---
> board/efikamx/efikamx.c | 30 ++++++------------------------
> board/freescale/mx51evk/mx51evk.c | 26 ++++++--------------------
> board/freescale/mx53evk/mx53evk.c | 21 +--------------------
> board/ttcontrol/vision2/vision2.c | 28 ++++++----------------------
> 4 files changed, 19 insertions(+), 86 deletions(-)
>
> diff --git a/board/efikamx/efikamx.c b/board/efikamx/efikamx.c
> index f735260..0aef654 100644
> --- a/board/efikamx/efikamx.c
> +++ b/board/efikamx/efikamx.c
> @@ -644,46 +644,28 @@ int board_late_init(void)
> int checkboard(void)
> {
> u32 system_rev = get_cpu_rev();
> - u32 cause;
> - struct src *src_regs = (struct src *)SRC_BASE_ADDR;
This seems to me not the best solution. If we have now factored out code
to print the reset cause and the silicon version (inside print_cpuinfo),
why do we need to repeat this code for each board ? Calling get_cpu_rev
seems to me redundant (then each board should only set
CONFIG_DISPLAY_CPUINFO). And then the CPU revision is printed again, and
this is redundant.
>
> puts("Board: Efika MX ");
>
> switch (system_rev & 0xff) {
As I see in code, in system_rev & 0xff we can find the cpu revision, and
the output is already part of print_cpuinfo.
I think we need more clean up, removing all part related to CPU revision
and leaving (if any) only the output related to the board revision.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
More information about the U-Boot
mailing list