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/config.h> 165a0015d6SChris Zankel #include <linux/types.h> 175a0015d6SChris Zankel #include <linux/pci.h> 185a0015d6SChris Zankel #include <linux/time.h> 195a0015d6SChris Zankel #include <asm/platform.h> 205a0015d6SChris Zankel #include <asm/timex.h> 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, init_irq, (void), { }); 335a0015d6SChris Zankel _F(void, restart, (void), { while(1); }); 345a0015d6SChris Zankel _F(void, halt, (void), { while(1); }); 355a0015d6SChris Zankel _F(void, power_off, (void), { while(1); }); 365a0015d6SChris Zankel _F(void, idle, (void), { __asm__ __volatile__ ("waiti 0" ::: "memory"); }); 375a0015d6SChris Zankel _F(void, heartbeat, (void), { }); 385a0015d6SChris Zankel _F(int, pcibios_fixup, (void), { return 0; }); 395a0015d6SChris Zankel _F(int, get_rtc_time, (time_t* t), { return 0; }); 405a0015d6SChris Zankel _F(int, set_rtc_time, (time_t t), { return 0; }); 415a0015d6SChris Zankel 42288a60cfSChris Zankel #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT 435a0015d6SChris Zankel _F(void, calibrate_ccount, (void), 445a0015d6SChris Zankel { 455a0015d6SChris Zankel printk ("ERROR: Cannot calibrate cpu frequency! Assuming 100MHz.\n"); 465a0015d6SChris Zankel ccount_per_jiffy = 100 * (1000000UL/HZ); 475a0015d6SChris Zankel }); 485a0015d6SChris Zankel #endif 495a0015d6SChris Zankel 50