[U-Boot] [PATCH V5 3/3] Add support for the LaCie ED Mini V2 board
Prafulla Wadaskar
prafulla at marvell.com
Fri Apr 9 08:33:08 CEST 2010
> -----Original Message-----
> From: u-boot-bounces at lists.denx.de
> [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Albert Aribaud
> Sent: Friday, April 09, 2010 2:41 AM
> To: U-Boot at lists.denx.de
> Subject: [U-Boot] [PATCH V5 3/3] Add support for the LaCie ED
> Mini V2 board
>
> This patch adds support for the LaCie ED Mini V2 product
> which is based on the Marvell Orion5x SoC.
>
> Signed-off-by: Albert Aribaud <albert.aribaud at free.fr>
> ---
> MAINTAINERS | 4 +
> MAKEALL | 1 +
> Makefile | 3 +
> board/LaCie/edminiv2/Makefile | 58 +++++++++++
> board/LaCie/edminiv2/board_lowlevel_init.S | 55 ++++++++++
> board/LaCie/edminiv2/config.mk | 27 +++++
> board/LaCie/edminiv2/edminiv2.c | 93 ++++++++++++++++++
> board/LaCie/edminiv2/edminiv2.h | 54 ++++++++++
> include/configs/edminiv2.h | 147
> ++++++++++++++++++++++++++++
> 9 files changed, 442 insertions(+), 0 deletions(-)
> create mode 100644 board/LaCie/edminiv2/Makefile
> create mode 100644 board/LaCie/edminiv2/board_lowlevel_init.S
> create mode 100644 board/LaCie/edminiv2/config.mk
> create mode 100644 board/LaCie/edminiv2/edminiv2.c
> create mode 100644 board/LaCie/edminiv2/edminiv2.h
> create mode 100644 include/configs/edminiv2.h
>
..snip...
> +++ b/board/LaCie/edminiv2/board_lowlevel_init.S
> @@ -0,0 +1,55 @@
> +/************************************************************
> *******************
> +Copyright (c) Albert ARIBAUD <albert.aribaud at free.fr>
> +Redistributed under GPLv2, pursuant to the licensing terms
> +of the original Marvell U-boot code which is:
> +Copyright (C) Marvell International Ltd. and its affiliates
> +*************************************************************
> *******************
> +Marvell GPL License Option
Use std GPl statement, Remove Marvell GPL
> +
> +If you received this File from Marvell, you may opt to use,
> redistribute and/or
> +modify this File in accordance with the terms and conditions
> of the General
> +Public License Version 2, June 1991 (the "GPL License"), a
> copy of which is
> +available along with the File in the license.txt file or by
> writing to the Free
> +Software Foundation, Inc., 59 Temple Place, Suite 330,
> Boston, MA 02111-1307 or
> +on the worldwide web at http://www.gnu.org/licenses/gpl.txt.
> +
> +THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND,
> AND THE IMPLIED
> +WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
> PURPOSE ARE EXPRESSLY
> +DISCLAIMED. The GPL License provides additional details
> about this warranty
> +disclaimer.
> +
> +*************************************************************
> ******************/
> +
> +#include "edminiv2.h"
> +
> +/*
> + * Low-level init happens right after start.S has switched to SVC32,
> + * flushed and disabled caches and disabled MMU. We're still running
> + * from the boot chip select, so the first thing we should do is set
> + * up RAM for us to relocate into.
> + *
> + * board_low_level_init is called by the Orion5x lowlevel_init code,
> + * and sets up board-specifics such as MPPs and GPIOs.
> + */
> +
Its good if you can embedd this code in #ifndef CONFIG_SKIP_BOARD_LOWLEVEL_INIT
And the same in lowlevel_init.S in patch 1/3.
BTW: lowlevel_init.S is board specific, you can move it to this patch and merge this file with it.
Secondly, its better if you can avoide Assembly code so far it is possible, you can very well use C functionas for below.
Thirdly, I still prefer the only DRAM init code should go in lowlevel_init.S, rest other code should go in cpu.c/<board>.c (even init mpp/gpio)
> +.globl board_lowlevel_init
> +
> +board_lowlevel_init:
> +
> + /* Use R3 as the base for Device Bus registers */
> + add r3, r4, #0x10000
> +
> + /* init MPPs */
> + ldr r6, =EDMINIV2_MPP0_7
> + str r6, [r3, #0x000]
> + ldr r6, =EDMINIV2_MPP8_15
> + str r6, [r3, #0x004]
> + ldr r6, =EDMINIV2_MPP16_23
> + str r6, [r3, #0x050]
> +
> + /* init GPIOs */
> + ldr r6, =EDMINIV2_GPIO_OUT_ENABLE
> + str r6, [r3, #0x104]
> +
> + /* Return to lowlevel_init via saved link register */
> + mov pc, lr
Regards..
Prafulla . .
More information about the U-Boot
mailing list