0005-common-board-use-__weak.patch 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. From deda59a4022fcedd781a893fe5e1bb495988858f Mon Sep 17 00:00:00 2001
  2. From: Jeroen Hofstee <jeroen@myspectrum.nl>
  3. Date: Wed, 8 Oct 2014 22:57:22 +0200
  4. Subject: [PATCH 5/6] common: board: use __weak
  5. Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
  6. ---
  7. common/board_f.c | 10 ++--------
  8. common/board_r.c | 10 ++--------
  9. 2 files changed, 4 insertions(+), 16 deletions(-)
  10. diff --git a/common/board_f.c b/common/board_f.c
  11. index 4ea4cb2..215cc4a 100644
  12. --- a/common/board_f.c
  13. +++ b/common/board_f.c
  14. @@ -130,14 +130,11 @@ int init_func_watchdog_reset(void)
  15. }
  16. #endif /* CONFIG_WATCHDOG */
  17. -void __board_add_ram_info(int use_default)
  18. +__weak void board_add_ram_info(int use_default)
  19. {
  20. /* please define platform specific board_add_ram_info() */
  21. }
  22. -void board_add_ram_info(int)
  23. - __attribute__ ((weak, alias("__board_add_ram_info")));
  24. -
  25. static int init_baud_rate(void)
  26. {
  27. gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE);
  28. @@ -219,7 +216,7 @@ static int show_dram_config(void)
  29. return 0;
  30. }
  31. -void __dram_init_banksize(void)
  32. +__weak void dram_init_banksize(void)
  33. {
  34. #if defined(CONFIG_NR_DRAM_BANKS) && defined(CONFIG_SYS_SDRAM_BASE)
  35. gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
  36. @@ -227,9 +224,6 @@ void __dram_init_banksize(void)
  37. #endif
  38. }
  39. -void dram_init_banksize(void)
  40. - __attribute__((weak, alias("__dram_init_banksize")));
  41. -
  42. #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
  43. static int init_func_i2c(void)
  44. {
  45. diff --git a/common/board_r.c b/common/board_r.c
  46. index 602a239..fa4bd9c 100644
  47. --- a/common/board_r.c
  48. +++ b/common/board_r.c
  49. @@ -60,7 +60,7 @@ DECLARE_GLOBAL_DATA_PTR;
  50. ulong monitor_flash_len;
  51. -int __board_flash_wp_on(void)
  52. +__weak int board_flash_wp_on(void)
  53. {
  54. /*
  55. * Most flashes can't be detected when write protection is enabled,
  56. @@ -70,16 +70,10 @@ int __board_flash_wp_on(void)
  57. return 0;
  58. }
  59. -int board_flash_wp_on(void)
  60. - __attribute__ ((weak, alias("__board_flash_wp_on")));
  61. -
  62. -void __cpu_secondary_init_r(void)
  63. +__weak void cpu_secondary_init_r(void)
  64. {
  65. }
  66. -void cpu_secondary_init_r(void)
  67. - __attribute__ ((weak, alias("__cpu_secondary_init_r")));
  68. -
  69. static int initr_secondary_cpu(void)
  70. {
  71. /*
  72. --
  73. 2.4.4