• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifdef CONFIG_ARM64
10 extern unsigned long cboot_boot_x0;
11 
12 void cboot_save_boot_params(unsigned long x0, unsigned long x1,
13 			    unsigned long x2, unsigned long x3);
14 int cboot_dram_init(void);
15 int cboot_dram_init_banksize(void);
16 ulong cboot_get_usable_ram_top(ulong total_size);
17 int cboot_get_ethaddr(const void *fdt, uint8_t mac[ETH_ALEN]);
18 #else
cboot_save_boot_params(unsigned long x0,unsigned long x1,unsigned long x2,unsigned long x3)19 static inline void cboot_save_boot_params(unsigned long x0, unsigned long x1,
20 					  unsigned long x2, unsigned long x3)
21 {
22 }
23 
cboot_dram_init(void)24 static inline int cboot_dram_init(void)
25 {
26 	return -ENOSYS;
27 }
28 
cboot_dram_init_banksize(void)29 static inline int cboot_dram_init_banksize(void)
30 {
31 	return -ENOSYS;
32 }
33 
cboot_get_usable_ram_top(ulong total_size)34 static inline ulong cboot_get_usable_ram_top(ulong total_size)
35 {
36 	return 0;
37 }
38 
cboot_get_ethaddr(const void * fdt,uint8_t mac[ETH_ALEN])39 static inline int cboot_get_ethaddr(const void *fdt, uint8_t mac[ETH_ALEN])
40 {
41 	return -ENOSYS;
42 }
43 #endif
44 
45 #endif
46