Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/arm/cpuinfo.c
Show All 37 Lines | |||||
{ | { | ||||
/* Use safe defaults for start */ | /* Use safe defaults for start */ | ||||
.dcache_line_size = 32, | .dcache_line_size = 32, | ||||
.dcache_line_mask = 31, | .dcache_line_mask = 31, | ||||
.icache_line_size = 32, | .icache_line_size = 32, | ||||
.icache_line_mask = 31, | .icache_line_mask = 31, | ||||
}; | }; | ||||
struct plat_cpuinfo plat_cpuinfo = | |||||
{ | |||||
/* Default configuration */ | |||||
.plat_actlr = 0, | |||||
}; | |||||
/* Read and parse CPU id scheme */ | /* Read and parse CPU id scheme */ | ||||
void | void | ||||
cpuinfo_init(void) | cpuinfo_init(void) | ||||
{ | { | ||||
cpuinfo.midr = cp15_midr_get(); | cpuinfo.midr = cp15_midr_get(); | ||||
/* Test old version id schemes first */ | /* Test old version id schemes first */ | ||||
if ((cpuinfo.midr & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_ARM_LTD) { | if ((cpuinfo.midr & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_ARM_LTD) { | ||||
▲ Show 20 Lines • Show All 177 Lines • ▼ Show 20 Lines | case CPU_ARCH_ARM1176: | ||||
* Enable the return stack | * Enable the return stack | ||||
* Enable dynamic branch prediction | * Enable dynamic branch prediction | ||||
* Enable static branch prediction | * Enable static branch prediction | ||||
*/ | */ | ||||
*actlr_mask = (1 << 6) | (1 << 2) | (1 << 1) | (1 << 0); | *actlr_mask = (1 << 6) | (1 << 2) | (1 << 1) | (1 << 0); | ||||
*actlr_set = (1 << 6) | (1 << 2) | (1 << 1) | (1 << 0); | *actlr_set = (1 << 6) | (1 << 2) | (1 << 1) | (1 << 0); | ||||
break; | break; | ||||
} | } | ||||
/* Add platform specific settings */ | |||||
*actlr_mask |= plat_cpuinfo.plat_actlr; | |||||
*actlr_set |= plat_cpuinfo.plat_actlr; | |||||
return; | return; | ||||
mmel: Please, follow logic used in this function and use one variable for 'mask' and other for 'set'.
| |||||
} | } | ||||
} | } |
Please, follow logic used in this function and use one variable for 'mask' and other for 'set'.