diff options
-rw-r--r-- | arch/powerpc/sysdev/fsl_soc.c | 27 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_soc.h | 3 |
2 files changed, 30 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 19e5015e039b..265313e8396b 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <sysdev/fsl_soc.h> | 41 | #include <sysdev/fsl_soc.h> |
42 | #include <mm/mmu_decl.h> | 42 | #include <mm/mmu_decl.h> |
43 | #include <asm/cpm2.h> | 43 | #include <asm/cpm2.h> |
44 | #include <asm/fsl_hcalls.h> /* For the Freescale hypervisor */ | ||
44 | 45 | ||
45 | extern void init_fcc_ioports(struct fs_platform_info*); | 46 | extern void init_fcc_ioports(struct fs_platform_info*); |
46 | extern void init_fec_ioports(struct fs_platform_info*); | 47 | extern void init_fec_ioports(struct fs_platform_info*); |
@@ -252,3 +253,29 @@ void fsl_rstcr_restart(char *cmd) | |||
252 | struct platform_diu_data_ops diu_ops; | 253 | struct platform_diu_data_ops diu_ops; |
253 | EXPORT_SYMBOL(diu_ops); | 254 | EXPORT_SYMBOL(diu_ops); |
254 | #endif | 255 | #endif |
256 | |||
257 | /* | ||
258 | * Restart the current partition | ||
259 | * | ||
260 | * This function should be assigned to the ppc_md.restart function pointer, | ||
261 | * to initiate a partition restart when we're running under the Freescale | ||
262 | * hypervisor. | ||
263 | */ | ||
264 | void fsl_hv_restart(char *cmd) | ||
265 | { | ||
266 | pr_info("hv restart\n"); | ||
267 | fh_partition_restart(-1); | ||
268 | } | ||
269 | |||
270 | /* | ||
271 | * Halt the current partition | ||
272 | * | ||
273 | * This function should be assigned to the ppc_md.power_off and ppc_md.halt | ||
274 | * function pointers, to shut down the partition when we're running under | ||
275 | * the Freescale hypervisor. | ||
276 | */ | ||
277 | void fsl_hv_halt(void) | ||
278 | { | ||
279 | pr_info("hv exit\n"); | ||
280 | fh_partition_stop(-1); | ||
281 | } | ||
diff --git a/arch/powerpc/sysdev/fsl_soc.h b/arch/powerpc/sysdev/fsl_soc.h index 53609489a62b..2ece02beb8ff 100644 --- a/arch/powerpc/sysdev/fsl_soc.h +++ b/arch/powerpc/sysdev/fsl_soc.h | |||
@@ -36,5 +36,8 @@ struct platform_diu_data_ops { | |||
36 | extern struct platform_diu_data_ops diu_ops; | 36 | extern struct platform_diu_data_ops diu_ops; |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | void fsl_hv_restart(char *cmd); | ||
40 | void fsl_hv_halt(void); | ||
41 | |||
39 | #endif | 42 | #endif |
40 | #endif | 43 | #endif |