]> git.sur5r.net Git - u-boot/commitdiff
ARM: uniphier: remove useless wrapper functions
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 21 Sep 2015 15:27:30 +0000 (00:27 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 24 Sep 2015 15:27:53 +0000 (00:27 +0900)
The wrapper functions, uniphier_board_*, are just making function
calls complex.  Remove them.

Also, use empty inline functions in case CONFIG_MICRO_SUPPORT_CARD
is disabled, so that prototype checking works.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/arm/mach-uniphier/board_early_init_r.c
arch/arm/mach-uniphier/include/mach/board.h
arch/arm/mach-uniphier/spl.c

index 579fe70463bf03a3f438f1d57be5a6884188b4f4..7d4830a3a822a6152b5acb6432ac20645c23125f 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * Copyright (C) 2014 Panasonic Corporation
- *   Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
+ * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -10,6 +9,6 @@
 
 int board_early_init_r(void)
 {
-       uniphier_board_late_init();
+       support_card_late_init();
        return 0;
 }
index c039d807f4d2f008bd6984d4ec55fc6e7404bb79..5b9af222ae1097ff72c5baa1e7fd7660cafecd20 100644 (file)
@@ -13,28 +13,22 @@ void support_card_init(void);
 void support_card_late_init(void);
 int check_support_card(void);
 #else
-#define support_card_reset() do {} while (0)
-#define support_card_init()  do {} while (0)
-#define support_card_late_init()  do {} while (0)
-static inline int check_support_card(void)
+static inline void support_card_reset(void)
 {
-       return 0;
 }
-#endif
 
-static inline void uniphier_board_reset(void)
+static inline void support_card_init(void)
 {
-       support_card_reset();
 }
 
-static inline void uniphier_board_init(void)
+static inline void support_card_late_init(void)
 {
-       support_card_init();
 }
 
-static inline void uniphier_board_late_init(void)
+static inline int check_support_card(void)
 {
-       support_card_late_init();
+       return 0;
 }
+#endif
 
 #endif /* ARCH_BOARD_H */
index 78534fc41ce26c4342bc1a97356a209987a7d38f..661d73ae4a4628831248cfbc32277fdfe4f8b783 100644 (file)
@@ -40,11 +40,11 @@ void spl_board_init(void)
 
        sg_init();
 
-       uniphier_board_reset();
+       support_card_reset();
 
        pll_init();
 
-       uniphier_board_init();
+       support_card_init();
 
        led_write(L, 0, , );