| /* SPDX-License-Identifier: GPL-2.0+ */ |
| * MIPS Coherence Manager (CM) Initialisation |
| * Copyright (c) 2016 Imagination Technologies Ltd. |
| #include <asm/addrspace.h> |
| #include <asm/mipsregs.h> |
| /* Config3 must exist for a CM to be present */ |
| /* Check Config3.CMGCR to determine CM presence */ |
| and t0, t0, MIPS_CONF3_CMGCR |
| /* Find the current physical GCR base address */ |
| 1: MFC0 t0, CP0_CMGCRBASE |
| /* If the GCRs are where we want, we're done */ |
| PTR_LI t1, CONFIG_MIPS_CM_BASE |
| /* Move the GCRs to our configured base address */ |
| sw zero, GCR_BASE_UPPER(t0) |
| /* Re-check the GCR base */ |