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