mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-05 11:00:15 +00:00
83d290c56f
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>
50 lines
1.4 KiB
C
50 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright (C) 2016 ARM Ltd.
|
|
*
|
|
* ARM and ARM64 barrier instructions
|
|
* split from armv7.h to allow sharing between ARM and ARM64
|
|
*
|
|
* Original copyright in armv7.h was:
|
|
* (C) Copyright 2010 Texas Instruments, <www.ti.com> Aneesh V <aneesh@ti.com>
|
|
*
|
|
* Much of the original barrier code was contributed by:
|
|
* Valentine Barshak <valentine.barshak@cogentembedded.com>
|
|
*/
|
|
#ifndef __BARRIERS_H__
|
|
#define __BARRIERS_H__
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#ifndef CONFIG_ARM64
|
|
/*
|
|
* CP15 Barrier instructions
|
|
* Please note that we have separate barrier instructions in ARMv7
|
|
* However, we use the CP15 based instructtions because we use
|
|
* -march=armv5 in U-Boot
|
|
*/
|
|
#define CP15ISB asm volatile ("mcr p15, 0, %0, c7, c5, 4" : : "r" (0))
|
|
#define CP15DSB asm volatile ("mcr p15, 0, %0, c7, c10, 4" : : "r" (0))
|
|
#define CP15DMB asm volatile ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0))
|
|
|
|
#endif /* !CONFIG_ARM64 */
|
|
|
|
#if __LINUX_ARM_ARCH__ >= 7
|
|
#define ISB asm volatile ("isb sy" : : : "memory")
|
|
#define DSB asm volatile ("dsb sy" : : : "memory")
|
|
#define DMB asm volatile ("dmb sy" : : : "memory")
|
|
#elif __LINUX_ARM_ARCH__ == 6
|
|
#define ISB CP15ISB
|
|
#define DSB CP15DSB
|
|
#define DMB CP15DMB
|
|
#else
|
|
#define ISB asm volatile ("" : : : "memory")
|
|
#define DSB CP15DSB
|
|
#define DMB asm volatile ("" : : : "memory")
|
|
#endif
|
|
|
|
#define isb() ISB
|
|
#define dsb() DSB
|
|
#define dmb() DMB
|
|
#endif /* __ASSEMBLY__ */
|
|
#endif /* __BARRIERS_H__ */
|