hikey960_private.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef HIKEY960_PRIVATE_H
  7. #define HIKEY960_PRIVATE_H
  8. #include <common/bl_common.h>
  9. /* Fastboot serial number */
  10. #define HIKEY960_SERIAL_NUMBER_LBA (UFS_BASE + 20)
  11. #define HIKEY960_SERIAL_NUMBER_SIZE 16
  12. /*
  13. * Function and variable prototypes
  14. */
  15. void hikey960_init_mmu_el1(unsigned long total_base,
  16. unsigned long total_size,
  17. unsigned long ro_start,
  18. unsigned long ro_limit,
  19. unsigned long coh_start,
  20. unsigned long coh_limit);
  21. void hikey960_init_mmu_el3(unsigned long total_base,
  22. unsigned long total_size,
  23. unsigned long ro_start,
  24. unsigned long ro_limit,
  25. unsigned long coh_start,
  26. unsigned long coh_limit);
  27. void hikey960_io_setup(void);
  28. int hikey960_read_boardid(unsigned int *id);
  29. int hikey960_set_fip_addr(unsigned int image_id, const char *name);
  30. int hikey960_load_serialno(uint64_t *serno);
  31. void hikey960_clk_init(void);
  32. void hikey960_pmu_init(void);
  33. void hikey960_regulator_enable(void);
  34. void hikey960_tzc_init(void);
  35. void hikey960_peri_init(void);
  36. void hikey960_pinmux_init(void);
  37. void hikey960_gpio_init(void);
  38. void set_retention_ticks(unsigned int val);
  39. void clr_retention_ticks(unsigned int val);
  40. void clr_ex(void);
  41. void nop(void);
  42. /*******************************************************************************
  43. * Struct for parameters received from BL2
  44. ******************************************************************************/
  45. typedef struct plat_params_from_bl2 {
  46. /* Fastboot serial number gathered from UFS */
  47. uint64_t fastboot_serno;
  48. } plat_params_from_bl2_t;
  49. #endif /* HIKEY960_PRIVATE_H */