]> Git Repo - J-u-boot.git/blame - include/common.h
common: Move reset_cpu() to the CPU header
[J-u-boot.git] / include / common.h
CommitLineData
83d290c5 1/* SPDX-License-Identifier: GPL-2.0+ */
e2211743 2/*
ec1fa185
SG
3 * Common header file for U-Boot
4 *
5 * This file still includes quite a bit of stuff that should be in separate
288b29e4 6 * headers. Please think before adding more things.
1045315d 7 * Patches to remove things are welcome.
ec1fa185 8 *
3b74e7ec 9 * (C) Copyright 2000-2009
e2211743 10 * Wolfgang Denk, DENX Software Engineering, [email protected].
e2211743
WD
11 */
12
13#ifndef __COMMON_H_
d0b8feef 14#define __COMMON_H_ 1
e2211743 15
fcd3c87e
WD
16#ifndef __ASSEMBLY__ /* put C only stuff in this section */
17
e2211743 18#include <config.h>
2307ea40 19#include <errno.h>
a7b81769 20#include <time.h>
25ddd1fb 21#include <asm-offsets.h>
e2211743 22#include <linux/bitops.h>
0a70fb4c 23#include <linux/bug.h>
5bc516ed 24#include <linux/delay.h>
e2211743 25#include <linux/types.h>
b44b3026 26#include <linux/printk.h>
e2211743 27#include <linux/string.h>
9aed5080 28#include <linux/stringify.h>
e2211743
WD
29#include <asm/ptrace.h>
30#include <stdarg.h>
7fea7b1a 31#include <stdio.h>
cba1da49 32#include <linux/kernel.h>
85043159 33
e2211743
WD
34#include <part.h>
35#include <flash.h>
36#include <image.h>
37
4d1fd7f1
YS
38#ifdef __LP64__
39#define CONFIG_SYS_SUPPORT_64BIT_DATA
40#endif
41
0e98b0a6 42#include <log.h>
21726a7a 43
c83bf6a2 44#include <asm/u-boot.h> /* boot information for Linux kernel */
e2211743
WD
45#include <asm/global_data.h> /* global data used for startup functions */
46
d6f87712
PD
47/* startup functions, used in:
48 * common/board_f.c
11f86cba 49 * common/init/board_init.c
e2c219cd 50 * common/board_r.c
fc22ee21 51 * common/board_info.c
d6f87712 52 */
dafa84d2
PD
53#include <init.h>
54
e2211743
WD
55/*
56 * Function Prototypes
57 */
c83bf6a2 58void hang (void) __attribute__ ((noreturn));
e2211743 59
2ea09c83 60#include <display_options.h>
e2211743 61
74de7aef
WD
62/* common/cmd_source.c */
63int source (ulong addr, const char *fit_uname);
e2211743 64
c83bf6a2 65extern ulong load_addr; /* Default Load Address */
1aec244a
SG
66extern ulong save_addr; /* Default Save Address */
67extern ulong save_size; /* Default Save Size */
e2211743 68
c83bf6a2 69/* common/memsize.c */
a55d23cc 70long get_ram_size (long *, long);
e3866163 71phys_size_t get_effective_memsize(void);
c83bf6a2 72
6d0f6bcf 73#if defined(CONFIG_SYS_DRAM_TEST)
e2211743 74int testdram(void);
6d0f6bcf 75#endif /* CONFIG_SYS_DRAM_TEST */
e2211743 76
e11938ea 77/* lib/uuid.c */
d718ded0 78#include <uuid.h>
e11938ea 79
78acc472 80/* lib/vsprintf.c */
9785c905 81#include <vsprintf.h>
e2211743 82
4ef8d53c
JH
83/* lib/net_utils.c */
84#include <net.h>
4ef8d53c 85
097e1783 86#include <bootstage.h>
e2211743 87
2a6713b0
AP
88#else /* __ASSEMBLY__ */
89
2a6713b0 90#endif /* __ASSEMBLY__ */
fcd3c87e
WD
91
92/* Put only stuff here that the assembler can digest */
93
155cfb5e 94#define ROUND(a,b) (((a) + (b) - 1) & ~((b) - 1))
4b03ac8b 95
c9689ca3
SG
96/*
97 * check_member() - Check the offset of a structure member
98 *
99 * @structure: Name of structure (e.g. global_data)
100 * @member: Name of member (e.g. baudrate)
101 * @offset: Expected offset in bytes
102 */
103#define check_member(structure, member, offset) _Static_assert( \
104 offsetof(struct structure, member) == offset, \
105 "`struct " #structure "` offset for `" #member "` is not " #offset)
106
c3eb3fe4
MF
107/* Pull in stuff for the build system */
108#ifdef DO_DEPS_ONLY
f3998fdc 109# include <env_internal.h>
c3eb3fe4
MF
110#endif
111
e2211743 112#endif /* __COMMON_H_ */
This page took 0.701754 seconds and 4 git commands to generate.