setup.c (140cd7fb04a4a2bc09a30980bc8104cc89e09330) | setup.c (8eb8ac89a364305d05ad16be983b7890eb462cc3) |
---|---|
1/* 2 * PowerNV setup code. 3 * 4 * Copyright 2011 IBM Corp. 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 274 unchanged lines hidden (view full) --- 283 ppc_md.set_rtc_time = rtas_set_rtc_time; 284 } 285 ppc_md.restart = rtas_restart; 286 pm_power_off = rtas_power_off; 287 ppc_md.halt = rtas_halt; 288} 289#endif /* CONFIG_PPC_POWERNV_RTAS */ 290 | 1/* 2 * PowerNV setup code. 3 * 4 * Copyright 2011 IBM Corp. 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 274 unchanged lines hidden (view full) --- 283 ppc_md.set_rtc_time = rtas_set_rtc_time; 284 } 285 ppc_md.restart = rtas_restart; 286 pm_power_off = rtas_power_off; 287 ppc_md.halt = rtas_halt; 288} 289#endif /* CONFIG_PPC_POWERNV_RTAS */ 290 |
291static u32 supported_cpuidle_states; 292 293u32 pnv_get_supported_cpuidle_states(void) 294{ 295 return supported_cpuidle_states; 296} 297 298static int __init pnv_init_idle_states(void) 299{ 300 struct device_node *power_mgt; 301 int dt_idle_states; 302 const __be32 *idle_state_flags; 303 u32 len_flags, flags; 304 int i; 305 306 supported_cpuidle_states = 0; 307 308 if (cpuidle_disable != IDLE_NO_OVERRIDE) 309 return 0; 310 311 if (!firmware_has_feature(FW_FEATURE_OPALv3)) 312 return 0; 313 314 power_mgt = of_find_node_by_path("/ibm,opal/power-mgt"); 315 if (!power_mgt) { 316 pr_warn("opal: PowerMgmt Node not found\n"); 317 return 0; 318 } 319 320 idle_state_flags = of_get_property(power_mgt, 321 "ibm,cpu-idle-state-flags", &len_flags); 322 if (!idle_state_flags) { 323 pr_warn("DT-PowerMgmt: missing ibm,cpu-idle-state-flags\n"); 324 return 0; 325 } 326 327 dt_idle_states = len_flags / sizeof(u32); 328 329 for (i = 0; i < dt_idle_states; i++) { 330 flags = be32_to_cpu(idle_state_flags[i]); 331 supported_cpuidle_states |= flags; 332 } 333 334 return 0; 335} 336 337subsys_initcall(pnv_init_idle_states); 338 339 |
|
291static int __init pnv_probe(void) 292{ 293 unsigned long root = of_get_flat_dt_root(); 294 295 if (!of_flat_dt_is_compatible(root, "ibm,powernv")) 296 return 0; 297 298 hpte_init_native(); --- 53 unchanged lines hidden --- | 340static int __init pnv_probe(void) 341{ 342 unsigned long root = of_get_flat_dt_root(); 343 344 if (!of_flat_dt_is_compatible(root, "ibm,powernv")) 345 return 0; 346 347 hpte_init_native(); --- 53 unchanged lines hidden --- |