blob: d0ba83ae8bc8e3d9e479656c109147f9e4a72330 [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
Tom Rinidec7ea02024-05-20 13:35:03 -06009#include <linux/errno.h>
10#include <linux/types.h>
Simon Glass274e0b02020-05-10 11:39:56 -060011#include <net.h>
12
Thierry Reding7cef2b22019-04-15 11:32:28 +020013#ifdef CONFIG_ARM64
Simon Glass274e0b02020-05-10 11:39:56 -060014
Thierry Reding7cef2b22019-04-15 11:32:28 +020015extern unsigned long cboot_boot_x0;
16
17void cboot_save_boot_params(unsigned long x0, unsigned long x1,
18 unsigned long x2, unsigned long x3);
19int cboot_dram_init(void);
20int cboot_dram_init_banksize(void);
21ulong cboot_get_usable_ram_top(ulong total_size);
Thierry Reding37bb8292019-04-15 11:32:30 +020022int cboot_get_ethaddr(const void *fdt, uint8_t mac[ETH_ALEN]);
Thierry Reding7cef2b22019-04-15 11:32:28 +020023#else
24static inline void cboot_save_boot_params(unsigned long x0, unsigned long x1,
25 unsigned long x2, unsigned long x3)
26{
27}
28
29static inline int cboot_dram_init(void)
30{
31 return -ENOSYS;
32}
33
34static inline int cboot_dram_init_banksize(void)
35{
36 return -ENOSYS;
37}
38
39static inline ulong cboot_get_usable_ram_top(ulong total_size)
40{
41 return 0;
42}
Thierry Reding37bb8292019-04-15 11:32:30 +020043
44static inline int cboot_get_ethaddr(const void *fdt, uint8_t mac[ETH_ALEN])
45{
46 return -ENOSYS;
47}
Thierry Reding7cef2b22019-04-15 11:32:28 +020048#endif
49
50#endif