mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-18 16:08:53 +09:00
![Tom Rini](/assets/img/avatar_default.png)
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
45 lines
946 B
ArmAsm
45 lines
946 B
ArmAsm
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* MIPS Coherence Manager (CM) Initialisation
|
|
*
|
|
* Copyright (c) 2016 Imagination Technologies Ltd.
|
|
*/
|
|
|
|
#include <asm/addrspace.h>
|
|
#include <asm/asm.h>
|
|
#include <asm/cm.h>
|
|
#include <asm/mipsregs.h>
|
|
#include <asm/regdef.h>
|
|
|
|
LEAF(mips_cm_map)
|
|
/* Config3 must exist for a CM to be present */
|
|
mfc0 t0, CP0_CONFIG, 1
|
|
bgez t0, 2f
|
|
mfc0 t0, CP0_CONFIG, 2
|
|
bgez t0, 2f
|
|
|
|
/* Check Config3.CMGCR to determine CM presence */
|
|
mfc0 t0, CP0_CONFIG, 3
|
|
and t0, t0, MIPS_CONF3_CMGCR
|
|
beqz t0, 2f
|
|
|
|
/* Find the current physical GCR base address */
|
|
1: MFC0 t0, CP0_CMGCRBASE
|
|
PTR_SLL t0, t0, 4
|
|
|
|
/* If the GCRs are where we want, we're done */
|
|
PTR_LI t1, CONFIG_MIPS_CM_BASE
|
|
beq t0, t1, 2f
|
|
|
|
/* Move the GCRs to our configured base address */
|
|
PTR_LI t2, CKSEG1
|
|
PTR_ADDU t0, t0, t2
|
|
sw zero, GCR_BASE_UPPER(t0)
|
|
sw t1, GCR_BASE(t0)
|
|
|
|
/* Re-check the GCR base */
|
|
b 1b
|
|
|
|
2: jr ra
|
|
END(mips_cm_map)
|