/* * SLCA structure contains System Attention Indicator location * code (FRU ID = SA). Add this information to device tree * (under '/ibm,opal/led'). */ void slca_dt_add_sai_node(void) { const struct slca_entry *s_entry; struct dt_node *led_node, *sai_node; s_entry = slca_get_sai_entry(); if (!s_entry) return; /* Create /ibm,opal node, if its not created already */ if (!opal_node) return; /* Crete LED parent node */ led_node = dt_find_by_path(opal_node, DT_PROPERTY_LED_NODE); if (!led_node) return; if (s_entry->loc_code_len == 0 || s_entry->loc_code_len > LOC_CODE_SIZE) return; /* Create SAI node */ sai_node = dt_new(led_node, s_entry->loc_code); assert(sai_node); dt_add_property_string(sai_node, DT_PROPERTY_LED_TYPES, LED_TYPE_ATTENTION); }
/* * Get IPL side */ static void get_ipl_side(void) { struct dt_node *iplp; const char *side = NULL; iplp = dt_find_by_path(dt_root, "ipl-params/ipl-params"); if (iplp) side = dt_prop_get_def(iplp, "cec-ipl-side", NULL); printf("CUPD: IPL SIDE = %s\n", side); if (!side || !strcmp(side, "temp")) ipl_side = FW_IPL_SIDE_TEMP; else ipl_side = FW_IPL_SIDE_PERM; }