platform.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. #ifndef _XTENSA_PLATFORM_H
  13. #define _XTENSA_PLATFORM_H
  14. #include <linux/types.h>
  15. #include <linux/pci.h>
  16. #include <asm/bootparam.h>
  17. /*
  18. * platform_init is called before the mmu is initialized to give the
  19. * platform a early hook-up. bp_tag_t is a list of configuration tags
  20. * passed from the boot-loader.
  21. */
  22. extern void platform_init(bp_tag_t*);
  23. /*
  24. * platform_setup is called from setup_arch with a pointer to the command-line
  25. * string.
  26. */
  27. extern void platform_setup (char **);
  28. /*
  29. * platform_init_irq is called from init_IRQ.
  30. */
  31. extern void platform_init_irq (void);
  32. /*
  33. * platform_restart is called to restart the system.
  34. */
  35. extern void platform_restart (void);
  36. /*
  37. * platform_halt is called to stop the system and halt.
  38. */
  39. extern void platform_halt (void);
  40. /*
  41. * platform_power_off is called to stop the system and power it off.
  42. */
  43. extern void platform_power_off (void);
  44. /*
  45. * platform_idle is called from the idle function.
  46. */
  47. extern void platform_idle (void);
  48. /*
  49. * platform_heartbeat is called every HZ
  50. */
  51. extern void platform_heartbeat (void);
  52. /*
  53. * platform_pcibios_init is called to allow the platform to setup the pci bus.
  54. */
  55. extern void platform_pcibios_init (void);
  56. /*
  57. * platform_pcibios_fixup allows to modify the PCI configuration.
  58. */
  59. extern int platform_pcibios_fixup (void);
  60. /*
  61. * platform_calibrate_ccount calibrates cpu clock freq (CONFIG_XTENSA_CALIBRATE)
  62. */
  63. extern void platform_calibrate_ccount (void);
  64. /*
  65. * platform_get_rtc_time returns RTC seconds (returns 0 for no error)
  66. */
  67. extern int platform_get_rtc_time(time_t*);
  68. /*
  69. * platform_set_rtc_time set RTC seconds (returns 0 for no error)
  70. */
  71. extern int platform_set_rtc_time(time_t);
  72. #endif /* _XTENSA_PLATFORM_H */