1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Platform specific functions 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * This file is subject to the terms and conditions of the GNU General 5*4882a593Smuzhiyun * Public License. See the file "COPYING" in the main directory of 6*4882a593Smuzhiyun * this archive for more details. 7*4882a593Smuzhiyun * 8*4882a593Smuzhiyun * Copyright (C) 2001 - 2005 Tensilica Inc. 9*4882a593Smuzhiyun */ 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun #ifndef _XTENSA_PLATFORM_H 12*4882a593Smuzhiyun #define _XTENSA_PLATFORM_H 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun #include <linux/types.h> 15*4882a593Smuzhiyun #include <asm/bootparam.h> 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun /* 18*4882a593Smuzhiyun * platform_init is called before the mmu is initialized to give the 19*4882a593Smuzhiyun * platform a early hook-up. bp_tag_t is a list of configuration tags 20*4882a593Smuzhiyun * passed from the boot-loader. 21*4882a593Smuzhiyun */ 22*4882a593Smuzhiyun extern void platform_init(bp_tag_t*); 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun /* 25*4882a593Smuzhiyun * platform_setup is called from setup_arch with a pointer to the command-line 26*4882a593Smuzhiyun * string. 27*4882a593Smuzhiyun */ 28*4882a593Smuzhiyun extern void platform_setup (char **); 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun /* 31*4882a593Smuzhiyun * platform_restart is called to restart the system. 32*4882a593Smuzhiyun */ 33*4882a593Smuzhiyun extern void platform_restart (void); 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun /* 36*4882a593Smuzhiyun * platform_halt is called to stop the system and halt. 37*4882a593Smuzhiyun */ 38*4882a593Smuzhiyun extern void platform_halt (void); 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun /* 41*4882a593Smuzhiyun * platform_power_off is called to stop the system and power it off. 42*4882a593Smuzhiyun */ 43*4882a593Smuzhiyun extern void platform_power_off (void); 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun /* 46*4882a593Smuzhiyun * platform_idle is called from the idle function. 47*4882a593Smuzhiyun */ 48*4882a593Smuzhiyun extern void platform_idle (void); 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun /* 51*4882a593Smuzhiyun * platform_heartbeat is called every HZ 52*4882a593Smuzhiyun */ 53*4882a593Smuzhiyun extern void platform_heartbeat (void); 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun /* 56*4882a593Smuzhiyun * platform_calibrate_ccount calibrates cpu clock freq (CONFIG_XTENSA_CALIBRATE) 57*4882a593Smuzhiyun */ 58*4882a593Smuzhiyun extern void platform_calibrate_ccount (void); 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun /* 61*4882a593Smuzhiyun * Flush and reset the mmu, simulate a processor reset, and 62*4882a593Smuzhiyun * jump to the reset vector. 63*4882a593Smuzhiyun */ 64*4882a593Smuzhiyun void cpu_reset(void) __attribute__((noreturn)); 65*4882a593Smuzhiyun 66*4882a593Smuzhiyun #endif /* _XTENSA_PLATFORM_H */ 67