summaryrefslogtreecommitdiffstats
path: root/board/integratorap
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2005-10-06 17:08:18 +0200
committerWolfgang Denk <wd@pollux.denx.de>2005-10-06 17:08:18 +0200
commit87cb6862b94e342d6c99467e0dbb0d4f625cc7ef (patch)
tree82c6530f0de6cc1e224cdc17458ab6a503cf072f /board/integratorap
parentbccae9039e59ac09a776429119389a6a4e679fd7 (diff)
downloadtalos-obmc-uboot-87cb6862b94e342d6c99467e0dbb0d4f625cc7ef.tar.gz
talos-obmc-uboot-87cb6862b94e342d6c99467e0dbb0d4f625cc7ef.zip
Update make target for ARM supported boards.
Use lowlevel_init() instead of platformsetup() [rename]. Patch by Peter Pearse, 06 Oct 2005
Diffstat (limited to 'board/integratorap')
-rw-r--r--board/integratorap/Makefile2
-rw-r--r--board/integratorap/integratorap.c5
-rw-r--r--board/integratorap/lowlevel_init.S (renamed from board/integratorap/platform.S)6
-rw-r--r--board/integratorap/split_by_variant.sh106
-rw-r--r--board/integratorap/u-boot.lds.S (renamed from board/integratorap/u-boot.lds)4
5 files changed, 113 insertions, 10 deletions
diff --git a/board/integratorap/Makefile b/board/integratorap/Makefile
index cf76dedb2d..358df62519 100644
--- a/board/integratorap/Makefile
+++ b/board/integratorap/Makefile
@@ -30,7 +30,7 @@ include $(TOPDIR)/config.mk
LIB = lib$(BOARD).a
OBJS := integratorap.o flash.o
-SOBJS := platform.o memsetup.o
+SOBJS := lowlevel_init.o memsetup.o
$(LIB): $(OBJS) $(SOBJS)
$(AR) crv $@ $^
diff --git a/board/integratorap/integratorap.c b/board/integratorap/integratorap.c
index 4baf39a677..d4f61d6403 100644
--- a/board/integratorap/integratorap.c
+++ b/board/integratorap/integratorap.c
@@ -649,8 +649,3 @@ ulong get_tbclk (void)
{
return CFG_HZ_CLOCK/div_clock;
}
-
-/* The Integrator/AP timer1 is clocked at 24MHz
- * can be divided by 16 or 256
- * and is a 16-bit counter
- */
diff --git a/board/integratorap/platform.S b/board/integratorap/lowlevel_init.S
index b208adb371..1aacbf4a7a 100644
--- a/board/integratorap/platform.S
+++ b/board/integratorap/lowlevel_init.S
@@ -37,9 +37,9 @@ reset_cpu:
reset_failed:
b reset_failed
-/* set up the platform, once the cpu has been initialized */
-.globl platformsetup
-platformsetup:
+/* Set up the platform, once the cpu has been initialized */
+.globl lowlevel_init
+lowlevel_init:
/* If U-Boot has been run after the ARM boot monitor
* then all the necessary actions have been done
* otherwise we are running from user flash mapped to 0x00000000
diff --git a/board/integratorap/split_by_variant.sh b/board/integratorap/split_by_variant.sh
new file mode 100644
index 0000000000..23fc7b3244
--- /dev/null
+++ b/board/integratorap/split_by_variant.sh
@@ -0,0 +1,106 @@
+#!/bin/sh
+# ---------------------------------------------------------
+# Set the platform defines
+# ---------------------------------------------------------
+echo -n "/* Integrator configuration implied " > tmp.fil
+echo " by Makefile target */" >> tmp.fil
+echo -n "#define CONFIG_INTEGRATOR" >> tmp.fil
+echo " /* Integrator board */" >> tmp.fil
+echo -n "#define CONFIG_ARCH_INTEGRATOR" >> tmp.fil
+echo " 1 /* Integrator/AP */" >> tmp.fil
+# ---------------------------------------------------------
+# Set the core module defines according to Core Module
+# ---------------------------------------------------------
+CC=$(CROSS_COMPILE)gcc
+cpu="arm_intcm"
+
+if [ "$2" == "" ]
+then
+ echo "$0:: No preprocessor parameter - using $(CROSS_COMPILE)gcc"
+else
+ CC=$2
+fi
+
+
+if [ "$1" == "" ]
+then
+ echo "$0:: No parameters - using $(CROSS_COMPILE)gcc arm_intcm"
+else
+ case "$1" in
+ ap7_config | \
+ ap966_config | \
+ ap922_config | \
+ integratorap_config | \
+ ap_config)
+ cpu="arm_intcm"
+ ;;
+
+ ap720t_config)
+ cpu="arm720t"
+ echo -n "#define CONFIG_CM720T" >> tmp.fil
+ echo " 1 /* CPU core is ARM720T */ " >> tmp.fil
+ ;;
+
+ ap922_XA10_config)
+ echo -n "#define CONFIG_CM922T_XA10" >> tmp.fil
+ echo " 1 /* CPU core is ARM922T_XA10 */" >> tmp.fil
+ cpu="arm_intcm"
+ ;;
+
+ ap920t_config)
+ cpu="arm920t"
+ echo -n "#define CONFIG_CM920T" >> tmp.fil
+ echo " 1 /* CPU core is ARM920T */" >> tmp.fil
+ ;;
+
+ ap926ejs_config)
+ cpu="arm926ejs"
+ echo -n "#define CONFIG_CM926EJ_S" >> tmp.fil
+ echo " 1 /* CPU core is ARM926EJ-S */ " >> tmp.fil
+ ;;
+
+
+ ap946es_config)
+ cpu="arm946es"
+ echo -n "#define CONFIG_CM946E_S" >> tmp.fil
+ echo " 1 /* CPU core is ARM946E-S */ " >> tmp.fil
+ ;;
+
+ *)
+ echo "$0:: Unrecognised target - using arm_intcm"
+ cpu="arm_intcm"
+ ;;
+
+ esac
+
+fi
+
+if [ "$cpu" == "arm_intcm" ]
+then
+ echo "/* Core module undefined/not ported */" >> tmp.fil
+ echo "#define CONFIG_ARM_INTCM 1" >> tmp.fil
+ echo -n "#undef CONFIG_CM_MULTIPLE_SSRAM" >> tmp.fil
+ echo -n " /* CM may not have " >> tmp.fil
+ echo "multiple SSRAM mapping */" >> tmp.fil
+ echo -n "#undef CONFIG_CM_SPD_DETECT " >> tmp.fil
+ echo -n " /* CM may not support SPD " >> tmp.fil
+ echo "query */" >> tmp.fil
+ echo -n "#undef CONFIG_CM_REMAP " >> tmp.fil
+ echo -n " /* CM may not support " >> tmp.fil
+ echo "remapping */" >> tmp.fil
+ echo -n "#undef CONFIG_CM_INIT " >> tmp.fil
+ echo -n " /* CM may not have " >> tmp.fil
+ echo "initialization reg */" >> tmp.fil
+ echo -n "#undef CONFIG_CM_TCRAM " >> tmp.fil
+ echo " /* CM may not have TCRAM */" >> tmp.fil
+fi
+mv tmp.fil ./include/config.h
+# ---------------------------------------------------------
+# Ensure correct core object loaded first in U-Boot image
+# ---------------------------------------------------------
+$CC -E -P -C -D CPU_FILE=cpu/$cpu/start.o \
+-o board/integratorap/u-boot.lds board/integratorap/u-boot.lds.S
+# ---------------------------------------------------------
+# Complete the configuration
+# ---------------------------------------------------------
+./mkconfig -a integratorap arm $cpu integratorap;
diff --git a/board/integratorap/u-boot.lds b/board/integratorap/u-boot.lds.S
index cb6ee188b1..486b5da27b 100644
--- a/board/integratorap/u-boot.lds
+++ b/board/integratorap/u-boot.lds.S
@@ -20,6 +20,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
+/* Preprocessed during configuration to emsure the core module processor code,
+ from CPU_FILE, is placed at the start of the image */
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
@@ -30,7 +32,7 @@ SECTIONS
. = ALIGN(4);
.text :
{
- cpu/arm926ejs/start.o (.text)
+ CPU_FILE (.text)
*(.text)
}
.rodata : { *(.rodata) }
OpenPOWER on IntegriCloud