15 #include <linux/errno.h>
16 #include <linux/sched.h>
17 #include <linux/kernel.h>
18 #include <linux/tty.h>
19 #include <linux/reboot.h>
29 #include <asm/machdep.h>
37 static void __init pnv_setup_arch(
void)
46 if (firmware_has_feature(FW_FEATURE_OPAL))
55 static void __init pnv_init_early(
void)
57 #ifdef CONFIG_HVC_OPAL
58 if (firmware_has_feature(FW_FEATURE_OPAL))
65 static void __init pnv_init_IRQ(
void)
72 static void pnv_show_cpuinfo(
struct seq_file *
m)
75 const char *
model =
"";
80 seq_printf(m,
"machine\t\t: PowerNV %s\n", model);
81 if (firmware_has_feature(FW_FEATURE_OPALv2))
83 else if (firmware_has_feature(FW_FEATURE_OPAL))
125 static void pnv_progress(
char *
s,
unsigned short hex)
130 static void pnv_kexec_cpu_down(
int crash_shutdown,
int secondary)
136 static void __init pnv_setup_machdep_opal(
void)
141 ppc_md.restart = pnv_restart;
142 ppc_md.power_off = pnv_power_off;
147 #ifdef CONFIG_PPC_POWERNV_RTAS
148 static void __init pnv_setup_machdep_rtas(
void)
150 if (
rtas_token(
"get-time-of-day") != RTAS_UNKNOWN_SERVICE) {
161 static int __init pnv_probe(
void)
163 unsigned long root = of_get_flat_dt_root();
165 if (!of_flat_dt_is_compatible(root,
"ibm,powernv"))
170 if (firmware_has_feature(FW_FEATURE_OPAL))
171 pnv_setup_machdep_opal();
172 #ifdef CONFIG_PPC_POWERNV_RTAS
174 pnv_setup_machdep_rtas();
185 .init_early = pnv_init_early,
186 .setup_arch = pnv_setup_arch,
187 .init_IRQ = pnv_init_IRQ,
188 .show_cpuinfo = pnv_show_cpuinfo,
189 .progress = pnv_progress,
190 .power_save = power7_idle,
193 .kexec_cpu_down = pnv_kexec_cpu_down,