dummy.c 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. /*
  2. * These are dummy functions for the case that any aee config is disabled
  3. */
  4. #include <linux/kernel.h>
  5. #include <linux/sched.h>
  6. #include <linux/module.h>
  7. #include <mt-plat/mtk_ram_console.h>
  8. #include <mt-plat/aee.h>
  9. #include "aee-common.h"
  10. struct proc_dir_entry;
  11. #ifndef CONFIG_MTK_AEE_FEATURE
  12. void *aee_excp_regs;
  13. __weak void aee_sram_printk(const char *fmt, ...)
  14. {
  15. }
  16. EXPORT_SYMBOL(aee_sram_printk);
  17. __weak void aee_wdt_irq_info(void)
  18. {
  19. }
  20. __weak void aee_wdt_fiq_info(void *arg, void *regs, void *svc_sp)
  21. {
  22. }
  23. __weak void aee_trigger_kdb(void)
  24. {
  25. }
  26. __weak struct aee_oops *aee_oops_create(AE_DEFECT_ATTR attr, AE_EXP_CLASS clazz, const char *module)
  27. {
  28. return NULL;
  29. }
  30. __weak void aee_oops_set_backtrace(struct aee_oops *oops, const char *backtrace)
  31. {
  32. }
  33. __weak void aee_oops_set_process_path(struct aee_oops *oops, const char *process_path)
  34. {
  35. }
  36. __weak void aee_oops_free(struct aee_oops *oops)
  37. {
  38. }
  39. __weak void aee_kernel_exception_api(const char *file, const int line, const int db_opt,
  40. const char *module, const char *msg, ...)
  41. {
  42. }
  43. EXPORT_SYMBOL(aee_kernel_exception_api);
  44. __weak void aee_kernel_warning_api(const char *file, const int line, const int db_opt,
  45. const char *module, const char *msg, ...)
  46. {
  47. }
  48. EXPORT_SYMBOL(aee_kernel_warning_api);
  49. __weak void aee_kernel_reminding_api(const char *file, const int line, const int db_opt,
  50. const char *module, const char *msg, ...)
  51. {
  52. }
  53. EXPORT_SYMBOL(aee_kernel_reminding_api);
  54. __weak void aee_kernel_dal_api(const char *file, const int line, const char *msg)
  55. {
  56. }
  57. EXPORT_SYMBOL(aee_kernel_dal_api);
  58. __weak void aed_md_exception_api(const int *log, int log_size, const int *phy, int phy_size,
  59. const char *detail, const int db_opt)
  60. {
  61. }
  62. EXPORT_SYMBOL(aed_md_exception_api);
  63. __weak void aed_md32_exception_api(const int *log, int log_size, const int *phy, int phy_size,
  64. const char *detail, const int db_opt)
  65. {
  66. }
  67. EXPORT_SYMBOL(aed_md32_exception_api);
  68. __weak void aed_scp_exception_api(const int *log, int log_size, const int *phy, int phy_size,
  69. const char *detail, const int db_opt)
  70. {
  71. }
  72. EXPORT_SYMBOL(aed_scp_exception_api);
  73. __weak void aed_combo_exception_api(const int *log, int log_size, const int *phy, int phy_size,
  74. const char *detail, const int db_opt)
  75. {
  76. }
  77. EXPORT_SYMBOL(aed_combo_exception_api);
  78. __weak void mt_fiq_printf(const char *fmt, ...)
  79. {
  80. }
  81. __weak void aee_register_api(struct aee_kernel_api *aee_api)
  82. {
  83. }
  84. __weak void aee_stop_nested_panic(struct pt_regs *regs)
  85. {
  86. }
  87. __weak int aee_in_nested_panic(void)
  88. {
  89. return 0;
  90. }
  91. __weak void aee_wdt_dump_info(void)
  92. {
  93. }
  94. __weak void aee_wdt_printf(const char *fmt, ...)
  95. {
  96. }
  97. __weak void aee_kdump_reboot(AEE_REBOOT_MODE reboot_mode, const char *msg, ...)
  98. {
  99. char str[80];
  100. va_list ap;
  101. va_start(ap, msg);
  102. vsnprintf(str, 80, msg, ap);
  103. LOGE("%s", str);
  104. va_end(ap);
  105. BUG();
  106. }
  107. __weak int aed_proc_debug_init(struct proc_dir_entry *aed_proc_dir)
  108. {
  109. return 0;
  110. }
  111. __weak int aed_proc_debug_done(struct proc_dir_entry *aed_proc_dir)
  112. {
  113. return 0;
  114. }
  115. __weak void aee_rr_proc_init(struct proc_dir_entry *aed_proc_dir)
  116. {
  117. }
  118. __weak void aee_rr_proc_done(struct proc_dir_entry *aed_proc_dir)
  119. {
  120. }
  121. __weak void aee_kernel_wdt_kick_Powkey_api(const char *module, int msg)
  122. {
  123. }
  124. __weak int aee_kernel_wdt_kick_api(int kinterval)
  125. {
  126. return 0;
  127. }
  128. __weak void aee_powerkey_notify_press(unsigned long pressed)
  129. {
  130. }
  131. __weak int aee_kernel_Powerkey_is_press(void)
  132. {
  133. return 0;
  134. }
  135. #endif
  136. #ifndef CONFIG_MTK_AEE_DRAM_CONSOLE
  137. __weak void dram_console_init(struct proc_dir_entry *aed_proc_dir)
  138. {
  139. }
  140. __weak void dram_console_done(struct proc_dir_entry *aed_proc_dir)
  141. {
  142. }
  143. #endif
  144. #ifndef CONFIG_MTK_AEE_IPANIC
  145. __weak void ipanic_recursive_ke(struct pt_regs *regs, struct pt_regs *excp_regs, int cpu)
  146. {
  147. }
  148. __weak struct aee_oops *ipanic_oops_copy(void)
  149. {
  150. return NULL;
  151. }
  152. __weak void ipanic_oops_free(struct aee_oops *oops, int erase)
  153. {
  154. }
  155. __weak void mrdump_mini_per_cpu_regs(int cpu, struct pt_regs *regs)
  156. {
  157. }
  158. #endif