Home | History | Annotate | Download | only in hikey
      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);
     47 
     48 const char *hikey_init_serialno(void);
     49 int hikey_read_serialno(struct random_serial_num *serialno);
     50 int hikey_write_serialno(struct random_serial_num *serialno);
     51 
     52 void init_acpu_dvfs(void);
     53 
     54 #endif /* __HIKEY_PRIVATE_H__ */
     55