blob: 4e1da98d1f2105bc61ce8849b482e14efe1c31b6 [file] [log] [blame]
Thierry Reding7cef2b22019-04-15 11:32:28 +02001/* 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
Simon Glass274e0b02020-05-10 11:39:56 -06009#include <net.h>
10
Thierry Reding7cef2b22019-04-15 11:32:28 +020011#ifdef CONFIG_ARM64
Simon Glass274e0b02020-05-10 11:39:56 -060012
Thierry Reding7cef2b22019-04-15 11:32:28 +020013extern unsigned long cboot_boot_x0;
14
15void cboot_save_boot_params(unsigned long x0, unsigned long x1,
16 unsigned long x2, unsigned long x3);
17int cboot_dram_init(void);
18int cboot_dram_init_banksize(void);
19ulong cboot_get_usable_ram_top(ulong total_size);
Thierry Reding37bb8292019-04-15 11:32:30 +020020int cboot_get_ethaddr(const void *fdt, uint8_t mac[ETH_ALEN]);
Thierry Reding7cef2b22019-04-15 11:32:28 +020021#else
22static inline void cboot_save_boot_params(unsigned long x0, unsigned long x1,
23 unsigned long x2, unsigned long x3)
24{
25}
26
27static inline int cboot_dram_init(void)
28{
29 return -ENOSYS;
30}
31
32static inline int cboot_dram_init_banksize(void)
33{
34 return -ENOSYS;
35}
36
37static inline ulong cboot_get_usable_ram_top(ulong total_size)
38{
39 return 0;
40}
Thierry Reding37bb8292019-04-15 11:32:30 +020041
42static inline int cboot_get_ethaddr(const void *fdt, uint8_t mac[ETH_ALEN])
43{
44 return -ENOSYS;
45}
Thierry Reding7cef2b22019-04-15 11:32:28 +020046#endif
47
48#endif