Jean-Christophe PLAGNIOL-VILLARD | 693a7ae | 2009-05-17 00:58:37 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | mkdir -p ${obj}include |
| 4 | mkdir -p ${obj}board/armltd/integrator |
| 5 | |
| 6 | config_file=${obj}include/config.h |
| 7 | |
| 8 | if [ "$1" = "ap" ] |
| 9 | then |
| 10 | # --------------------------------------------------------- |
| 11 | # Set the platform defines |
| 12 | # --------------------------------------------------------- |
| 13 | echo -n "/* Integrator configuration implied " > ${config_file} |
| 14 | echo " by Makefile target */" >> ${config_file} |
| 15 | echo -n "#define CONFIG_INTEGRATOR" >> ${config_file} |
| 16 | echo " /* Integrator board */" >> ${config_file} |
| 17 | echo -n "#define CONFIG_ARCH_INTEGRATOR" >> ${config_file} |
| 18 | echo " 1 /* Integrator/AP */" >> ${config_file} |
| 19 | # --------------------------------------------------------- |
| 20 | # Set the core module defines according to Core Module |
| 21 | # --------------------------------------------------------- |
| 22 | cpu="arm_intcm" |
| 23 | variant="unknown core module" |
| 24 | |
| 25 | if [ "$2" = "" ] |
| 26 | then |
| 27 | echo "$0:: No parameters - using arm_intcm" |
| 28 | else |
| 29 | case "$2" in |
| 30 | ap7_config) |
| 31 | cpu="arm_intcm" |
| 32 | variant="unported core module CM7TDMI" |
| 33 | ;; |
| 34 | |
| 35 | ap966) |
| 36 | cpu="arm_intcm" |
| 37 | variant="unported core module CM966E-S" |
| 38 | ;; |
| 39 | |
| 40 | ap922_config) |
| 41 | cpu="arm_intcm" |
| 42 | variant="unported core module CM922T" |
| 43 | ;; |
| 44 | |
| 45 | integratorap_config | \ |
| 46 | ap_config) |
| 47 | cpu="arm_intcm" |
| 48 | variant="unspecified core module" |
| 49 | ;; |
| 50 | |
| 51 | ap720t_config) |
| 52 | cpu="arm720t" |
| 53 | echo -n "#define CONFIG_CM720T" >> ${config_file} |
| 54 | echo " 1 /* CPU core is ARM720T */ " >> ${config_file} |
| 55 | variant="Core module CM720T" |
| 56 | ;; |
| 57 | |
| 58 | ap922_XA10_config) |
| 59 | cpu="arm_intcm" |
| 60 | variant="unported core module CM922T_XA10" |
| 61 | echo -n "#define CONFIG_CM922T_XA10" >> ${config_file} |
| 62 | echo " 1 /* CPU core is ARM922T_XA10 */" >> ${config_file} |
| 63 | ;; |
| 64 | |
| 65 | ap920t_config) |
| 66 | cpu="arm920t" |
| 67 | variant="Core module CM920T" |
| 68 | echo -n "#define CONFIG_CM920T" >> ${config_file} |
| 69 | echo " 1 /* CPU core is ARM920T */" >> ${config_file} |
| 70 | ;; |
| 71 | |
| 72 | ap926ejs_config) |
| 73 | cpu="arm926ejs" |
| 74 | variant="Core module CM926EJ-S" |
| 75 | echo -n "#define CONFIG_CM926EJ_S" >> ${config_file} |
| 76 | echo " 1 /* CPU core is ARM926EJ-S */ " >> ${config_file} |
| 77 | ;; |
| 78 | |
| 79 | ap946es_config) |
| 80 | cpu="arm946es" |
| 81 | variant="Core module CM946E-S" |
| 82 | echo -n "#define CONFIG_CM946E_S" >> ${config_file} |
| 83 | echo " 1 /* CPU core is ARM946E-S */ " >> ${config_file} |
| 84 | ;; |
| 85 | |
| 86 | *) |
| 87 | echo "$0:: Unknown core module" |
| 88 | variant="unknown core module" |
| 89 | cpu="arm_intcm" |
| 90 | ;; |
| 91 | |
| 92 | esac |
| 93 | fi |
| 94 | |
| 95 | case "$cpu" in |
| 96 | arm_intcm) |
| 97 | echo "/* Core module undefined/not ported */" >> ${config_file} |
| 98 | echo "#define CONFIG_ARM_INTCM 1" >> ${config_file} |
| 99 | echo -n "#undef CONFIG_CM_MULTIPLE_SSRAM" >> ${config_file} |
| 100 | echo -n " /* CM may not have " >> ${config_file} |
| 101 | echo "multiple SSRAM mapping */" >> ${config_file} |
| 102 | echo -n "#undef CONFIG_CM_SPD_DETECT " >> ${config_file} |
| 103 | echo -n " /* CM may not support SPD " >> ${config_file} |
| 104 | echo "query */" >> ${config_file} |
| 105 | echo -n "#undef CONFIG_CM_REMAP " >> ${config_file} |
| 106 | echo -n " /* CM may not support " >> ${config_file} |
| 107 | echo "remapping */" >> ${config_file} |
| 108 | echo -n "#undef CONFIG_CM_INIT " >> ${config_file} |
| 109 | echo -n " /* CM may not have " >> ${config_file} |
| 110 | echo "initialization reg */" >> ${config_file} |
| 111 | echo -n "#undef CONFIG_CM_TCRAM " >> ${config_file} |
| 112 | echo " /* CM may not have TCRAM */" >> ${config_file} |
| 113 | echo -n " /* May not be processor " >> ${config_file} |
| 114 | echo "without cache support */" >> ${config_file} |
| 115 | echo "#define CONFIG_SYS_NO_ICACHE 1" >> ${config_file} |
| 116 | echo "#define CONFIG_SYS_NO_DCACHE 1" >> ${config_file} |
| 117 | ;; |
| 118 | |
| 119 | arm720t) |
| 120 | echo -n " /* May not be processor " >> ${config_file} |
| 121 | echo "without cache support */" >> ${config_file} |
| 122 | echo "#define CONFIG_SYS_NO_ICACHE 1" >> ${config_file} |
| 123 | echo "#define CONFIG_SYS_NO_DCACHE 1" >> ${config_file} |
| 124 | ;; |
| 125 | esac |
| 126 | |
| 127 | else |
| 128 | |
| 129 | # --------------------------------------------------------- |
| 130 | # Set the platform defines |
| 131 | # --------------------------------------------------------- |
| 132 | echo -n "/* Integrator configuration implied " > ${config_file} |
| 133 | echo " by Makefile target */" >> ${config_file} |
| 134 | echo -n "#define CONFIG_INTEGRATOR" >> ${config_file} |
| 135 | echo " /* Integrator board */" >> ${config_file} |
| 136 | echo -n "#define CONFIG_ARCH_CINTEGRATOR" >> ${config_file} |
| 137 | echo " 1 /* Integrator/CP */" >> ${config_file} |
| 138 | |
| 139 | cpu="arm_intcm" |
| 140 | variant="unknown core module" |
| 141 | |
| 142 | if [ "$2" = "" ] |
| 143 | then |
| 144 | echo "$0:: No parameters - using arm_intcm" |
| 145 | else |
| 146 | case "$2" in |
| 147 | ap966) |
| 148 | cpu="arm_intcm" |
| 149 | variant="unported core module CM966E-S" |
| 150 | ;; |
| 151 | |
| 152 | ap922_config) |
| 153 | cpu="arm_intcm" |
| 154 | variant="unported core module CM922T" |
| 155 | ;; |
| 156 | |
| 157 | integratorcp_config | \ |
| 158 | cp_config) |
| 159 | cpu="arm_intcm" |
| 160 | variant="unspecified core module" |
| 161 | ;; |
| 162 | |
| 163 | cp922_XA10_config) |
| 164 | cpu="arm_intcm" |
| 165 | variant="unported core module CM922T_XA10" |
| 166 | echo -n "#define CONFIG_CM922T_XA10" >> ${config_file} |
| 167 | echo " 1 /* CPU core is ARM922T_XA10 */" >> ${config_file} |
| 168 | ;; |
| 169 | |
| 170 | cp920t_config) |
| 171 | cpu="arm920t" |
| 172 | variant="Core module CM920T" |
| 173 | echo -n "#define CONFIG_CM920T" >> ${config_file} |
| 174 | echo " 1 /* CPU core is ARM920T */" >> ${config_file} |
| 175 | ;; |
| 176 | |
| 177 | cp926ejs_config) |
| 178 | cpu="arm926ejs" |
| 179 | variant="Core module CM926EJ-S" |
| 180 | echo -n "#define CONFIG_CM926EJ_S" >> ${config_file} |
| 181 | echo " 1 /* CPU core is ARM926EJ-S */ " >> ${config_file} |
| 182 | ;; |
| 183 | |
| 184 | |
| 185 | cp946es_config) |
| 186 | cpu="arm946es" |
| 187 | variant="Core module CM946E-S" |
| 188 | echo -n "#define CONFIG_CM946E_S" >> ${config_file} |
| 189 | echo " 1 /* CPU core is ARM946E-S */ " >> ${config_file} |
| 190 | ;; |
| 191 | |
| 192 | cp1136_config) |
| 193 | cpu="arm1136" |
| 194 | variant="Core module CM1136EJF-S" |
| 195 | echo -n "#define CONFIG_CM1136EJF_S" >> ${config_file} |
| 196 | echo " 1 /* CPU core is ARM1136JF-S */ " >> ${config_file} |
| 197 | ;; |
| 198 | |
| 199 | *) |
| 200 | echo "$0:: Unknown core module" |
| 201 | variant="unknown core module" |
| 202 | cpu="arm_intcm" |
| 203 | ;; |
| 204 | |
| 205 | esac |
| 206 | |
| 207 | fi |
| 208 | |
| 209 | if [ "$cpu" = "arm_intcm" ] |
| 210 | then |
| 211 | echo "/* Core module undefined/not ported */" >> ${config_file} |
| 212 | echo "#define CONFIG_ARM_INTCM 1" >> ${config_file} |
| 213 | echo -n "#undef CONFIG_CM_MULTIPLE_SSRAM" >> ${config_file} |
| 214 | echo -n " /* CM may not have " >> ${config_file} |
| 215 | echo "multiple SSRAM mapping */" >> ${config_file} |
| 216 | echo -n "#undef CONFIG_CM_SPD_DETECT " >> ${config_file} |
| 217 | echo -n " /* CM may not support SPD " >> ${config_file} |
| 218 | echo "query */" >> ${config_file} |
| 219 | echo -n "#undef CONFIG_CM_REMAP " >> ${config_file} |
| 220 | echo -n " /* CM may not support " >> ${config_file} |
| 221 | echo "remapping */" >> ${config_file} |
| 222 | echo -n "#undef CONFIG_CM_INIT " >> ${config_file} |
| 223 | echo -n " /* CM may not have " >> ${config_file} |
| 224 | echo "initialization reg */" >> ${config_file} |
| 225 | echo -n "#undef CONFIG_CM_TCRAM " >> ${config_file} |
| 226 | echo " /* CM may not have TCRAM */" >> ${config_file} |
| 227 | fi |
| 228 | |
| 229 | fi # ap |
| 230 | |
| 231 | # --------------------------------------------------------- |
| 232 | # Complete the configuration |
| 233 | # --------------------------------------------------------- |
Wolfgang Denk | 749dba7 | 2009-07-18 22:09:38 +0200 | [diff] [blame] | 234 | $MKCONFIG -a -n "${2%%_config}" integrator$1 arm $cpu integrator armltd |
| 235 | echo "Variant: $variant with core $cpu" |