Lines Matching +full:firmware +full:- +full:initialized

1 // SPDX-License-Identifier: GPL-2.0-only
9 #define pr_fmt(fmt) "DT idle-states: " fmt
33 idle_state->enter = match_id->data; in init_state_node()
39 idle_state->enter_s2idle = match_id->data; in init_state_node()
41 err = of_property_read_u32(state_node, "wakeup-latency-us", in init_state_node()
42 &idle_state->exit_latency); in init_state_node()
46 err = of_property_read_u32(state_node, "entry-latency-us", in init_state_node()
49 pr_debug(" * %pOF missing entry-latency-us property\n", in init_state_node()
51 return -EINVAL; in init_state_node()
54 err = of_property_read_u32(state_node, "exit-latency-us", in init_state_node()
57 pr_debug(" * %pOF missing exit-latency-us property\n", in init_state_node()
59 return -EINVAL; in init_state_node()
62 * If wakeup-latency-us is missing, default to entry+exit in init_state_node()
65 idle_state->exit_latency = entry_latency + exit_latency; in init_state_node()
68 err = of_property_read_u32(state_node, "min-residency-us", in init_state_node()
69 &idle_state->target_residency); in init_state_node()
71 pr_debug(" * %pOF missing min-residency-us property\n", in init_state_node()
73 return -EINVAL; in init_state_node()
76 err = of_property_read_string(state_node, "idle-state-name", &desc); in init_state_node()
78 desc = state_node->name; in init_state_node()
80 idle_state->flags = 0; in init_state_node()
81 if (of_property_read_bool(state_node, "local-timer-stop")) in init_state_node()
82 idle_state->flags |= CPUIDLE_FLAG_TIMER_STOP; in init_state_node()
88 strncpy(idle_state->name, state_node->name, CPUIDLE_NAME_LEN - 1); in init_state_node()
89 strncpy(idle_state->desc, desc, CPUIDLE_DESC_LEN - 1); in init_state_node()
109 * away since we certainly hit a firmware misconfiguration. in idle_state_valid()
128 * dt_init_idle_driver() - Parse the DT idle states and initialize the
130 * @drv: Pointer to CPU idle driver to be initialized
141 * @start_idx: First idle state index to be initialized
144 * array entries in the cpuidle driver are initialized accordingly starting
161 return -EINVAL; in dt_init_idle_driver()
166 * across CPUs, otherwise we hit a firmware misconfiguration. in dt_init_idle_driver()
168 cpumask = drv->cpumask ? : cpu_possible_mask; in dt_init_idle_driver()
178 err = -ENODEV; in dt_init_idle_driver()
190 err = -EINVAL; in dt_init_idle_driver()
199 idle_state = &drv->states[state_idx++]; in dt_init_idle_driver()
204 err = -EINVAL; in dt_init_idle_driver()
219 drv->state_count = state_idx; in dt_init_idle_driver()