Haojian Zhuang | 5f281b3 | 2017-05-24 08:45:05 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef __HIKEY_PRIVATE_H__ |
| 8 | #define __HIKEY_PRIVATE_H__ |
| 9 | |
| 10 | #include <bl_common.h> |
| 11 | |
| 12 | #define RANDOM_MAX 0x7fffffffffffffff |
| 13 | #define RANDOM_MAGIC 0x9a4dbeaf |
| 14 | |
| 15 | struct random_serial_num { |
| 16 | uint64_t magic; |
| 17 | uint64_t data; |
| 18 | char serialno[32]; |
| 19 | }; |
| 20 | |
| 21 | /* |
| 22 | * Function and variable prototypes |
| 23 | */ |
| 24 | void hikey_init_mmu_el1(unsigned long total_base, |
| 25 | unsigned long total_size, |
| 26 | unsigned long ro_start, |
| 27 | unsigned long ro_limit, |
| 28 | unsigned long coh_start, |
| 29 | unsigned long coh_limit); |
| 30 | void hikey_init_mmu_el3(unsigned long total_base, |
| 31 | unsigned long total_size, |
| 32 | unsigned long ro_start, |
| 33 | unsigned long ro_limit, |
| 34 | unsigned long coh_start, |
| 35 | unsigned long coh_limit); |
| 36 | |
| 37 | void hikey_ddr_init(void); |
| 38 | void hikey_io_setup(void); |
| 39 | |
| 40 | int hikey_get_partition_size(const char *arg, int left, char *response); |
| 41 | int hikey_get_partition_type(const char *arg, int left, char *response); |
| 42 | |
| 43 | int hikey_erase(const char *arg); |
| 44 | int hikey_flash(const char *arg); |
| 45 | int hikey_oem(const char *arg); |
| 46 | int hikey_reboot(const char *arg); |
Jerome Forissier | c52e55f | 2015-05-04 09:40:03 +0200 | [diff] [blame] | 47 | void hikey_security_setup(void); |
Haojian Zhuang | 5f281b3 | 2017-05-24 08:45:05 +0800 | [diff] [blame] | 48 | |
| 49 | const char *hikey_init_serialno(void); |
| 50 | int hikey_read_serialno(struct random_serial_num *serialno); |
| 51 | int hikey_write_serialno(struct random_serial_num *serialno); |
| 52 | |
| 53 | void init_acpu_dvfs(void); |
| 54 | |
| 55 | #endif /* __HIKEY_PRIVATE_H__ */ |