planetcore.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef _PPC_BOOT_PLANETCORE_H_
  2. #define _PPC_BOOT_PLANETCORE_H_
  3. #include "types.h"
  4. #define PLANETCORE_KEY_BOARD_TYPE "BO"
  5. #define PLANETCORE_KEY_BOARD_REV "BR"
  6. #define PLANETCORE_KEY_MB_RAM "D1"
  7. #define PLANETCORE_KEY_MAC_ADDR "EA"
  8. #define PLANETCORE_KEY_FLASH_SPEED "FS"
  9. #define PLANETCORE_KEY_IP_ADDR "IP"
  10. #define PLANETCORE_KEY_KB_NVRAM "NV"
  11. #define PLANETCORE_KEY_PROCESSOR "PR"
  12. #define PLANETCORE_KEY_PROC_VARIANT "PV"
  13. #define PLANETCORE_KEY_SERIAL_BAUD "SB"
  14. #define PLANETCORE_KEY_SERIAL_PORT "SP"
  15. #define PLANETCORE_KEY_SWITCH "SW"
  16. #define PLANETCORE_KEY_TEMP_OFFSET "TC"
  17. #define PLANETCORE_KEY_TARGET_IP "TIP"
  18. #define PLANETCORE_KEY_CRYSTAL_HZ "XT"
  19. /* Prepare the table for processing, by turning all newlines
  20. * into NULL bytes.
  21. */
  22. void planetcore_prepare_table(char *table);
  23. /* Return the value associated with a given key in text,
  24. * decimal, or hex format.
  25. *
  26. * Returns zero/NULL on failure, non-zero on success.
  27. */
  28. const char *planetcore_get_key(const char *table, const char *key);
  29. int planetcore_get_decimal(const char *table, const char *key, u64 *val);
  30. int planetcore_get_hex(const char *table, const char *key, u64 *val);
  31. /* Updates the device tree local-mac-address properties based
  32. * on the EA tag.
  33. */
  34. void planetcore_set_mac_addrs(const char *table);
  35. /* Sets the linux,stdout-path in the /chosen node. This requires the
  36. * linux,planetcore-label property in each serial node.
  37. */
  38. void planetcore_set_stdout_path(const char *table);
  39. #endif