blob: 3f0a447e447bdff6e6607605d1ceef43883df7ec [file] [log] [blame]
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +02001#!/bin/sh
2# ---------------------------------------------------------
3# Set the platform defines
4# ---------------------------------------------------------
5echo -n "/* Integrator configuration implied " > tmp.fil
Wolfgang Denka1be4762008-05-20 16:00:29 +02006echo " by Makefile target */" >> tmp.fil
7echo -n "#define CONFIG_INTEGRATOR" >> tmp.fil
8echo " /* Integrator board */" >> tmp.fil
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +02009echo -n "#define CONFIG_ARCH_CINTEGRATOR" >> tmp.fil
Wolfgang Denka1be4762008-05-20 16:00:29 +020010echo " 1 /* Integrator/CP */" >> tmp.fil
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +020011
Wolfgang Denk88bd7432005-10-09 00:22:48 +020012cpu="arm_intcm"
13variant="unknown core module"
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +020014
Wolfgang Denk111d6062008-01-02 15:54:45 +010015if [ "$1" = "" ]
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +020016then
Wolfgang Denk88bd7432005-10-09 00:22:48 +020017 echo "$0:: No parameters - using arm_intcm"
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +020018else
19 case "$1" in
Wolfgang Denk88bd7432005-10-09 00:22:48 +020020 ap966)
21 cpu="arm_intcm"
22 variant="unported core module CM966E-S"
23 ;;
24
25 ap922_config)
26 cpu="arm_intcm"
27 variant="unported core module CM922T"
28 ;;
29
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +020030 integratorcp_config | \
31 cp_config)
32 cpu="arm_intcm"
Wolfgang Denk88bd7432005-10-09 00:22:48 +020033 variant="unspecified core module"
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +020034 ;;
35
36 cp922_XA10_config)
Wolfgang Denk88bd7432005-10-09 00:22:48 +020037 cpu="arm_intcm"
38 variant="unported core module CM922T_XA10"
Wolfgang Denka1be4762008-05-20 16:00:29 +020039 echo -n "#define CONFIG_CM922T_XA10" >> tmp.fil
40 echo " 1 /* CPU core is ARM922T_XA10 */" >> tmp.fil
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +020041 ;;
42
43 cp920t_config)
44 cpu="arm920t"
Wolfgang Denk88bd7432005-10-09 00:22:48 +020045 variant="Core module CM920T"
Wolfgang Denka1be4762008-05-20 16:00:29 +020046 echo -n "#define CONFIG_CM920T" >> tmp.fil
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +020047 echo " 1 /* CPU core is ARM920T */" >> tmp.fil
48 ;;
49
50 cp926ejs_config)
51 cpu="arm926ejs"
Wolfgang Denk88bd7432005-10-09 00:22:48 +020052 variant="Core module CM926EJ-S"
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +020053 echo -n "#define CONFIG_CM926EJ_S" >> tmp.fil
54 echo " 1 /* CPU core is ARM926EJ-S */ " >> tmp.fil
55 ;;
56
57
58 cp946es_config)
59 cpu="arm946es"
Wolfgang Denk88bd7432005-10-09 00:22:48 +020060 variant="Core module CM946E-S"
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +020061 echo -n "#define CONFIG_CM946E_S" >> tmp.fil
62 echo " 1 /* CPU core is ARM946E-S */ " >> tmp.fil
63 ;;
64
65 cp1136_config)
66 cpu="arm1136"
Wolfgang Denk88bd7432005-10-09 00:22:48 +020067 variant="Core module CM1136EJF-S"
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +020068 echo -n "#define CONFIG_CM1136EJF_S" >> tmp.fil
69 echo " 1 /* CPU core is ARM1136JF-S */ " >> tmp.fil
70 ;;
71
72 *)
Wolfgang Denk88bd7432005-10-09 00:22:48 +020073 echo "$0:: Unknown core module"
74 variant="unknown core module"
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +020075 cpu="arm_intcm"
76 ;;
77
78 esac
79
80fi
81
Wolfgang Denk111d6062008-01-02 15:54:45 +010082if [ "$cpu" = "arm_intcm" ]
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +020083then
84 echo "/* Core module undefined/not ported */" >> tmp.fil
Wolfgang Denka1be4762008-05-20 16:00:29 +020085 echo "#define CONFIG_ARM_INTCM 1" >> tmp.fil
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +020086 echo -n "#undef CONFIG_CM_MULTIPLE_SSRAM" >> tmp.fil
Wolfgang Denka1be4762008-05-20 16:00:29 +020087 echo -n " /* CM may not have " >> tmp.fil
88 echo "multiple SSRAM mapping */" >> tmp.fil
89 echo -n "#undef CONFIG_CM_SPD_DETECT " >> tmp.fil
90 echo -n " /* CM may not support SPD " >> tmp.fil
91 echo "query */" >> tmp.fil
92 echo -n "#undef CONFIG_CM_REMAP " >> tmp.fil
93 echo -n " /* CM may not support " >> tmp.fil
94 echo "remapping */" >> tmp.fil
95 echo -n "#undef CONFIG_CM_INIT " >> tmp.fil
96 echo -n " /* CM may not have " >> tmp.fil
97 echo "initialization reg */" >> tmp.fil
98 echo -n "#undef CONFIG_CM_TCRAM " >> tmp.fil
99 echo " /* CM may not have TCRAM */" >> tmp.fil
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +0200100fi
Marian Balakowiczd62379d2006-09-01 19:49:50 +0200101
102mkdir -p ${obj}include
103mkdir -p ${obj}board/integratorcp
104mv tmp.fil ${obj}include/config.h
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +0200105# ---------------------------------------------------------
106# Ensure correct core object loaded first in U-Boot image
107# ---------------------------------------------------------
Marian Balakowiczd62379d2006-09-01 19:49:50 +0200108sed -r 's/CPU_FILE/cpu\/'$cpu'\/start.o/; s/#.*//' ${src}board/integratorcp/u-boot.lds.template > ${obj}board/integratorcp/u-boot.lds
Wolfgang Denk7f88a5e2005-10-06 17:08:18 +0200109# ---------------------------------------------------------
110# Complete the configuration
111# ---------------------------------------------------------
Marian Balakowiczd62379d2006-09-01 19:49:50 +0200112$MKCONFIG -a integratorcp arm $cpu integratorcp;
Wolfgang Denk88bd7432005-10-09 00:22:48 +0200113echo "Variant:: $variant with core $cpu"
114