Initial support for Marvell Orion5x SoC
Subsystems (2)
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
This patch adds support for the Marvell Orion5x SoC. It has no use alone, and must be followed by a patch to add Orion5x support for serial, then support for the ED Mini V2, an Orion5x-based product from LaCie.
---
Patchset history
V1: Initial monolithic patch.
V2: split in three patches : orion, serial, edmini;
checkpatch'ed, with only 6 errors, in patch 1/3, all 6 errors being false positives.
V3: useless GPIO and MPP programming support removed;
low level init added/CONFIG_SKIP_LOW_LEVEL_INIT removed.
V4: all files licensed GPLv2-only removed;
RAM bank size detection now uses get_ram_size().
V5: Replaced macros by C structs in dram code.
Removed compilation warnings in dram code.
Added comments to legacy flash definitions. Split low level init code into SoC- and Chip-specifics.
V6: Set copyright dates to 2010, and put standard GPL notice
mentioning Marvell's copyright on *_lowlevel_init.S files.
Patch 1 of 3 still checkpatches with 6 spurious errors and one spurious warning. Patches 2 and 3 have 0 errors and 0 warnings.
cpu/arm926ejs/orion5x/Makefile | 55 ++++++ cpu/arm926ejs/orion5x/cpu.c | 263 ++++++++++++++++++++++++++ cpu/arm926ejs/orion5x/dram.c | 63 +++++++ cpu/arm926ejs/orion5x/lowlevel_init.S | 298 ++++++++++++++++++++++++++++++ cpu/arm926ejs/orion5x/timer.c | 181 ++++++++++++++++++ include/asm-arm/arch-orion5x/cpu.h | 203 ++++++++++++++++++++ include/asm-arm/arch-orion5x/mv88f5182.h | 40 ++++ include/asm-arm/arch-orion5x/orion5x.h | 69 +++++++ 8 files changed, 1172 insertions(+), 0 deletions(-) create mode 100644 cpu/arm926ejs/orion5x/Makefile create mode 100644 cpu/arm926ejs/orion5x/cpu.c create mode 100644 cpu/arm926ejs/orion5x/dram.c create mode 100644 cpu/arm926ejs/orion5x/lowlevel_init.S create mode 100644 cpu/arm926ejs/orion5x/timer.c create mode 100644 include/asm-arm/arch-orion5x/cpu.h create mode 100644 include/asm-arm/arch-orion5x/mv88f5182.h create mode 100644 include/asm-arm/arch-orion5x/orion5x.h
cpu/arm926ejs/orion5x/Makefile new file +55 -0
@@ -0,0 +1,55 @@ +# +# Copyright (C) 2010 Albert ARIBAUD <[email protected]> +# +# Based on original Kirkwood support which is +# (C) Copyright 2009 +# Marvell Semiconductor <www.marvell.com> +# Written-by: Prafulla Wadaskar <[email protected]> +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(SOC).a + +COBJS-y = cpu.o +COBJS-y += dram.o +COBJS-y += timer.o + +ifndef CONFIG_SKIP_LOWLEVEL_INIT +SOBJS := lowlevel_init.o +endif + +SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) + +all: $(obj).depend $(LIB) + +$(LIB): $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
cpu/arm926ejs/orion5x/cpu.c new file +263 -0
263 lines not on this page · raw message
cpu/arm926ejs/orion5x/dram.c new file +63 -0
63 lines not on this page · raw message
cpu/arm926ejs/orion5x/lowlevel_init.S new file +298 -0
298 lines not on this page · raw message
cpu/arm926ejs/orion5x/timer.c new file +181 -0
181 lines not on this page · raw message
include/asm-arm/arch-orion5x/cpu.h new file +203 -0
203 lines not on this page · raw message
include/asm-arm/arch-orion5x/mv88f5182.h new file +40 -0
@@ -0,0 +1,40 @@ +/* +* Copyright (C) 2010 Albert ARIBAUD <[email protected]> +* +* Based on original Kirkwood 88F6182 support which is +* (C) Copyright 2009 +* Marvell Semiconductor <www.marvell.com> +* Written-by: Prafulla Wadaskar <[email protected]> +* +* Header file for Feroceon CPU core 88F5182 SOC. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +* MA 02110-1301 USA +*/ + +#ifndef _CONFIG_88F5182_H +#define _CONFIG_88F5182_H + +/* SOC specific definitions */ +#define F88F5182_REGS_PHYS_BASE 0xf1000000 +#define ORION5X_REGS_PHY_BASE F88F5182_REGS_PHYS_BASE + +/* TCLK Core Clock defination */ +#define CONFIG_SYS_TCLK 166000000/* 166MHz */ + +#endif /* _CONFIG_88F5182_H */
include/asm-arm/arch-orion5x/orion5x.h new file +69 -0
69 lines not on this page · raw message
Signature · 1 line
1.6.4.4
PATCH v6 2/3 Add Orion5x support to 16550 device driver
This patch provides access to the 16550-compatible serial device of the Orion5x SoC.
--- drivers/serial/serial.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/serial/serial.c +3 -0
@@ -30,6 +30,9 @@#ifdef CONFIG_KIRKWOOD #include <asm/arch/kirkwood.h> #endif +#ifdef CONFIG_ORION5X +#include <asm/arch/orion5x.h> +#endif #if defined (CONFIG_SERIAL_MULTI )#include <serial.h>
Signature · 1 line
1.6.4.4
PATCH v6 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.
--- MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 3 + board/LaCie/edminiv2/Makefile | 58 +++++++++++ board/LaCie/edminiv2/board_lowlevel_init.S | 59 +++++++++++ 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, 446 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
MAINTAINERS +4 -0
@@ -515,6 +515,10 @@ Unknown / orphaned boards: # Board CPU # ######################################################################### +Albert ARIBAUD <[email protected]> + + edminiv2 ARM926EJS (Orion5x SoC) + Rowel Atienza <[email protected]> armadillo ARM720T
MAKEALL +1 -0
@@ -559,6 +559,7 @@ LIST_ARM9=" \ edb9312 \ edb9315 \ edb9315a \ + edminiv2 \ imx27lite \ lpd7a400 \ mv88f6281gtw_ge \
Makefile +3 -0
@@ -2936,6 +2936,9 @@ davinci_dm365evm_config : unconfig davinci_dm6467evm_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs dm6467evm davinci davinci +edminiv2_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs $(@:_config=) LaCie orion5x + imx27lite_config: unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs imx27lite logicpd mx27
board/LaCie/edminiv2/Makefile new file +58 -0
58 lines not on this page · raw message
board/LaCie/edminiv2/board_lowlevel_init.S new file +59 -0
59 lines not on this page · raw message
board/LaCie/edminiv2/config.mk new file +27 -0
@@ -0,0 +1,27 @@ +# +# Copyright (C) 2010 Albert ARIBAUD <[email protected]> +# +# (C) Copyright 2009 +# Marvell Semiconductor <www.marvell.com> +# Written-by: Prafulla Wadaskar <[email protected]> +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +TEXT_BASE = 0x00100000
board/LaCie/edminiv2/edminiv2.c new file +93 -0
93 lines not on this page · raw message
board/LaCie/edminiv2/edminiv2.h new file +54 -0
54 lines not on this page · raw message
include/configs/edminiv2.h new file +147 -0
147 lines not on this page · raw message
Signature · 1 line
1.6.4.4
PATCH v6 3/3 Add support for the LaCie ED Mini V2 board
Quoted 31 lines
-----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 1:59 PM
To: U-Boot at lists.denx.de
Subject: [U-Boot] [PATCH V6 3/3] Add support for the LaCie ED Mini V2 boardThis patch adds support for the LaCie ED Mini V2 product which is based on the Marvell Orion5x SoC.
--- MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 3 + board/LaCie/edminiv2/Makefile | 58 +++++++++++ board/LaCie/edminiv2/board_lowlevel_init.S | 59 +++++++++++ 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, 446 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..
Quoted 56 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +49
-0@@ -0,0 +1,59 @@ +/* + * Copyright (C) 2010 Albert ARIBAUD <[email protected]> + * + * (C) Copyright 2009 + * Marvell Semiconductor <www.marvell.com> + * Written-by: Prafulla Wadaskar <[email protected]> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#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. + */ + +.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
board/LaCie/edminiv2/board_lowlevel_init.S line 59
Quoted 10 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +10
-0+ 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
Dear Albert
You are just doing mpp and gpio settings here, those are IO specific only
you can have mpp and gpio configs as in case of Kirkwood (c functions) and call them from your bard_init. Please remove this file.
and dependency of this code with lowlevel_init.S in patch 1/2
That's it.
Regards..
Prafulla . .
PATCH v6 3/3 Add support for the LaCie ED Mini V2 board
Quoted 117 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de
[mailto:u-boot-bounces at lists.denx.de] On Behalf Of Prafulla Wadaskar
Sent: Friday, April 09, 2010 3:08 PM
To: Albert Aribaud; U-Boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH V6 3/3] Add support for the LaCie ED Mini V2 boardQuoted 10 lines
-----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 1:59 PM
To: U-Boot at lists.denx.de
Subject: [U-Boot] [PATCH V6 3/3] Add support for the LaCie ED Mini V2 boardThis patch adds support for the LaCie ED Mini V2 product which is based on the Marvell Orion5x SoC.
Quoted 8 lines
--- MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 3 + board/LaCie/edminiv2/Makefile | 58 +++++++++++ board/LaCie/edminiv2/board_lowlevel_init.S | 59 +++++++++++ board/LaCie/edminiv2/config.mk | 27 +++++ board/LaCie/edminiv2/edminiv2.c | 93++++++++++++++++++
Quoted 11 lines
board/LaCie/edminiv2/edminiv2.h | 54 ++++++++++ include/configs/edminiv2.h | 147 ++++++++++++++++++++++++++++ 9 files changed, 446 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..
Quoted 18 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +11
-0@@ -0,0 +1,59 @@ +/* + * Copyright (C) 2010 Albert ARIBAUD <[email protected]> + * + * (C) Copyright 2009 + * Marvell Semiconductor <www.marvell.com> + * Written-by: Prafulla Wadaskar <[email protected]> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/orboard/LaCie/edminiv2/board_lowlevel_init.S line 21
Quoted 10 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +10
-0+ * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU GeneralPublic License
board/LaCie/edminiv2/board_lowlevel_init.S
Quoted 9 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +9
-0+ * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#include "edminiv2.h" + +/* + * Low-level init happens right after start.S has switchedto SVC32,
board/LaCie/edminiv2/board_lowlevel_init.S line 31
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S new file +1
-0+ * flushed and disabled caches and disabled MMU. We'restill running
board/LaCie/edminiv2/board_lowlevel_init.S line 32
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S new file +1
-0+ * from the boot chip select, so the first thing we shoulddo is set
board/LaCie/edminiv2/board_lowlevel_init.S
Quoted 3 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +3
-0+ * up RAM for us to relocate into. + * + * board_low_level_init is called by the Orion5x
lowlevel_initcode,Quoted 14 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +14
-0+ * and sets up board-specifics such as MPPs and GPIOs. + */ + +.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_15board/LaCie/edminiv2/board_lowlevel_init.S line 59
Quoted 10 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +10
-0+ 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, lrDear Albert
Quoted 8 lines
You are just doing mpp and gpio settings here, those are IO specific only
you can have mpp and gpio configs as in case of Kirkwood (c functions) and call them from yourbard_init. Please remove this file.
and dependency of this code withlowlevel_init.Sin patch 1/2That's it.
Dear Albert
Can you pls do the needfull for above and post V7 for this patch?
Regards..
Prafulla . .
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
In reply to Albert AribaudDear Albert Aribaud,
Quoted 7 lines · In message <[email protected]> you wrote:
This patch adds support for the Marvell Orion5x SoC. It has no use alone, and must be followed by a patch to add Orion5x support for serial, then support for the ED Mini V2, an Orion5x-based product from LaCie.
---
Patchset history
Quoted 14 lines
V1: Initial monolithic patch.
V2: split in three patches : orion, serial, edmini;
checkpatch'ed, with only 6 errors, in patch 1/3, all 6 errors being false positives.
V3: useless GPIO and MPP programming support removed;
low level init added/CONFIG_SKIP_LOW_LEVEL_INIT removed.
V4: all files licensed GPLv2-only removed;
RAM bank size detection now usesget_ram_size().
V5: Replaced macros by C structs in dram code.
Removed compilation warnings in dram code.
Added comments to legacy flash definitions. Split low level init code into SoC- and Chip-specifics.
V6: Set copyright dates to 2010, and put standard GPL notice
mentioning Marvell's copyright on *_lowlevel_init.S files.
Just to be sure: do you have Marvell's permission to change the licensing terms?
Best regards,
Wolfgang Denk
Signature · 6 lines
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
He'd heard her use that sweet, innocent tone of voice before. It
meant that, pretty soon, there was going to be trouble.
- Terry Pratchett, _Truckers_PATCH v6 1/3 Initial support for Marvell Orion5x SoC
Wi Wolfgang,
Wolfgang Denk a ?crit :
Quoted 25 lines
Dear Albert Aribaud,
Quoted 7 lines · In message <[email protected]> you wrote:
This patch adds support for the Marvell Orion5x SoC. It has no use alone, and must be followed by a patch to add Orion5x support for serial, then support for the ED Mini V2, an Orion5x-based product from LaCie.
---
Patchset historyQuoted 14 lines
V1: Initial monolithic patch.
V2: split in three patches : orion, serial, edmini;
checkpatch'ed, with only 6 errors, in patch 1/3, all 6 errors being false positives.
V3: useless GPIO and MPP programming support removed;
low level init added/CONFIG_SKIP_LOW_LEVEL_INIT removed.
V4: all files licensed GPLv2-only removed;
RAM bank size detection now usesget_ram_size().
V5: Replaced macros by C structs in dram code.
Removed compilation warnings in dram code.
Added comments to legacy flash definitions. Split low level init code into SoC- and Chip-specifics.
V6: Set copyright dates to 2010, and put standard GPL notice
mentioning Marvell's copyright on *_lowlevel_init.S files.
Quoted 2 lines
Just to be sure: do you have Marvell's permission to change the licensing terms?
Actually this was checked by Prafulla in december:
<http://lists.denx.de/pipermail/u-boot/2009-December/065797.html>
Quoted 3 lines
Best regards,
Wolfgang Denk
Amicalement,
Signature · 1 line
Albert.
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
Albert ARIBAUD a ?crit :
Quoted 30 lines
Wi Wolfgang,
Wolfgang Denk a ?crit :
Quoted 26 lines
Dear Albert Aribaud,
In message <[email protected]>
Quoted 21 lines · you
This patch adds support for the Marvell Orion5x SoC. It has no use alone, and must be followed by a patch to add Orion5x support for serial, then support for the ED Mini V2, an Orion5x-based product from LaCie.
---
Patchset historyV1: Initial monolithic patch.
V2: split in three patches : orion, serial, edmini;
checkpatch'ed, with only 6 errors, in patch 1/3, all 6 errors being false positives.
V3: useless GPIO and MPP programming support removed;
low level init added/CONFIG_SKIP_LOW_LEVEL_INIT removed.
V4: all files licensed GPLv2-only removed;
RAM bank size detection now usesget_ram_size().
V5: Replaced macros by C structs in dram code.
Removed compilation warnings in dram code.
Added comments to legacy flash definitions. Split low level init code into SoC- and Chip-specifics.
V6: Set copyright dates to 2010, and put standard GPL notice
mentioning Marvell's copyright on *_lowlevel_init.S files.
Quoted 6 lines
Quoted 2 lines
Just to be sure: do you have Marvell's permission to change the licensing terms?
Actually this was checked by Prafulla in december:
<http://lists.denx.de/pipermail/u-boot/2009-December/065797.html>
My mistake--this was for the linux-imported files only.
As for the Marvell-created files, Prafulla (added to To:) should be in position to get us the needed permission.
Amicalement,
Signature · 1 line
Albert.
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
Quoted 47 lines
-----Original Message-----
From: Albert ARIBAUD [mailto:albert.aribaud at free.fr]
Sent: Sunday, April 11, 2010 1:12 PM
To: Albert ARIBAUD
Cc: Wolfgang Denk; U-Boot at lists.denx.de; Prafulla Wadaskar
Subject: Re: [U-Boot] [PATCH V6 1/3] Initial support for Marvell Orion5x SoCAlbert ARIBAUD a ?crit :
Quoted 7 lines
Wi Wolfgang,
Wolfgang Denk a ?crit :
Quoted 3 lines
Dear Albert Aribaud,
In message
Quoted 28 lines
Quoted 23 lines
Quoted 7 lines · you
This patch adds support for the Marvell Orion5x SoC. It has no use alone, and must be followed by a patch to add Orion5x support for serial, then support for the ED Mini V2, an Orion5x-based product from LaCie.
---
Patchset historyQuoted 14 lines
V1: Initial monolithic patch.
V2: split in three patches : orion, serial, edmini;
checkpatch'ed, with only 6 errors, in patch 1/3, all 6 errors being false positives.
V3: useless GPIO and MPP programming support removed;
low level init added/CONFIG_SKIP_LOW_LEVEL_INIT removed.
V4: all files licensed GPLv2-only removed;
RAM bank size detection now usesget_ram_size().
V5: Replaced macros by C structs in dram code.
Removed compilation warnings in dram code.
Added comments to legacy flash definitions. Split low level init code into SoC- and Chip-specifics.
V6: Set copyright dates to 2010, and put standard GPL notice
mentioning Marvell's copyright on *_lowlevel_init.S files.Quoted 2 lines
Just to be sure: do you have Marvell's permission to change the licensing terms?
Actually this was checked by Prafulla in december:
Quoted 7 lines
My mistake--this was for the linux-imported files only.
As for the Marvell-created files, Prafulla (added to To:) should be in
position to get us the needed permission.
After re-confirmation with internal teams.
Yes, all the code that is going out from Marvell for U-boot + LSP by any means is meant to be GPL, if something is missing that can/should be corrected.
Hi Albert,
you can modify the headers accordingly.
Regards..
Prafulla . .
Quoted 5 lines
Amicalement,
Signature · 1 line
Albert.
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
Prafulla Wadaskar a ?crit :
Quoted 52 lines
Quoted 43 lines
-----Original Message-----
From: Albert ARIBAUD [mailto:albert.aribaud at free.fr]
Sent: Sunday, April 11, 2010 1:12 PM
To: Albert ARIBAUD
Cc: Wolfgang Denk; U-Boot at lists.denx.de; Prafulla Wadaskar
Subject: Re: [U-Boot] [PATCH V6 1/3] Initial support for Marvell Orion5x SoCAlbert ARIBAUD a ?crit :
Quoted 7 lines
Wi Wolfgang,
Wolfgang Denk a ?crit :
Quoted 3 lines
Dear Albert Aribaud,
In message
Quoted 24 lines
Quoted 24 lines
Quoted 7 lines · you
This patch adds support for the Marvell Orion5x SoC. It has no use alone, and must be followed by a patch to add Orion5x support for serial, then support for the ED Mini V2, an Orion5x-based product from LaCie.
---
Patchset historyQuoted 14 lines
V1: Initial monolithic patch.
V2: split in three patches : orion, serial, edmini;
checkpatch'ed, with only 6 errors, in patch 1/3, all 6 errors being false positives.
V3: useless GPIO and MPP programming support removed;
low level init added/CONFIG_SKIP_LOW_LEVEL_INIT removed.
V4: all files licensed GPLv2-only removed;
RAM bank size detection now usesget_ram_size().
V5: Replaced macros by C structs in dram code.
Removed compilation warnings in dram code.
Added comments to legacy flash definitions. Split low level init code into SoC- and Chip-specifics.
V6: Set copyright dates to 2010, and put standard GPL notice
mentioning Marvell's copyright on *_lowlevel_init.S files.Just to be sure: do you have Marvell's permission to change the licensing terms?
Quoted 8 lines
Quoted 3 lines
Actually this was checked by Prafulla in december:
<http://lists.denx.de/pipermail/u-boot/2009-December/065797.html>
My mistake--this was for the linux-imported files only.
As for the Marvell-created files, Prafulla (added to To:) should be in
position to get us the needed permission.
Quoted 8 lines
After re-confirmation with internal teams.
Yes, all the code that is going out from Marvell for U-boot + LSP by any means is meant to be GPL, if something is missing that can/should be corrected.Hi Albert,
you can modify the headers accordingly.Regards..
Prafulla . .
Actually, in V6 of the patch the notices are already "GPL v2 or later" for all files.
Amicalement,
Signature · 1 line
Albert.
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
In reply to Prafulla WadaskarDear Prafulla,
Quoted 5 lines · In message <[email protected]>…
After re-confirmation with internal teams.
Yes, all the code that is going out from Marvell for U-boot + LSP by any means is meant to be GPL, if something is missing that can/should be corrected.
"GPL" alone is not precise enough - it could mean "GPL v2" or "GPL v3" or "GPL v2 or later" (which is what we need).
Best regards,
Wolfgang Denk
Signature · 4 lines
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 The software required `Windows 95 or better', so I installed Linux.
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
Quoted 16 lines
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Monday, April 12, 2010 4:16 PM
To: Prafulla Wadaskar
Cc: Albert ARIBAUD; U-Boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH V6 1/3] Initial support for Marvell Orion5x SoCDear Prafulla,
In message <[email protected].
Quoted 1 line · com> you wrote:
Quoted 7 lines
Quoted 4 lines
After re-confirmation with internal teams.
Yes, all the code that is going out from Marvell for U-boot + LSP by any means is meant to be GPL, if something is missing that can/should be corrected."GPL" alone is not precise enough - it could mean "GPL v2" or "GPL v3" or "GPL v2 or later" (which is what we need).
Hi Wolfgang
Sorry for typing small word GPL in the earlier email. My re-confirmation discussion was w.r.to "GPL v2 or later"
Regards..
Prafulla . .
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
Prafulla Wadaskar a ?crit :
Quoted 22 lines
Quoted 15 lines
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Monday, April 12, 2010 4:16 PM
To: Prafulla Wadaskar
Cc: Albert ARIBAUD; U-Boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH V6 1/3] Initial support for Marvell Orion5x SoCDear Prafulla,
In message <[email protected]. com> you wrote:
Quoted 6 lines
Quoted 4 lines
After re-confirmation with internal teams.
Yes, all the code that is going out from Marvell for U-boot + LSP by any means is meant to be GPL, if something is missing that can/should be corrected."GPL" alone is not precise enough - it could mean "GPL v2" or "GPL v3" or "GPL v2 or later" (which is what we need).
Quoted 7 lines
Hi Wolfgang
Sorry for typing small word GPL in the earlier email. My re-confirmation discussion was w.r.to "GPL v2 or later"
Regards..
Prafulla . .
Good, then: V6 of my patch is thus fine as regards GPLv2 or later.
Amicalement,
Signature · 1 line
Albert.
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
In reply to Prafulla WadaskarDear Prafulla,
Quoted 2 lines · In message <[email protected]>…
My re-confirmation discussion was w.r.to "GPL v2 or later"
Thanks a lot for this confirmation.
Best regards,
Wolfgang Denk
Signature · 4 lines
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 The software required `Windows 95 or better', so I installed Linux.
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
In reply to Prafulla Wadaskar(apparently one of Prafulla's answers did not reach me; copy-pasting it and replying even though it's slightly out of place within the thread)
Prafulla Wadaskar a ?crit :
Quoted 123 lines
Quoted 123 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de
[mailto:u-boot-bounces at lists.denx.de] On Behalf Of Prafulla Wadaskar
Sent: Friday, April 09, 2010 3:08 PM
To: Albert Aribaud; U-Boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH V6 3/3] Add support for the LaCie ED Mini V2 boardQuoted 10 lines
-----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 1:59 PM
To: U-Boot at lists.denx.de
Subject: [U-Boot] [PATCH V6 3/3] Add support for the LaCie ED Mini V2 boardThis patch adds support for the LaCie ED Mini V2 product which is based on the Marvell Orion5x SoC.
Quoted 8 lines
--- MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 3 + board/LaCie/edminiv2/Makefile | 58 +++++++++++ board/LaCie/edminiv2/board_lowlevel_init.S | 59 +++++++++++ board/LaCie/edminiv2/config.mk | 27 +++++ board/LaCie/edminiv2/edminiv2.c | 93++++++++++++++++++
Quoted 11 lines
board/LaCie/edminiv2/edminiv2.h | 54 ++++++++++ include/configs/edminiv2.h | 147 ++++++++++++++++++++++++++++ 9 files changed, 446 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..
Quoted 18 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +11
-0@@ -0,0 +1,59 @@ +/* + * Copyright (C) 2010 Albert ARIBAUD <[email protected]> + * + * (C) Copyright 2009 + * Marvell Semiconductor <www.marvell.com> + * Written-by: Prafulla Wadaskar <[email protected]> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/orboard/LaCie/edminiv2/board_lowlevel_init.S line 21
Quoted 10 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +10
-0+ * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU GeneralPublic License
board/LaCie/edminiv2/board_lowlevel_init.S line 30
Quoted 9 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +9
-0+ * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#include "edminiv2.h" + +/* + * Low-level init happens right after start.S has switchedto SVC32,
board/LaCie/edminiv2/board_lowlevel_init.S line 31
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S new file +1
-0+ * flushed and disabled caches and disabled MMU. We'restill running
board/LaCie/edminiv2/board_lowlevel_init.S line 32
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S new file +1
-0+ * from the boot chip select, so the first thing we shoulddo is set
board/LaCie/edminiv2/board_lowlevel_init.S line 35
Quoted 3 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +3
-0+ * up RAM for us to relocate into. + * + * board_low_level_init is called by the Orion5x
lowlevel_initcode,Quoted 14 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +14
-0+ * and sets up board-specifics such as MPPs and GPIOs. + */ + +.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_15board/LaCie/edminiv2/board_lowlevel_init.S line 59
Quoted 10 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +10
-0+ 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, lrDear Albert
You are just doing mpp and gpio settings here, those are IO specific only
you can have mpp and gpio configs as in case of Kirkwood (c functions) and call them from yourbard_init. Please remove this file.
and dependency of this code withlowlevel_init.Sin patch 1/2
Quoted 5 lines
Quoted 1 line
That's it.
Dear Albert
Can you pls do the needfull for above and post V7 for this patch?
I can, but IMO that would doing C code for the sake of C code.
The ED Mini board is a product, not a dev board, and has a completely static and predefined MPP and GPIO configuration; there will not even be an API to modify them from within U-boot (this was discussed in earlier iterations of the patch) and thus their whole handling throughout the whole patch takes no more than these eight ASM statements.
Unless there is a pressing reason to switch to C, I would prefer to keep MPP+GPIO inits as they are. C code here would not provide any benefit.
Amicalement,
Signature · 1 line
Albert.
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
Quoted 160 lines
-----Original Message-----
From: Albert ARIBAUD [mailto:albert.aribaud at free.fr]
Sent: Monday, April 12, 2010 8:33 PM
To: Prafulla Wadaskar
Cc: Wolfgang Denk; U-Boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH V6 1/3] Initial support for Marvell Orion5x SoC(apparently one of Prafulla's answers did not reach me; copy-pasting it
and replying even though it's slightly out of place within the thread)Prafulla Wadaskar a ?crit :
Quoted 4 lines
Quoted 4 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf OfPrafulla Wadaskar
Quoted 10 lines
Quoted 10 lines
Sent: Friday, April 09, 2010 3:08 PM
To: Albert Aribaud; U-Boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH V6 3/3] Add support for the LaCie ED Mini V2 boardQuoted 3 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf OfAlbert Aribaud
Quoted 39 lines
Quoted 39 lines
Quoted 7 lines
Sent: Friday, April 09, 2010 1:59 PM
To: U-Boot at lists.denx.de
Subject: [U-Boot] [PATCH V6 3/3] Add support for the LaCie ED Mini V2 boardThis patch adds support for the LaCie ED Mini V2 product which is based on the Marvell Orion5x SoC.
Quoted 8 lines
--- MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 3 + board/LaCie/edminiv2/Makefile | 58 +++++++++++ board/LaCie/edminiv2/board_lowlevel_init.S | 59 +++++++++++ board/LaCie/edminiv2/config.mk | 27 +++++ board/LaCie/edminiv2/edminiv2.c | 93++++++++++++++++++
Quoted 11 lines
board/LaCie/edminiv2/edminiv2.h | 54 ++++++++++ include/configs/edminiv2.h | 147 ++++++++++++++++++++++++++++ 9 files changed, 446 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..
Quoted 11 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +4
-0@@ -0,0 +1,59 @@ +/* + * Copyright (C) 2010 Albert ARIBAUD <[email protected]> + * + * (C) Copyright 2009Quoted 8 lines
Quoted 8 lines
board/LaCie/edminiv2/board_lowlevel_init.S line 12
Quoted 8 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +8
-0+ * Marvell Semiconductor <www.marvell.com> + * Written-by: Prafulla Wadaskar <[email protected]> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General PublicLicense as
Quoted 1 line
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S line 13
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S new file +1
-0+ * published by the Free Software Foundation; eitherversion 2 of
Quoted 3 lines
Quoted 3 lines
board/LaCie/edminiv2/board_lowlevel_init.S line 16
Quoted 3 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +3
-0+ * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it willbe useful,
Quoted 1 line
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S line 17
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S new file +1
-0+ * but WITHOUT ANY WARRANTY; without even the impliedwarranty of
Quoted 57 lines
Quoted 57 lines
board/LaCie/edminiv2/board_lowlevel_init.S line 21
Quoted 4 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +4
-0+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU GeneralPublic License
board/LaCie/edminiv2/board_lowlevel_init.S line 30
Quoted 9 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +9
-0+ * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#include "edminiv2.h" + +/* + * Low-level init happens right after start.S has switchedto SVC32,
board/LaCie/edminiv2/board_lowlevel_init.S line 31
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S new file +1
-0+ * flushed and disabled caches and disabled MMU. We'restill running
board/LaCie/edminiv2/board_lowlevel_init.S line 32
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S new file +1
-0+ * from the boot chip select, so the first thing we shoulddo is set
board/LaCie/edminiv2/board_lowlevel_init.S line 35
Quoted 3 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +3
-0+ * up RAM for us to relocate into. + * + * board_low_level_init is called by the Orion5x
lowlevel_initcode,Quoted 14 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +14
-0+ * and sets up board-specifics such as MPPs and GPIOs. + */ + +.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_15board/LaCie/edminiv2/board_lowlevel_init.S line 59
Quoted 10 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +10
-0+ 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, lrDear Albert
You are just doing mpp and gpio settings here, those are IO specific only
you can have mpp and gpio configs as in case of Kirkwood (c functions) and call them from yourbard_init. Please remove this file.
and dependency of this code withlowlevel_init.Sin patch 1/2Quoted 5 lines
Quoted 1 line
That's it.
Dear Albert
Can you pls do the needfull for above and post V7 for this patch?
I can, but IMO that would doing C code for the sake of C code.
The ED Mini board is a product, not a dev board, and has a completely static and predefined MPP and GPIO configuration; there will not even be
an API to modify them from within U-boot (this was discussed in earlier
iterations of the patch) and thus their whole handling throughout the whole patch takes no more than these eight ASM statements.
Quoted 3 lines
Unless there is a pressing reason to switch to C, I would prefer to keep
MPP+GPIO inits as they are. C code here would not provide any benefit.
This is how C evolved :-)
1. Using C itself is benefit over assembly. Stragically prefer C wherever possible.
2. Converting mpp and gpio init in c function and putting them in board_init completely removes this file. patch becomes simple and smaller.
3. cpu/arm926ejs/orion5x/lowlevel_init.S in patch 1/3 will become independent and simple.
Actually you can pull it to board/LaCie/edminiv2/ since it has DRAM configuration and that is board specific.
I have put this as review comment earlier
It is not necessary to use Assembly here.
Our common objective is to add functional, clean, readable and smaller code to the repository.
I hope you will agree with me.
Regards..
Prafulla . .
Quoted 5 lines
Amicalement,
Signature · 1 line
Albert.
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
Hi Prafulla,
Prafulla Wadaskar a ?crit :
Quoted 156 lines
Quoted 156 lines
-----Original Message-----
From: Albert ARIBAUD [mailto:albert.aribaud at free.fr]
Sent: Monday, April 12, 2010 8:33 PM
To: Prafulla Wadaskar
Cc: Wolfgang Denk; U-Boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH V6 1/3] Initial support for Marvell Orion5x SoC(apparently one of Prafulla's answers did not reach me; copy-pasting it
and replying even though it's slightly out of place within the thread)Prafulla Wadaskar a ?crit :
Quoted 3 lines
Quoted 3 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf OfPrafulla Wadaskar
Quoted 10 lines
Quoted 10 lines
Sent: Friday, April 09, 2010 3:08 PM
To: Albert Aribaud; U-Boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH V6 3/3] Add support for the LaCie ED Mini V2 boardQuoted 3 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf OfAlbert Aribaud
Quoted 39 lines
Quoted 39 lines
Quoted 7 lines
Sent: Friday, April 09, 2010 1:59 PM
To: U-Boot at lists.denx.de
Subject: [U-Boot] [PATCH V6 3/3] Add support for the LaCie ED Mini V2 boardThis patch adds support for the LaCie ED Mini V2 product which is based on the Marvell Orion5x SoC.
Quoted 8 lines
--- MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 3 + board/LaCie/edminiv2/Makefile | 58 +++++++++++ board/LaCie/edminiv2/board_lowlevel_init.S | 59 +++++++++++ board/LaCie/edminiv2/config.mk | 27 +++++ board/LaCie/edminiv2/edminiv2.c | 93++++++++++++++++++
Quoted 11 lines
board/LaCie/edminiv2/edminiv2.h | 54 ++++++++++ include/configs/edminiv2.h | 147 ++++++++++++++++++++++++++++ 9 files changed, 446 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..
Quoted 11 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +4
-0@@ -0,0 +1,59 @@ +/* + * Copyright (C) 2010 Albert ARIBAUD <[email protected]> + * + * (C) Copyright 2009Quoted 8 lines
Quoted 8 lines
board/LaCie/edminiv2/board_lowlevel_init.S line 12
Quoted 8 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +8
-0+ * Marvell Semiconductor <www.marvell.com> + * Written-by: Prafulla Wadaskar <[email protected]> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General PublicLicense as
Quoted 1 line
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S line 13
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S new file +1
-0+ * published by the Free Software Foundation; eitherversion 2 of
Quoted 3 lines
Quoted 3 lines
board/LaCie/edminiv2/board_lowlevel_init.S line 16
Quoted 3 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +3
-0+ * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it willbe useful,
Quoted 1 line
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S line 17
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S new file +1
-0+ * but WITHOUT ANY WARRANTY; without even the impliedwarranty of
Quoted 56 lines
Quoted 56 lines
board/LaCie/edminiv2/board_lowlevel_init.S line 21
Quoted 4 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +4
-0+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU GeneralPublic License
board/LaCie/edminiv2/board_lowlevel_init.S line 30
Quoted 9 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +9
-0+ * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#include "edminiv2.h" + +/* + * Low-level init happens right after start.S has switchedto SVC32,
board/LaCie/edminiv2/board_lowlevel_init.S line 31
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S new file +1
-0+ * flushed and disabled caches and disabled MMU. We'restill running
board/LaCie/edminiv2/board_lowlevel_init.S line 32
Quoted 1 line
board/LaCie/edminiv2/board_lowlevel_init.S new file +1
-0+ * from the boot chip select, so the first thing we shoulddo is set
board/LaCie/edminiv2/board_lowlevel_init.S line 35
Quoted 3 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +3
-0+ * up RAM for us to relocate into. + * + * board_low_level_init is called by the Orion5x
lowlevel_initcode,Quoted 14 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +14
-0+ * and sets up board-specifics such as MPPs and GPIOs. + */ + +.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_15board/LaCie/edminiv2/board_lowlevel_init.S line 59
Quoted 10 lines
board/LaCie/edminiv2/board_lowlevel_init.S new file +10
-0+ 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, lrDear Albert
You are just doing mpp and gpio settings here, those are IO specific only
you can have mpp and gpio configs as in case of Kirkwood (c functions) and call them from yourbard_init. Please remove this file.
and dependency of this code withlowlevel_init.Sin patch 1/2Quoted 4 lines
Quoted 1 line
That's it.
Dear Albert
Can you pls do the needfull for above and post V7 for this patch?
I can, but IMO that would doing C code for the sake of C code.
The ED Mini board is a product, not a dev board, and has a completely static and predefined MPP and GPIO configuration; there will not even be
an API to modify them from within U-boot (this was discussed in earlier
iterations of the patch) and thus their whole handling throughout the whole patch takes no more than these eight ASM statements.
Quoted 4 lines
Quoted 3 lines
Unless there is a pressing reason to switch to C, I would prefer to keep
MPP+GPIO inits as they are. C code here would not provide any benefit.This is how C evolved :-)
Hmm... It only did because/when assembly became impractical. :)
Quoted 3 lines
1. Using C itself is benefit over assembly. Stragically prefer C wherever possible.
2. Converting mpp and gpio init in c function and putting them inboard_initcompletely removes this file. patch becomes simple and smaller.
3.cpu/arm926ejs/orion5x/lowlevel_init.Sin patch 1/3 will become independent and simple.
All right. However:
Quoted 2 lines
Actually you can pull it to board/LaCie/edminiv2/ since it has DRAM configuration and that is board specific. I have put this as review comment earlier
And I'd answered it I believe. :) The DRAM-setting code is SoC specific, not board specific. Even the guidelines are variant-specific, not board-specific.
Quoted 1 line
It is not necessary to use Assembly here.
Well there it is necessary, because you can't use a C stack yet for instance, since you don't have RAM initialized yet.
Quoted 3 lines
Our common objective is to add functional, clean, readable and smaller code to the repository.
I hope you will agree with me.
Partly: the DRAM init part has to stay in asm and in the SoC code I'm afraid.
Quoted 2 lines
Regards..
Prafulla . .
Amicalement,
Signature · 1 line
Albert.
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
Quoted 10 lines
-----Original Message-----
From: Albert ARIBAUD [mailto:albert.aribaud at free.fr]
Sent: Tuesday, April 13, 2010 4:39 PM
To: Prafulla Wadaskar
Cc: Wolfgang Denk; U-Boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH V6 1/3] Initial support for Marvell Orion5x SoC
...snip...
Quoted 62 lines
Quoted 30 lines
Quoted 30 lines
Quoted 30 lines
Quoted 30 lines
Quoted 11 lines
+.globl
board_lowlevel_init(quoted diff) +10
-0+ +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_15Review
Quoted 10 lines
(quoted diff) +10
-0+ 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, lrDear Albert
You are just doing mpp and gpio settings here, those are IO specific only
you can have mpp and gpio configs as in case of Kirkwood (c functions) and call them from yourbard_init. Please remove this file.
and dependency of this code withlowlevel_init.Sin patch 1/2Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
That's it.
Dear Albert
Can you pls do the needfull for above and post V7 for this patch?
I can, but IMO that would doing C code for the sake of C code.
The ED Mini board is a product, not a dev board, and has a
completely
Quoted 5 lines
Quoted 5 lines
static and predefined MPP and GPIO configuration; there will not even be
an API to modify them from within U-boot (this was discussed in earlier
iterations of the patch) and thus their whole handlingthroughout the
Quoted 5 lines
Quoted 5 lines
whole patch takes no more than these eight ASM statements.
Unless there is a pressing reason to switch to C, I would prefer to keep
MPP+GPIO inits as they are. C code here would not provideany benefit.
Quoted 1 line
This is how C evolved :-)
Hmm... It only did because/when assembly became impractical. :)
Quoted 1 line
1. Using C itself is benefit over assembly. Stragically
prefer C wherever possible.
Quoted 1 line
2. Converting mpp and gpio init in c function and putting
them in
board_initcompletely removes this file. patch becomes simple and smaller.Quoted 1 line
3.
cpu/arm926ejs/orion5x/lowlevel_init.Sin patch 1/3 willbecome independent and simple.
Quoted 8 lines
All right. However:
Quoted 1 line
Actually you can pull it to board/LaCie/edminiv2/ since it
has DRAM configuration and that is board specific.
Quoted 1 line
I have put this as review comment earlier
And I'd answered it I believe. :) The DRAM-setting code is SoC specific,
You are right, the code is SoC specific, but the values to be programmed are board specific.
if you are interested,
Look at cpu/arm926ejs/at91/lowlevel_init.s how it programs SMRDATA.
Follow similar arch here too.
-Define similar data segment for holding soc_reg_addr and data array
-Define macros for SOC register addresses in soc specific header file
-Define macros for SOC register values in board specific header file
This way we can retain lowlevel_init.S in soc specific folder, whereas you can pass data through board specific macros.
Quoted 2 lines
not board specific. Even the guidelines are variant-specific, not board-specific.
To me:
Type of DRAM used, how it is interfaced, clock speed- all are board specific.
If removed mpp and gpio inits from current file, Lowlevel_init.S mostly represents DRAM configuration here.
For a particular board we know what static configuration is required. Those should be configured through lowlevel_init.S I am mapping this with Kirkwood kwbimage.cfg implementation.
Quoted 5 lines
Quoted 2 lines
It is not necessary to use Assembly here.
Well there it is necessary, because you can't use a C stack yet for instance, since you don't have RAM initialized yet.
That's why lowlevel_init should do basic static initialization in asm (i.e. mostly DRAM configuration) And other initialization in either arch_cpu_init() or arch_misc_init() or board_init().
Quoted 8 lines
Quoted 2 lines
Our common objective is to add functional, clean, readable
and smaller code to the repository.
Quoted 2 lines
I hope you will agree with me.
Partly: the DRAM init part has to stay in asm and in the SoC code I'm afraid.
Sure,
DRAM init should go in lowlevel_init i.e. asm code, that's need of Orion5X Either its location or its architecture need to change to address board specific issues.
Regards..
Prafulla . .
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
Prafulla Wadaskar a ?crit :
Quoted 9 lines
You are right, the code is SoC specific, but the values to be programmed are board specific.
if you are interested,
Look atcpu/arm926ejs/at91/lowlevel_init.show it programs SMRDATA. Follow similar arch here too.(quoted diff) +0
-3-Define similar data segment for holding soc_reg_addr and data array -Define macros for SOC register addresses in soc specific header file -Define macros for SOC register values in board specific header fileThis way we can retain
lowlevel_init.Sin soc specific folder, whereas you can pass data through board specific macros.
Ok.
Quoted 2 lines
DRAM init should go in
lowlevel_initi.e. asm code, that's need of Orion5X Either its location or its architecture need to change to address board specific issues.
Agreed.
Now, what about that overall cpu/arch hierarchy change that's been started? Is there a branch with the new file hierarchi that I should rebase on, or do I keep the current organization in my patch?
Quoted 2 lines
Regards..
Prafulla . .
Amicalement,
Signature · 1 line
Albert.
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
Quoted 29 lines
-----Original Message-----
From: Albert ARIBAUD [mailto:albert.aribaud at free.fr]
Sent: Tuesday, April 13, 2010 9:10 PM
To: Prafulla Wadaskar
Cc: Wolfgang Denk; U-Boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH V6 1/3] Initial support for Marvell Orion5x SoCPrafulla Wadaskar a ?crit :
Quoted 1 line
You are right, the code is SoC specific, but the values to
be programmed are board specific.
Review
Quoted 6 lines
if you are interested,
Look atcpu/arm926ejs/at91/lowlevel_init.show it programs SMRDATA. Follow similar arch here too.(quoted diff) +0
-2-Define similar data segment for holding soc_reg_addr and data array -Define macros for SOC register addresses in soc specificheader file
Quoted 2 lines
-Define macros for SOC register values in board specific header file This way we can retain
lowlevel_init.Sin soc specificfolder, whereas you can pass data through board specific macros.
Ok.
Quoted 1 line
DRAM init should go in
lowlevel_initi.e. asm code, that'sneed of Orion5X
Quoted 8 lines
Quoted 1 line
Either its location or its architecture need to change to
address board specific issues.
Agreed.
Now, what about that overall cpu/arch hierarchy change that's been started? Is there a branch with the new file hierarchi that I should rebase on, or do I keep the current organization in my patch?
I am waiting for u-boot-arm.git to get rebased so that I can rebase u-boot-mravell.git Meanwhile this happens, you can post your patches w.r.to u-boot.git.
Regards..
Prafulla . .
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
Prafulla Wadaskar a ?crit :
Quoted 37 lines
Quoted 28 lines
-----Original Message-----
From: Albert ARIBAUD [mailto:albert.aribaud at free.fr]
Sent: Tuesday, April 13, 2010 9:10 PM
To: Prafulla Wadaskar
Cc: Wolfgang Denk; U-Boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH V6 1/3] Initial support for Marvell Orion5x SoCPrafulla Wadaskar a ?crit :
Quoted 1 line
You are right, the code is SoC specific, but the values to
be programmed are board specific.
Review
Quoted 5 lines
if you are interested,
Look atcpu/arm926ejs/at91/lowlevel_init.show it programs SMRDATA. Follow similar arch here too.(quoted diff) +0
-2-Define similar data segment for holding soc_reg_addr and data array -Define macros for SOC register addresses in soc specificheader file
Quoted 2 lines
-Define macros for SOC register values in board specific header file This way we can retain
lowlevel_init.Sin soc specificfolder, whereas you can pass data through board specific macros.
Ok.
Quoted 1 line
DRAM init should go in
lowlevel_initi.e. asm code, that'sneed of Orion5X
Quoted 8 lines
Quoted 1 line
Either its location or its architecture need to change to
address board specific issues.
Agreed.
Now, what about that overall cpu/arch hierarchy change that's been started? Is there a branch with the new file hierarchi that I should rebase on, or do I keep the current organization in my patch?
Quoted 5 lines
I am waiting for u-boot-arm.git to get rebased so that I can rebase u-boot-mravell.git Meanwhile this happens, you can post your patches w.r.to u-boot.git.
Regards..
Prafulla . .
Prafulla,
FYI, I will unfortunately be unable to work further on this patch until next wednesday.
Amicalement,
Signature · 1 line
Albert.
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
Quoted 10 lines
-----Original Message-----
From: Albert ARIBAUD [mailto:albert.aribaud at free.fr]
Sent: Thursday, April 15, 2010 12:05 PM
To: Prafulla Wadaskar
Cc: Wolfgang Denk; U-Boot at lists.denx.de; Tom
Subject: Re: [U-Boot] [PATCH V6 1/3] Initial support for Marvell Orion5x SoC
...snip...
Quoted 4 lines
Quoted 1 line
I am waiting for u-boot-arm.git to get rebased so that I
can rebase u-boot-mravell.git
Quoted 2 lines
Meanwhile this happens, you can post your patches w.r.to u-boot.git.
Quoted 8 lines
Quoted 2 lines
Regards..
Prafulla . .Prafulla,
FYI, I will unfortunately be unable to work further on this patch until
next wednesday.
Ping
Regards..
Prafulla . .
PATCH v6 1/3 Initial support for Marvell Orion5x SoC
In reply to Albert ARIBAUDDear Albert ARIBAUD,
Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Just to be sure: do you have Marvell's permission to change the licensing terms?
Actually this was checked by Prafulla in december:
<http://lists.denx.de/pipermail/u-boot/2009-December/065797.html>
Quoted 2 lines · Prafulla
Quoted 2 lines
I got a GREEN flag from respective owners, we can update these files for GPL v2, I will send the patch soon.
But "GPL v2" is not sufficient. We need "GPL, either version 2, or (at your option) any later version".
This is a small, but important difference.
Best regards,
Wolfgang Denk
Signature · 6 lines
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 It is practically impossible to teach good programming style to stu- dents that have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. - Dijkstra