15a0015d6SChris Zankel /* 25a0015d6SChris Zankel * arch/xtensa/kernel/platform.c 35a0015d6SChris Zankel * 45a0015d6SChris Zankel * Default platform functions. 55a0015d6SChris Zankel * 65a0015d6SChris Zankel * This file is subject to the terms and conditions of the GNU General Public 75a0015d6SChris Zankel * License. See the file "COPYING" in the main directory of this archive 85a0015d6SChris Zankel * for more details. 95a0015d6SChris Zankel * 105a0015d6SChris Zankel * Copyright (C) 2005 Tensilica Inc. 115a0015d6SChris Zankel * 125a0015d6SChris Zankel * Chris Zankel <chris@zankel.net> 135a0015d6SChris Zankel */ 145a0015d6SChris Zankel 155a0015d6SChris Zankel #include <linux/types.h> 165a0015d6SChris Zankel #include <linux/pci.h> 175a0015d6SChris Zankel #include <linux/time.h> 185a0015d6SChris Zankel #include <asm/platform.h> 195a0015d6SChris Zankel #include <asm/timex.h> 204e57b681STim Schmielau #include <asm/param.h> /* HZ */ 215a0015d6SChris Zankel 225a0015d6SChris Zankel #define _F(r,f,a,b) \ 235a0015d6SChris Zankel r __platform_##f a b; \ 245a0015d6SChris Zankel r platform_##f a __attribute__((weak, alias("__platform_"#f))) 255a0015d6SChris Zankel 265a0015d6SChris Zankel /* 275a0015d6SChris Zankel * Default functions that are used if no platform specific function is defined. 285a0015d6SChris Zankel * (Please, refer to include/asm-xtensa/platform.h for more information) 295a0015d6SChris Zankel */ 305a0015d6SChris Zankel 315a0015d6SChris Zankel _F(void, setup, (char** cmd), { }); 325a0015d6SChris Zankel _F(void, restart, (void), { while(1); }); 335a0015d6SChris Zankel _F(void, halt, (void), { while(1); }); 345a0015d6SChris Zankel _F(void, power_off, (void), { while(1); }); 355a0015d6SChris Zankel _F(void, idle, (void), { __asm__ __volatile__ ("waiti 0" ::: "memory"); }); 365a0015d6SChris Zankel _F(void, heartbeat, (void), { }); 375a0015d6SChris Zankel _F(int, pcibios_fixup, (void), { return 0; }); 38b06c14e5SMax Filippov _F(void, pcibios_init, (void), { }); 395a0015d6SChris Zankel 40288a60cfSChris Zankel #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT 415a0015d6SChris Zankel _F(void, calibrate_ccount, (void), 425a0015d6SChris Zankel { 43fa48cf42SMax Filippov pr_err("ERROR: Cannot calibrate cpu frequency! Assuming 10MHz.\n"); 44e504c4b6SBaruch Siach ccount_freq = 10 * 1000000UL; 455a0015d6SChris Zankel }); 465a0015d6SChris Zankel #endif 47