Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 2 | /* |
Simon Glass | ec1fa18 | 2019-08-02 09:44:27 -0600 | [diff] [blame] | 3 | * Common header file for U-Boot |
| 4 | * |
Simon Glass | addc376 | 2019-12-28 10:45:12 -0700 | [diff] [blame] | 5 | * This file still includes quite a few headers that should be included |
| 6 | * individually as needed. Patches to remove things are welcome. |
Simon Glass | ec1fa18 | 2019-08-02 09:44:27 -0600 | [diff] [blame] | 7 | * |
Wolfgang Denk | 3b74e7e | 2009-05-16 10:47:45 +0200 | [diff] [blame] | 8 | * (C) Copyright 2000-2009 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 9 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 10 | */ |
| 11 | |
| 12 | #ifndef __COMMON_H_ |
Wolfgang Denk | d0b8fee | 2012-01-06 07:36:44 +0100 | [diff] [blame] | 13 | #define __COMMON_H_ 1 |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 14 | |
Wolfgang Denk | fcd3c87 | 2009-07-24 00:17:48 +0200 | [diff] [blame] | 15 | #ifndef __ASSEMBLY__ /* put C only stuff in this section */ |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 16 | #include <config.h> |
Joe Hershberger | 2307ea4 | 2016-04-04 04:07:33 -0500 | [diff] [blame] | 17 | #include <errno.h> |
Masahiro Yamada | a7b8176 | 2016-12-28 00:36:00 +0900 | [diff] [blame] | 18 | #include <time.h> |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 19 | #include <linux/types.h> |
Masahiro Yamada | b44b302 | 2017-09-16 14:10:40 +0900 | [diff] [blame] | 20 | #include <linux/printk.h> |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 21 | #include <linux/string.h> |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 22 | #include <stdarg.h> |
Masahiro Yamada | 7fea7b1 | 2017-09-16 14:10:39 +0900 | [diff] [blame] | 23 | #include <stdio.h> |
Masahiro Yamada | cba1da4 | 2014-11-07 03:03:28 +0900 | [diff] [blame] | 24 | #include <linux/kernel.h> |
wdenk | c83bf6a | 2004-01-06 22:38:14 +0000 | [diff] [blame] | 25 | #include <asm/u-boot.h> /* boot information for Linux kernel */ |
Simon Glass | 9785c90 | 2011-11-02 09:52:07 +0000 | [diff] [blame] | 26 | #include <vsprintf.h> |
Andre Przywara | 2a6713b | 2017-01-02 11:48:30 +0000 | [diff] [blame] | 27 | #endif /* __ASSEMBLY__ */ |
Wolfgang Denk | fcd3c87 | 2009-07-24 00:17:48 +0200 | [diff] [blame] | 28 | |
Bo Lv | 72d0e90 | 2023-01-02 14:27:34 +0000 | [diff] [blame] | 29 | #ifdef CONFIG_AMLOGIC_MODIFY |
| 30 | #include <linux/delay.h> |
| 31 | #include <linux/bug.h> |
| 32 | |
| 33 | /* lib/rand.c */ |
| 34 | #define RAND_MAX -1U |
| 35 | void srand(unsigned int seed); |
| 36 | unsigned int rand(void); |
| 37 | unsigned int rand_r(unsigned int *seedp); |
| 38 | #endif |
| 39 | |
Mike Frysinger | c3eb3fe | 2011-07-08 10:44:25 +0000 | [diff] [blame] | 40 | /* Pull in stuff for the build system */ |
| 41 | #ifdef DO_DEPS_ONLY |
Simon Glass | f3998fd | 2019-08-02 09:44:25 -0600 | [diff] [blame] | 42 | # include <env_internal.h> |
Mike Frysinger | c3eb3fe | 2011-07-08 10:44:25 +0000 | [diff] [blame] | 43 | #endif |
| 44 | |
Bo Lv | 96a66d0 | 2023-05-12 19:18:22 +0800 | [diff] [blame] | 45 | #ifdef CONFIG_AML_UASAN |
| 46 | #include <amlogic/uasan.h> |
| 47 | #endif |
| 48 | |
benlong.zhou | f0969fb | 2023-10-26 16:42:01 +0800 | [diff] [blame] | 49 | #ifdef CONFIG_AMLOGIC_MODIFY |
| 50 | #ifdef CONFIG_KALLSYMS |
| 51 | extern const char *symbol_lookup(unsigned long addr, unsigned long *caddr, unsigned long *naddr); |
| 52 | #else |
| 53 | static inline const char *symbol_lookup(unsigned long addr, |
| 54 | unsigned long *caddr, |
| 55 | unsigned long *naddr) |
| 56 | { |
| 57 | return NULL; |
| 58 | } |
| 59 | #endif |
| 60 | #endif |
| 61 | |
wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 62 | #endif /* __COMMON_H_ */ |