aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2011-05-19 09:54:29 -0400
committerKumar Gala <galak@kernel.crashing.org>2011-06-27 09:30:53 -0400
commitd173ea6b4078f37320b49d06f9656ba76ee1ba6c (patch)
tree1822d534b6465eee65fcd9fbbbb15daee025031d /arch/powerpc/sysdev
parent3a93261f70c7b92f84fb211b66f1d4e66c0b3dce (diff)
powerpc: add Freescale hypervisor partition control functions
Add functions to restart and halt the current partition when running under the Freescale hypervisor. These functions should be assigned to various function pointers of the ppc_md structure during the .probe() function for the board: ppc_md.restart = fsl_hv_restart; ppc_md.power_off = fsl_hv_halt; ppc_md.halt = fsl_hv_halt; Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c27
-rw-r--r--arch/powerpc/sysdev/fsl_soc.h3
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
45extern void init_fcc_ioports(struct fs_platform_info*); 46extern void init_fcc_ioports(struct fs_platform_info*);
46extern void init_fec_ioports(struct fs_platform_info*); 47extern void init_fec_ioports(struct fs_platform_info*);
@@ -252,3 +253,29 @@ void fsl_rstcr_restart(char *cmd)
252struct platform_diu_data_ops diu_ops; 253struct platform_diu_data_ops diu_ops;
253EXPORT_SYMBOL(diu_ops); 254EXPORT_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 */
264void 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 */
277void 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 {
36extern struct platform_diu_data_ops diu_ops; 36extern struct platform_diu_data_ops diu_ops;
37#endif 37#endif
38 38
39void fsl_hv_restart(char *cmd);
40void fsl_hv_halt(void);
41
39#endif 42#endif
40#endif 43#endif