Thierry Reding | 7cef2b2 | 2019-04-15 11:32:28 +0200 | [diff] [blame] | 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 | |
Simon Glass | 274e0b0 | 2020-05-10 11:39:56 -0600 | [diff] [blame] | 9 | #include <net.h> |
| 10 | |
Thierry Reding | 7cef2b2 | 2019-04-15 11:32:28 +0200 | [diff] [blame] | 11 | #ifdef CONFIG_ARM64 |
Simon Glass | 274e0b0 | 2020-05-10 11:39:56 -0600 | [diff] [blame] | 12 | |
Thierry Reding | 7cef2b2 | 2019-04-15 11:32:28 +0200 | [diff] [blame] | 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); |
Thierry Reding | 37bb829 | 2019-04-15 11:32:30 +0200 | [diff] [blame] | 20 | int cboot_get_ethaddr(const void *fdt, uint8_t mac[ETH_ALEN]); |
Thierry Reding | 7cef2b2 | 2019-04-15 11:32:28 +0200 | [diff] [blame] | 21 | #else |
| 22 | static inline void cboot_save_boot_params(unsigned long x0, unsigned long x1, |
| 23 | unsigned long x2, unsigned long x3) |
| 24 | { |
| 25 | } |
| 26 | |
| 27 | static inline int cboot_dram_init(void) |
| 28 | { |
| 29 | return -ENOSYS; |
| 30 | } |
| 31 | |
| 32 | static inline int cboot_dram_init_banksize(void) |
| 33 | { |
| 34 | return -ENOSYS; |
| 35 | } |
| 36 | |
| 37 | static inline ulong cboot_get_usable_ram_top(ulong total_size) |
| 38 | { |
| 39 | return 0; |
| 40 | } |
Thierry Reding | 37bb829 | 2019-04-15 11:32:30 +0200 | [diff] [blame] | 41 | |
| 42 | static inline int cboot_get_ethaddr(const void *fdt, uint8_t mac[ETH_ALEN]) |
| 43 | { |
| 44 | return -ENOSYS; |
| 45 | } |
Thierry Reding | 7cef2b2 | 2019-04-15 11:32:28 +0200 | [diff] [blame] | 46 | #endif |
| 47 | |
| 48 | #endif |