mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-18 18:59:44 +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>
51 lines
1.4 KiB
C
51 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright 2014-2015, Freescale Semiconductor
|
|
*/
|
|
|
|
#ifndef _FSL_LAYERSCAPE_MP_H
|
|
#define _FSL_LAYERSCAPE_MP_H
|
|
|
|
/*
|
|
* Each spin table element is defined as
|
|
* struct {
|
|
* uint64_t entry_addr;
|
|
* uint64_t status;
|
|
* uint64_t lpid;
|
|
* uint64_t arch_comp;
|
|
* };
|
|
* we pad this struct to 64 bytes so each entry is in its own cacheline
|
|
* the actual spin table is an array of these structures
|
|
*/
|
|
#define SPIN_TABLE_ELEM_ENTRY_ADDR_IDX 0
|
|
#define SPIN_TABLE_ELEM_STATUS_IDX 1
|
|
#define SPIN_TABLE_ELEM_LPID_IDX 2
|
|
/* compare os arch and cpu arch */
|
|
#define SPIN_TABLE_ELEM_ARCH_COMP_IDX 3
|
|
#define WORDS_PER_SPIN_TABLE_ENTRY 8 /* pad to 64 bytes */
|
|
#define SPIN_TABLE_ELEM_SIZE 64
|
|
|
|
/* os arch is same as cpu arch */
|
|
#define OS_ARCH_SAME 0
|
|
/* os arch is different from cpu arch */
|
|
#define OS_ARCH_DIFF 1
|
|
|
|
#define id_to_core(x) ((x & 3) | (x >> 6))
|
|
#ifndef __ASSEMBLY__
|
|
extern u64 __spin_table[];
|
|
extern u64 __real_cntfrq;
|
|
extern u64 *secondary_boot_code;
|
|
extern size_t __secondary_boot_code_size;
|
|
#ifdef CONFIG_MP
|
|
int fsl_layerscape_wake_seconday_cores(void);
|
|
#else
|
|
static inline int fsl_layerscape_wake_seconday_cores(void) { return 0; }
|
|
#endif
|
|
void *get_spin_tbl_addr(void);
|
|
phys_addr_t determine_mp_bootpg(void);
|
|
void secondary_boot_func(void);
|
|
int is_core_online(u64 cpu_id);
|
|
u32 cpu_pos_mask(void);
|
|
#endif
|
|
|
|
#endif /* _FSL_LAYERSCAPE_MP_H */
|