blob: a17930747f204046e7d0456d6382b485fa2c2dc6 [file] [log] [blame]
Chris Zankel5a0015d2005-06-23 22:01:16 -07001/*
2 * arch/xtensa/kernel/platform.c
3 *
4 * Default platform functions.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 2005 Tensilica Inc.
11 *
12 * Chris Zankel <chris@zankel.net>
13 */
14
15#include <linux/config.h>
16#include <linux/types.h>
17#include <linux/pci.h>
18#include <linux/time.h>
19#include <asm/platform.h>
20#include <asm/timex.h>
Tim Schmielau4e57b682005-10-30 15:03:48 -080021#include <asm/param.h> /* HZ */
Chris Zankel5a0015d2005-06-23 22:01:16 -070022
23#define _F(r,f,a,b) \
24 r __platform_##f a b; \
25 r platform_##f a __attribute__((weak, alias("__platform_"#f)))
26
27/*
28 * Default functions that are used if no platform specific function is defined.
29 * (Please, refer to include/asm-xtensa/platform.h for more information)
30 */
31
32_F(void, setup, (char** cmd), { });
33_F(void, init_irq, (void), { });
34_F(void, restart, (void), { while(1); });
35_F(void, halt, (void), { while(1); });
36_F(void, power_off, (void), { while(1); });
37_F(void, idle, (void), { __asm__ __volatile__ ("waiti 0" ::: "memory"); });
38_F(void, heartbeat, (void), { });
39_F(int, pcibios_fixup, (void), { return 0; });
40_F(int, get_rtc_time, (time_t* t), { return 0; });
41_F(int, set_rtc_time, (time_t t), { return 0; });
42
Chris Zankel288a60c2005-09-22 21:44:23 -070043#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
Chris Zankel5a0015d2005-06-23 22:01:16 -070044_F(void, calibrate_ccount, (void),
45{
46 printk ("ERROR: Cannot calibrate cpu frequency! Assuming 100MHz.\n");
47 ccount_per_jiffy = 100 * (1000000UL/HZ);
48});
49#endif
50