1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (c) 2019 NVIDIA Corporation. All rights reserved.
4  */
5 
6 #ifndef _TEGRA_CBOOT_H_
7 #define _TEGRA_CBOOT_H_
8 
9 #include <net.h>
10 
11 #ifdef CONFIG_ARM64
12 
13 extern unsigned long cboot_boot_x0;
14 
15 void cboot_save_boot_params(unsigned long x0, unsigned long x1,
16 			    unsigned long x2, unsigned long x3);
17 int cboot_dram_init(void);
18 int cboot_dram_init_banksize(void);
19 ulong cboot_get_usable_ram_top(ulong total_size);
20 int cboot_get_ethaddr(const void *fdt, uint8_t mac[ETH_ALEN]);
21 #else
cboot_save_boot_params(unsigned long x0,unsigned long x1,unsigned long x2,unsigned long x3)22 static inline void cboot_save_boot_params(unsigned long x0, unsigned long x1,
23 					  unsigned long x2, unsigned long x3)
24 {
25 }
26 
cboot_dram_init(void)27 static inline int cboot_dram_init(void)
28 {
29 	return -ENOSYS;
30 }
31 
cboot_dram_init_banksize(void)32 static inline int cboot_dram_init_banksize(void)
33 {
34 	return -ENOSYS;
35 }
36 
cboot_get_usable_ram_top(ulong total_size)37 static inline ulong cboot_get_usable_ram_top(ulong total_size)
38 {
39 	return 0;
40 }
41 
cboot_get_ethaddr(const void * fdt,uint8_t mac[ETH_ALEN])42 static inline int cboot_get_ethaddr(const void *fdt, uint8_t mac[ETH_ALEN])
43 {
44 	return -ENOSYS;
45 }
46 #endif
47 
48 #endif
49