Chris Zankel | 7282bee | 2005-06-23 22:01:33 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * include/asm-xtensa/platform.h |
| 3 | * |
| 4 | * Platform specific functions |
| 5 | * |
| 6 | * This file is subject to the terms and conditions of the GNU General |
| 7 | * Public License. See the file "COPYING" in the main directory of |
| 8 | * this archive for more details. |
| 9 | * |
| 10 | * Copyright (C) 2001 - 2005 Tensilica Inc. |
| 11 | */ |
| 12 | |
| 13 | #ifndef _XTENSA_PLATFORM_H |
| 14 | #define _XTENSA_PLATFORM_H |
| 15 | |
| 16 | #include <linux/config.h> |
| 17 | #include <linux/types.h> |
| 18 | #include <linux/pci.h> |
| 19 | |
| 20 | #include <asm/bootparam.h> |
| 21 | |
| 22 | /* |
| 23 | * platform_init is called before the mmu is initialized to give the |
| 24 | * platform a early hook-up. bp_tag_t is a list of configuration tags |
| 25 | * passed from the boot-loader. |
| 26 | */ |
| 27 | extern void platform_init(bp_tag_t*); |
| 28 | |
| 29 | /* |
| 30 | * platform_setup is called from setup_arch with a pointer to the command-line |
| 31 | * string. |
| 32 | */ |
| 33 | extern void platform_setup (char **); |
| 34 | |
| 35 | /* |
| 36 | * platform_init_irq is called from init_IRQ. |
| 37 | */ |
| 38 | extern void platform_init_irq (void); |
| 39 | |
| 40 | /* |
| 41 | * platform_restart is called to restart the system. |
| 42 | */ |
| 43 | extern void platform_restart (void); |
| 44 | |
| 45 | /* |
| 46 | * platform_halt is called to stop the system and halt. |
| 47 | */ |
| 48 | extern void platform_halt (void); |
| 49 | |
| 50 | /* |
| 51 | * platform_power_off is called to stop the system and power it off. |
| 52 | */ |
| 53 | extern void platform_power_off (void); |
| 54 | |
| 55 | /* |
| 56 | * platform_idle is called from the idle function. |
| 57 | */ |
| 58 | extern void platform_idle (void); |
| 59 | |
| 60 | /* |
| 61 | * platform_heartbeat is called every HZ |
| 62 | */ |
| 63 | extern void platform_heartbeat (void); |
| 64 | |
| 65 | /* |
| 66 | * platform_pcibios_init is called to allow the platform to setup the pci bus. |
| 67 | */ |
| 68 | extern void platform_pcibios_init (void); |
| 69 | |
| 70 | /* |
| 71 | * platform_pcibios_fixup allows to modify the PCI configuration. |
| 72 | */ |
| 73 | extern int platform_pcibios_fixup (void); |
| 74 | |
| 75 | /* |
| 76 | * platform_calibrate_ccount calibrates cpu clock freq (CONFIG_XTENSA_CALIBRATE) |
| 77 | */ |
| 78 | extern void platform_calibrate_ccount (void); |
| 79 | |
| 80 | /* |
| 81 | * platform_get_rtc_time returns RTC seconds (returns 0 for no error) |
| 82 | */ |
| 83 | extern int platform_get_rtc_time(time_t*); |
| 84 | |
| 85 | /* |
| 86 | * platform_set_rtc_time set RTC seconds (returns 0 for no error) |
| 87 | */ |
| 88 | extern int platform_set_rtc_time(time_t); |
| 89 | |
| 90 | |
| 91 | #endif /* _XTENSA_PLATFORM_H */ |
| 92 | |