From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Tue, 5 Aug 2014 09:09:52 +0200 Subject: [U-Boot] [PATCH v2 06/25] arm: kirkwood: Move some SoC files into new arch/arm/mvebu-common In-Reply-To: <1407222612-1048-1-git-send-email-sr@denx.de> References: <1407222612-1048-1-git-send-email-sr@denx.de> Message-ID: <1407222612-1048-7-git-send-email-sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de By moving some kirkwood files into a Marvell common directory, those files can be used by other Marvell platforms as well. The name mvebu is taken from the Linux kernel source tree. It has been chosen there to represent the SoC's from the Marvell EBU (Engineering Business Unit). Those SoC's currently are: Armada 370/375/XP, Dove, mv78xx0, Kirkwood, Orion5x This will be used by the upcoming Armada XP (MV78460) platform support. Signed-off-by: Stefan Roese --- Changes in v2: None Makefile | 4 ++++ arch/arm/cpu/arm926ejs/kirkwood/Makefile | 4 +--- arch/arm/mvebu-common/Makefile | 10 ++++++++++ arch/arm/{cpu/arm926ejs/kirkwood => mvebu-common}/dram.c | 8 +++++++- arch/arm/{cpu/arm926ejs/kirkwood => mvebu-common}/timer.c | 0 5 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 arch/arm/mvebu-common/Makefile rename arch/arm/{cpu/arm926ejs/kirkwood => mvebu-common}/dram.c (91%) rename arch/arm/{cpu/arm926ejs/kirkwood => mvebu-common}/timer.c (100%) diff --git a/Makefile b/Makefile index 5e49545..88e685a 100644 --- a/Makefile +++ b/Makefile @@ -653,6 +653,10 @@ ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs vf610)) libs-y += arch/$(ARCH)/imx-common/ endif +ifneq (,$(filter $(SOC), kirkwood)) +libs-y += arch/$(ARCH)/mvebu-common/ +endif + libs-$(CONFIG_ARM) += arch/arm/cpu/ libs-$(CONFIG_PPC) += arch/powerpc/cpu/ diff --git a/arch/arm/cpu/arm926ejs/kirkwood/Makefile b/arch/arm/cpu/arm926ejs/kirkwood/Makefile index c230ce8..df4756e 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/Makefile +++ b/arch/arm/cpu/arm926ejs/kirkwood/Makefile @@ -7,7 +7,5 @@ # obj-y = cpu.o -obj-y += dram.o -obj-y += mpp.o -obj-y += timer.o obj-y += cache.o +obj-y += mpp.o diff --git a/arch/arm/mvebu-common/Makefile b/arch/arm/mvebu-common/Makefile new file mode 100644 index 0000000..4d20d2c --- /dev/null +++ b/arch/arm/mvebu-common/Makefile @@ -0,0 +1,10 @@ +# +# (C) Copyright 2009 +# Marvell Semiconductor +# Written-by: Prafulla Wadaskar +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y = dram.o +obj-y += timer.o diff --git a/arch/arm/cpu/arm926ejs/kirkwood/dram.c b/arch/arm/mvebu-common/dram.c similarity index 91% rename from arch/arm/cpu/arm926ejs/kirkwood/dram.c rename to arch/arm/mvebu-common/dram.c index d73ae47..bb5989b 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/dram.c +++ b/arch/arm/mvebu-common/dram.c @@ -110,7 +110,13 @@ int dram_init(void) if (gd->bd->bi_dram[i].start != gd->ram_size) break; - gd->ram_size += gd->bd->bi_dram[i].size; + /* + * Don't report more than 3GiB of SDRAM, otherwise there is no + * address space left for the internal registers etc. + */ + if ((gd->ram_size + gd->bd->bi_dram[i].size != 0) && + (gd->ram_size + gd->bd->bi_dram[i].size <= (3 << 30))) + gd->ram_size += gd->bd->bi_dram[i].size; } diff --git a/arch/arm/cpu/arm926ejs/kirkwood/timer.c b/arch/arm/mvebu-common/timer.c similarity index 100% rename from arch/arm/cpu/arm926ejs/kirkwood/timer.c rename to arch/arm/mvebu-common/timer.c -- 2.0.4