[U-Boot] [PATCH 5/5] MIPS: Malta: convert to generic board
Daniel Schwierzeck
daniel.schwierzeck at gmail.com
Sun Apr 6 20:58:16 CEST 2014
2014-04-04 13:20 GMT+02:00 Paul Burton <paul.burton at imgtec.com>:
> This patch converts the MIPS Malta development board to make use of the
> generic board code now that it is supported on MIPS.
>
> Signed-off-by: Paul Burton <paul.burton at imgtec.com>
> ---
> board/imgtec/malta/malta.c | 9 ++++-----
> include/configs/malta.h | 3 +++
> 2 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/board/imgtec/malta/malta.c b/board/imgtec/malta/malta.c
> index d363e49..0f16b74 100644
> --- a/board/imgtec/malta/malta.c
> +++ b/board/imgtec/malta/malta.c
> @@ -19,6 +19,8 @@
>
> #include "superio.h"
>
> +DECLARE_GLOBAL_DATA_PTR;
> +
> enum core_card {
> CORE_UNKNOWN,
> CORE_LV,
> @@ -82,11 +84,6 @@ static enum sys_con malta_sys_con(void)
> }
> }
>
> -phys_size_t initdram(int board_type)
> -{
> - return CONFIG_SYS_MEM_SIZE;
> -}
> -
> int checkboard(void)
> {
> enum core_card core;
> @@ -129,6 +126,8 @@ int board_early_init_f(void)
> {
> void *io_base;
>
> + gd->ram_size = CONFIG_SYS_MEM_SIZE;
> +
> /* choose correct PCI I/O base */
> switch (malta_sys_con()) {
> case SYSCON_GT64120:
I would prefer to enable the according init funtions in board_f,c for
MIPS, so that all MIPS boards can be converted without changing such
code.
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -173,7 +173,7 @@ static int announce_dram_init(void)
return 0;
}
-#ifdef CONFIG_PPC
+#if defined(CONFIG_PPC) || defined(CONFIG_MIPS)
static int init_func_ram(void)
{
#ifdef CONFIG_BOARD_TYPES
@@ -889,7 +889,7 @@ static init_fnc_t init_sequence_f[] = {
#ifdef CONFIG_ARM
dram_init, /* configure available RAM banks */
#endif
-#ifdef CONFIG_PPC
+#if defined(CONFIG_PPC) || defined(CONFIG_MIPS)
init_func_ram,
#endif
#ifdef CONFIG_POST
BTW: there are other canditates too, which are implemented in the same
way as PowerPC or ARM and which should be also enabled for MIPS, e.g.
init_timer
--
- Daniel
More information about the U-Boot
mailing list