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 | |
| 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); |
Thierry Reding | 37bb829 | 2019-04-15 11:32:30 +0200 | [diff] [blame] | 17 | int cboot_get_ethaddr(const void *fdt, uint8_t mac[ETH_ALEN]); |
Thierry Reding | 7cef2b2 | 2019-04-15 11:32:28 +0200 | [diff] [blame] | 18 | #else |
| 19 | static inline void cboot_save_boot_params(unsigned long x0, unsigned long x1, |
| 20 | unsigned long x2, unsigned long x3) |
| 21 | { |
| 22 | } |
| 23 | |
| 24 | static inline int cboot_dram_init(void) |
| 25 | { |
| 26 | return -ENOSYS; |
| 27 | } |
| 28 | |
| 29 | static inline int cboot_dram_init_banksize(void) |
| 30 | { |
| 31 | return -ENOSYS; |
| 32 | } |
| 33 | |
| 34 | static inline ulong cboot_get_usable_ram_top(ulong total_size) |
| 35 | { |
| 36 | return 0; |
| 37 | } |
Thierry Reding | 37bb829 | 2019-04-15 11:32:30 +0200 | [diff] [blame] | 38 | |
| 39 | static inline int cboot_get_ethaddr(const void *fdt, uint8_t mac[ETH_ALEN]) |
| 40 | { |
| 41 | return -ENOSYS; |
| 42 | } |
Thierry Reding | 7cef2b2 | 2019-04-15 11:32:28 +0200 | [diff] [blame] | 43 | #endif |
| 44 | |
| 45 | #endif |