uniphier.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef UNIPHIER_H
  7. #define UNIPHIER_H
  8. #include <stdint.h>
  9. #include <string.h>
  10. unsigned int uniphier_get_soc_type(void);
  11. unsigned int uniphier_get_soc_model(void);
  12. unsigned int uniphier_get_soc_revision(void);
  13. unsigned int uniphier_get_soc_id(void);
  14. #define UNIPHIER_SOC_LD11 0
  15. #define UNIPHIER_SOC_LD20 1
  16. #define UNIPHIER_SOC_PXS3 2
  17. #define UNIPHIER_SOC_UNKNOWN 0xffffffff
  18. unsigned int uniphier_get_boot_device(unsigned int soc);
  19. #define UNIPHIER_BOOT_DEVICE_EMMC 0
  20. #define UNIPHIER_BOOT_DEVICE_NAND 1
  21. #define UNIPHIER_BOOT_DEVICE_NOR 2
  22. #define UNIPHIER_BOOT_DEVICE_SD 3
  23. #define UNIPHIER_BOOT_DEVICE_USB 4
  24. #define UNIPHIER_BOOT_DEVICE_RSV 0xffffffff
  25. unsigned int uniphier_get_boot_master(unsigned int soc);
  26. #define UNIPHIER_BOOT_MASTER_THIS 0
  27. #define UNIPHIER_BOOT_MASTER_SCP 1
  28. #define UNIPHIER_BOOT_MASTER_EXT 2
  29. void uniphier_console_setup(unsigned int soc);
  30. struct io_block_dev_spec;
  31. int uniphier_emmc_init(unsigned int soc,
  32. struct io_block_dev_spec **block_dev_spec);
  33. int uniphier_nand_init(unsigned int soc,
  34. struct io_block_dev_spec **block_dev_spec);
  35. int uniphier_usb_init(unsigned int soc,
  36. struct io_block_dev_spec **block_dev_spec);
  37. int uniphier_io_setup(unsigned int soc, uintptr_t mem_base);
  38. void uniphier_init_image_descs(uintptr_t mem_base);
  39. struct image_info;
  40. struct image_info *uniphier_get_image_info(unsigned int image_id);
  41. int uniphier_scp_is_running(void);
  42. void uniphier_scp_start(uint32_t scp_base);
  43. void uniphier_scp_open_com(void);
  44. void uniphier_scp_system_off(void);
  45. void uniphier_scp_system_reset(void);
  46. void uniphier_mmap_setup(unsigned int soc);
  47. void uniphier_cci_init(unsigned int soc);
  48. void uniphier_cci_enable(void);
  49. void uniphier_cci_disable(void);
  50. void uniphier_gic_driver_init(unsigned int soc);
  51. void uniphier_gic_init(void);
  52. void uniphier_gic_cpuif_enable(void);
  53. void uniphier_gic_cpuif_disable(void);
  54. void uniphier_gic_pcpu_init(void);
  55. void uniphier_psci_init(unsigned int soc);
  56. unsigned int uniphier_calc_core_pos(u_register_t mpidr);
  57. #endif /* UNIPHIER_H */