platform.h 2.0 KB

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