From 597d53030b25b715e31d589cb1c439be4d995608 Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Thu, 19 May 2011 08:54:29 -0500 Subject: [PATCH] --- yaml --- r: 259101 b: refs/heads/master c: d173ea6b4078f37320b49d06f9656ba76ee1ba6c h: refs/heads/master i: 259099: 44bd6b71e2bc71bf03ea8f627fc30a01052f06e8 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/sysdev/fsl_soc.c | 27 +++++++++++++++++++++++++++ trunk/arch/powerpc/sysdev/fsl_soc.h | 3 +++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 44bcb79d42d9..e572313976ff 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3a93261f70c7b92f84fb211b66f1d4e66c0b3dce +refs/heads/master: d173ea6b4078f37320b49d06f9656ba76ee1ba6c diff --git a/trunk/arch/powerpc/sysdev/fsl_soc.c b/trunk/arch/powerpc/sysdev/fsl_soc.c index 19e5015e039b..265313e8396b 100644 --- a/trunk/arch/powerpc/sysdev/fsl_soc.c +++ b/trunk/arch/powerpc/sysdev/fsl_soc.c @@ -41,6 +41,7 @@ #include #include #include +#include /* For the Freescale hypervisor */ extern void init_fcc_ioports(struct fs_platform_info*); extern void init_fec_ioports(struct fs_platform_info*); @@ -252,3 +253,29 @@ void fsl_rstcr_restart(char *cmd) struct platform_diu_data_ops diu_ops; EXPORT_SYMBOL(diu_ops); #endif + +/* + * Restart the current partition + * + * This function should be assigned to the ppc_md.restart function pointer, + * to initiate a partition restart when we're running under the Freescale + * hypervisor. + */ +void fsl_hv_restart(char *cmd) +{ + pr_info("hv restart\n"); + fh_partition_restart(-1); +} + +/* + * Halt the current partition + * + * This function should be assigned to the ppc_md.power_off and ppc_md.halt + * function pointers, to shut down the partition when we're running under + * the Freescale hypervisor. + */ +void fsl_hv_halt(void) +{ + pr_info("hv exit\n"); + fh_partition_stop(-1); +} diff --git a/trunk/arch/powerpc/sysdev/fsl_soc.h b/trunk/arch/powerpc/sysdev/fsl_soc.h index 53609489a62b..2ece02beb8ff 100644 --- a/trunk/arch/powerpc/sysdev/fsl_soc.h +++ b/trunk/arch/powerpc/sysdev/fsl_soc.h @@ -36,5 +36,8 @@ struct platform_diu_data_ops { extern struct platform_diu_data_ops diu_ops; #endif +void fsl_hv_restart(char *cmd); +void fsl_hv_halt(void); + #endif #endif