aarch64: fix duplication of register cache

Change-Id: Ib4422e39171f19eea3f0b5a86f9dccdbb7044265
Signed-off-by: Matthias Welwarsky <matthias.welwarsky@sysgo.com>
gitignore-build
Matthias Welwarsky 2016-09-15 17:17:05 +02:00
parent 1826f0af1c
commit 18ab54b82a
1 changed files with 5 additions and 3 deletions

View File

@ -916,9 +916,11 @@ int armv8_dpm_setup(struct arm_dpm *dpm)
arm->read_core_reg = armv8_dpm_read_core_reg;
arm->write_core_reg = armv8_dpm_write_core_reg;
cache = armv8_build_reg_cache(target);
if (!cache)
return ERROR_FAIL;
if (arm->core_cache == NULL) {
cache = armv8_build_reg_cache(target);
if (!cache)
return ERROR_FAIL;
}
/* coprocessor access setup */
arm->mrc = dpmv8_mrc;