003-use-weak-in-board.patch 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. From: Jeroen Hofstee <jeroen@myspectrum.nl>
  2. Date: Wed, 8 Oct 2014 20:57:21 +0000 (+0200)
  3. Subject: arm: board: use __weak
  4. X-Git-Tag: v2015.01-rc1~176
  5. X-Git-Url: http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=8590c800ee60e46f15d6085e3c1fed0d6881fc62
  6. arm: board: use __weak
  7. Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
  8. Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
  9. ---
  10. --- a/arch/arm/lib/board.c
  11. +++ b/arch/arm/lib/board.c
  12. @@ -63,25 +63,15 @@ extern void dataflash_print_info(void);
  13. ************************************************************************
  14. * May be supplied by boards if desired
  15. */
  16. -inline void __coloured_LED_init(void) {}
  17. -void coloured_LED_init(void)
  18. - __attribute__((weak, alias("__coloured_LED_init")));
  19. -inline void __red_led_on(void) {}
  20. -void red_led_on(void) __attribute__((weak, alias("__red_led_on")));
  21. -inline void __red_led_off(void) {}
  22. -void red_led_off(void) __attribute__((weak, alias("__red_led_off")));
  23. -inline void __green_led_on(void) {}
  24. -void green_led_on(void) __attribute__((weak, alias("__green_led_on")));
  25. -inline void __green_led_off(void) {}
  26. -void green_led_off(void) __attribute__((weak, alias("__green_led_off")));
  27. -inline void __yellow_led_on(void) {}
  28. -void yellow_led_on(void) __attribute__((weak, alias("__yellow_led_on")));
  29. -inline void __yellow_led_off(void) {}
  30. -void yellow_led_off(void) __attribute__((weak, alias("__yellow_led_off")));
  31. -inline void __blue_led_on(void) {}
  32. -void blue_led_on(void) __attribute__((weak, alias("__blue_led_on")));
  33. -inline void __blue_led_off(void) {}
  34. -void blue_led_off(void) __attribute__((weak, alias("__blue_led_off")));
  35. +__weak void coloured_LED_init(void) {}
  36. +__weak void red_led_on(void) {}
  37. +__weak void red_led_off(void) {}
  38. +__weak void green_led_on(void) {}
  39. +__weak void green_led_off(void) {}
  40. +__weak void yellow_led_on(void) {}
  41. +__weak void yellow_led_off(void) {}
  42. +__weak void blue_led_on(void) {}
  43. +__weak void blue_led_off(void) {}
  44. /*
  45. ************************************************************************
  46. @@ -198,27 +188,21 @@ static int arm_pci_init(void)
  47. */
  48. typedef int (init_fnc_t) (void);
  49. -void __dram_init_banksize(void)
  50. +__weak void dram_init_banksize(void)
  51. {
  52. gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
  53. gd->bd->bi_dram[0].size = gd->ram_size;
  54. }
  55. -void dram_init_banksize(void)
  56. - __attribute__((weak, alias("__dram_init_banksize")));
  57. -int __arch_cpu_init(void)
  58. +__weak int arch_cpu_init(void)
  59. {
  60. return 0;
  61. }
  62. -int arch_cpu_init(void)
  63. - __attribute__((weak, alias("__arch_cpu_init")));
  64. -int __power_init_board(void)
  65. +__weak int power_init_board(void)
  66. {
  67. return 0;
  68. }
  69. -int power_init_board(void)
  70. - __attribute__((weak, alias("__power_init_board")));
  71. /* Record the board_init_f() bootstage (after arch_cpu_init()) */
  72. static int mark_bootstage(void)