common: Move checkcpu() out of common.h
This function belongs in cpu_func.h so move it over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
2c629bd5c8
commit
30c7c43473
@ -10,6 +10,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <vsprintf.h>
|
||||
#include <watchdog.h>
|
||||
#include <command.h>
|
||||
|
@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <vsprintf.h>
|
||||
#include <watchdog.h>
|
||||
#include <command.h>
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <cpu_func.h>
|
||||
#include <netdev.h>
|
||||
#include <asm/processor.h>
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <bloblist.h>
|
||||
#include <cpu_func.h>
|
||||
#include <debug_uart.h>
|
||||
#include <handoff.h>
|
||||
#include <asm/mtrr.h>
|
||||
|
@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <fdtdec.h>
|
||||
#include <usb.h>
|
||||
#include <asm/io.h>
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <fdtdec.h>
|
||||
#include <netdev.h>
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <efi.h>
|
||||
#include <errno.h>
|
||||
#include <usb.h>
|
||||
|
@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <dm.h>
|
||||
#include <errno.h>
|
||||
#include <fdtdec.h>
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <pci.h>
|
||||
#include <qfw.h>
|
||||
#include <asm/irq.h>
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <mmc.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/ioapic.h>
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <asm/arch/slimbootloader.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <asm/u-boot-x86.h>
|
||||
|
||||
/*
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cpu_func.h>
|
||||
#include <debug_uart.h>
|
||||
|
||||
/*
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <acpi_s3.h>
|
||||
#include <cpu_func.h>
|
||||
#include <dm.h>
|
||||
#include <errno.h>
|
||||
#include <rtc.h>
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <bloblist.h>
|
||||
#include <console.h>
|
||||
#include <cpu.h>
|
||||
#include <cpu_func.h>
|
||||
#include <dm.h>
|
||||
#include <env.h>
|
||||
#include <env_internal.h>
|
||||
|
@ -203,7 +203,6 @@ void trap_init (ulong);
|
||||
|
||||
void s_init(void);
|
||||
|
||||
int checkcpu (void);
|
||||
int checkicache (void);
|
||||
int checkdcache (void);
|
||||
void upmconfig (unsigned int, unsigned int *, unsigned int);
|
||||
|
@ -20,4 +20,33 @@ int cpu_reset(u32 nr);
|
||||
int cpu_disable(u32 nr);
|
||||
int cpu_release(u32 nr, int argc, char * const argv[]);
|
||||
|
||||
static inline int cpumask_next(int cpu, unsigned int mask)
|
||||
{
|
||||
for (cpu++; !((1 << cpu) & mask); cpu++)
|
||||
;
|
||||
|
||||
return cpu;
|
||||
}
|
||||
|
||||
#define for_each_cpu(iter, cpu, num_cpus, mask) \
|
||||
for (iter = 0, cpu = cpumask_next(-1, mask); \
|
||||
iter < num_cpus; \
|
||||
iter++, cpu = cpumask_next(cpu, mask)) \
|
||||
|
||||
int cpu_numcores(void);
|
||||
int cpu_num_dspcores(void);
|
||||
u32 cpu_mask(void);
|
||||
u32 cpu_dsp_mask(void);
|
||||
int is_core_valid(unsigned int core);
|
||||
|
||||
/**
|
||||
* checkcpu() - perform an early check of the CPU
|
||||
*
|
||||
* This is used on PowerPC, SH and X86 machines as a CPU init mechanism. It is
|
||||
* called during the pre-relocation init sequence in board_init_f().
|
||||
*
|
||||
* @return 0 if oK, -ve on error
|
||||
*/
|
||||
int checkcpu(void);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user