瀏覽代碼

arm: kirkwood: Move some SoC files into new arch/arm/mvebu-common

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 <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Stefan Roese 10 年之前
父節點
當前提交
d80cca29fe
共有 5 個文件被更改,包括 22 次插入4 次删除
  1. 4 0
      Makefile
  2. 1 3
      arch/arm/cpu/arm926ejs/kirkwood/Makefile
  3. 10 0
      arch/arm/mvebu-common/Makefile
  4. 7 1
      arch/arm/mvebu-common/dram.c
  5. 0 0
      arch/arm/mvebu-common/timer.c

+ 4 - 0
Makefile

@@ -652,6 +652,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/
 

+ 1 - 3
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

+ 10 - 0
arch/arm/mvebu-common/Makefile

@@ -0,0 +1,10 @@
+#
+# (C) Copyright 2009
+# Marvell Semiconductor <www.marvell.com>
+# Written-by: Prafulla Wadaskar <prafulla@marvell.com>
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y	= dram.o
+obj-y	+= timer.o

+ 7 - 1
arch/arm/cpu/arm926ejs/kirkwood/dram.c → 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;
 
 	}
 

+ 0 - 0
arch/arm/cpu/arm926ejs/kirkwood/timer.c → arch/arm/mvebu-common/timer.c