Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _PPC_BOOT_PLANETCORE_H_
0003 #define _PPC_BOOT_PLANETCORE_H_
0004 
0005 #include "types.h"
0006 
0007 #define PLANETCORE_KEY_BOARD_TYPE   "BO"
0008 #define PLANETCORE_KEY_BOARD_REV    "BR"
0009 #define PLANETCORE_KEY_MB_RAM       "D1"
0010 #define PLANETCORE_KEY_MAC_ADDR     "EA"
0011 #define PLANETCORE_KEY_FLASH_SPEED  "FS"
0012 #define PLANETCORE_KEY_IP_ADDR      "IP"
0013 #define PLANETCORE_KEY_KB_NVRAM     "NV"
0014 #define PLANETCORE_KEY_PROCESSOR    "PR"
0015 #define PLANETCORE_KEY_PROC_VARIANT "PV"
0016 #define PLANETCORE_KEY_SERIAL_BAUD  "SB"
0017 #define PLANETCORE_KEY_SERIAL_PORT  "SP"
0018 #define PLANETCORE_KEY_SWITCH       "SW"
0019 #define PLANETCORE_KEY_TEMP_OFFSET  "TC"
0020 #define PLANETCORE_KEY_TARGET_IP    "TIP"
0021 #define PLANETCORE_KEY_CRYSTAL_HZ   "XT"
0022 
0023 /* Prepare the table for processing, by turning all newlines
0024  * into NULL bytes.
0025  */
0026 void planetcore_prepare_table(char *table);
0027 
0028 /* Return the value associated with a given key in text,
0029  * decimal, or hex format.
0030  *
0031  * Returns zero/NULL on failure, non-zero on success.
0032  */
0033 const char *planetcore_get_key(const char *table, const char *key);
0034 int planetcore_get_decimal(const char *table, const char *key, u64 *val);
0035 int planetcore_get_hex(const char *table, const char *key, u64 *val);
0036 
0037 /* Updates the device tree local-mac-address properties based
0038  * on the EA tag.
0039  */
0040 void planetcore_set_mac_addrs(const char *table);
0041 
0042 /* Sets the linux,stdout-path in the /chosen node.  This requires the
0043  * linux,planetcore-label property in each serial node.
0044  */
0045 void planetcore_set_stdout_path(const char *table);
0046 
0047 #endif