From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 06/10] ARM Add New Board GEC2410
Date: Sat, 31 Oct 2009 21:13:20 +0100 [thread overview]
Message-ID: <20091031201321.066CBC88C7@gemini.denx.de> (raw)
In-Reply-To: <28c8c0b4de93d8f48e61ff560c4537768b4e1455.1256898456.git.zetalabs@gmail.com>
Dear "Hui.Tang",
In message <28c8c0b4de93d8f48e61ff560c4537768b4e1455.1256898456.git.zetalabs@gmail.com> you wrote:
> GEC2410 Boot from NAND FLASH.
>
> Signed-off-by: Hui.Tang <zetalabs@gmail.com>
> ---
> cpu/arm920t/start.S | 36 ++++++++++++++++++++++++++++++++++++
> 1 files changed, 36 insertions(+), 0 deletions(-)
>
> diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S
> index 114427a..d8b832a 100644
> --- a/cpu/arm920t/start.S
> +++ b/cpu/arm920t/start.S
> @@ -27,6 +27,10 @@
> #include <common.h>
> #include <config.h>
>
> +#if !defined(CONFIG_ENABLE_MMU) && !defined(CONFIG_SYS_PHY_UBOOT_BASE)
> +#define CONFIG_SYS_PHY_UBOOT_BASE CONFIG_SYS_UBOOT_BASE
> +#endif
Please don't add such defines to global code. Also, CONFIG_SYS_*
variables get set in board config files, not in some low level source
code.
> +/*
> + * Below variable is very important because we use MMU in U-Boot.
do we?
> + * Without it, we cannot run code correctly before MMU is ON.
> + * by scsuh.
What does "by scsuh." mean?
> +_TEXT_PHY_BASE:
> + .word CONFIG_SYS_PHY_UBOOT_BASE
Why would that be needed?
> +#ifndef CONFIG_NAND_SPL
> bl coloured_LED_init
> bl red_LED_on
> +#endif
in which way do LED's depend on NAND booting?
> +#ifndef CONFIG_NAND_SPL
> #ifndef CONFIG_SKIP_RELOCATE_UBOOT
> relocate: /* relocate U-Boot to RAM */
> adr r0, _start /* r0 <- current position of code */
> @@ -194,9 +216,13 @@ copy_loop:
> cmp r0, r2 /* until source end addreee [r2] */
> ble copy_loop
> #endif /* CONFIG_SKIP_RELOCATE_UBOOT */
> +#endif /* CONFIG_NAND_SPL */
>
> /* Set up the stack */
> stack_setup:
> +#ifdef CONFIG_MEMORY_UPPER_CODE
> + ldr sp, =(CONFIG_SYS_UBOOT_BASE + CONFIG_SYS_UBOOT_SIZE - 0xc)
> +#else
I don;t really like this growing amount of #ifdefs in this global
code. Isn't there some better way to implement this?
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
Far back in the mists of ancient time, in the great and glorious days
of the former Galactic Empire, life was wild, rich and largely tax
free. - Douglas Adams, _The Hitchhiker's Guide to the Galaxy_
next prev parent reply other threads:[~2009-10-31 20:13 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-30 10:39 [U-Boot] [PATCH 01/10] ARM Add New Board GEC2410 Hui.Tang
2009-10-30 10:39 ` [U-Boot] [PATCH 02/10] " Hui.Tang
2009-10-30 10:39 ` [U-Boot] [PATCH 03/10] " Hui.Tang
2009-10-30 10:39 ` [U-Boot] [PATCH 04/10] " Hui.Tang
2009-10-30 10:39 ` [U-Boot] [PATCH 05/10] " Hui.Tang
2009-10-30 10:39 ` [U-Boot] [PATCH 06/10] " Hui.Tang
2009-10-30 10:39 ` [U-Boot] [PATCH 07/10] " Hui.Tang
2009-10-30 10:39 ` [U-Boot] [PATCH 08/10] " Hui.Tang
2009-10-30 10:39 ` [U-Boot] [PATCH 09/10] " Hui.Tang
2009-10-30 10:39 ` [U-Boot] [PATCH 10/10] " Hui.Tang
2009-10-31 20:16 ` Wolfgang Denk
2009-10-31 20:15 ` [U-Boot] [PATCH 09/10] " Wolfgang Denk
2009-10-31 20:15 ` [U-Boot] [PATCH 08/10] " Wolfgang Denk
2009-11-03 12:14 ` Hui Tang
2009-11-03 13:28 ` Wolfgang Denk
2009-10-30 12:56 ` [U-Boot] [PATCH 07/10] " Ben Warren
2009-10-31 20:13 ` Wolfgang Denk [this message]
2009-10-31 20:05 ` [U-Boot] [PATCH 05/10] " Wolfgang Denk
2009-10-31 20:01 ` [U-Boot] [PATCH 04/10] " Wolfgang Denk
2009-11-03 4:08 ` Hui Tang
2009-11-03 10:27 ` Minkyu Kang
2009-11-03 11:58 ` Hui Tang
2009-11-03 13:16 ` Wolfgang Denk
2009-11-03 13:07 ` Wolfgang Denk
2009-10-30 12:58 ` [U-Boot] [PATCH 03/10] " Ben Warren
2009-10-31 19:58 ` Wolfgang Denk
2009-10-31 19:59 ` Wolfgang Denk
2009-10-31 19:52 ` [U-Boot] [PATCH 01/10] " Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091031201321.066CBC88C7@gemini.denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox