fdt_fixup.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2019-2020, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef FDT_FIXUP_H
  7. #define FDT_FIXUP_H
  8. #include <stdbool.h>
  9. #include <stddef.h>
  10. #include <stdint.h>
  11. #define INVALID_BASE_ADDR ((uintptr_t)~0UL)
  12. struct psci_cpu_idle_state {
  13. const char *name;
  14. uint32_t power_state;
  15. bool local_timer_stop;
  16. uint32_t entry_latency_us;
  17. uint32_t exit_latency_us;
  18. uint32_t min_residency_us;
  19. uint32_t wakeup_latency_us;
  20. };
  21. int dt_add_psci_node(void *fdt);
  22. int dt_add_psci_cpu_enable_methods(void *fdt);
  23. int fdt_add_reserved_memory(void *dtb, const char *node_name,
  24. uintptr_t base, size_t size);
  25. int fdt_add_cpus_node(void *dtb, unsigned int afflv0,
  26. unsigned int afflv1, unsigned int afflv2);
  27. int fdt_add_cpu_idle_states(void *dtb, const struct psci_cpu_idle_state *state);
  28. int fdt_adjust_gic_redist(void *dtb, unsigned int nr_cores, uintptr_t gicr_base,
  29. unsigned int gicr_frame_size);
  30. int fdt_set_mac_address(void *dtb, unsigned int ethernet_idx,
  31. const uint8_t *mac_addr);
  32. #endif /* FDT_FIXUP_H */