Patchwork [U-Boot,05/08] omap3: Introduce weak misc_init_r

login
register
mail settings
Submitter Tom Rini
Date April 13, 2012, 10:20 p.m.
Message ID <1334355606-16491-6-git-send-email-trini@ti.com>
Download mbox | patch
Permalink /patch/152408/
State Accepted
Commit 8a87a3d72e01339a744d1d1040d86dc739c1dda4
Delegated to: Tom Rini
Headers show

Comments

Tom Rini - April 13, 2012, 10:20 p.m.
Introduce a __weak misc_init_r function that just runs dieid_num_r().
Remove misc_init_r from cm_t35, mcx, omap3_logic and mt_ventoux as this was
all they did for misc_init_r.

Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Ilya Yanok <yanok@emcraft.com>
Cc: Peter Barada <peter.barada@logicpd.com>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
---
 arch/arm/cpu/armv7/omap3/board.c     |   12 ++++++++++++
 board/cm_t35/cm_t35.c                |   11 -----------
 board/htkw/mcx/mcx.c                 |   11 -----------
 board/logicpd/omap3som/omap3logic.c  |   11 -----------
 board/teejet/mt_ventoux/mt_ventoux.c |    7 -------
 5 files changed, 12 insertions(+), 40 deletions(-)
Igor Grinberg - April 15, 2012, 7:32 a.m.
On 04/14/12 01:20, Tom Rini wrote:
> Introduce a __weak misc_init_r function that just runs dieid_num_r().
> Remove misc_init_r from cm_t35, mcx, omap3_logic and mt_ventoux as this was
> all they did for misc_init_r.
> 
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Cc: Ilya Yanok <yanok@emcraft.com>
> Cc: Peter Barada <peter.barada@logicpd.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Signed-off-by: Tom Rini <trini@ti.com>

Acked-by: Igor Grinberg <grinberg@compulab.co.il>

Thanks for the patch.
Stefano Babic - April 15, 2012, 8:48 a.m.
Am 14/04/2012 00:20, schrieb Tom Rini:
> Introduce a __weak misc_init_r function that just runs dieid_num_r().
> Remove misc_init_r from cm_t35, mcx, omap3_logic and mt_ventoux as this was
> all they did for misc_init_r.
> 
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Cc: Ilya Yanok <yanok@emcraft.com>
> Cc: Peter Barada <peter.barada@logicpd.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Signed-off-by: Tom Rini <trini@ti.com>
> ---

Acked-by : Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic

Patch

diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
index 1fee574..f2e52e9 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/cpu/armv7/omap3/board.c
@@ -41,6 +41,7 @@ 
 #include <asm/arch/gpio.h>
 #include <asm/omap_common.h>
 #include <i2c.h>
+#include <linux/compiler.h>
 
 /* Declarations */
 extern omap3_sysinfo sysinfo;
@@ -244,6 +245,17 @@  void s_init(void)
 		mem_init();
 }
 
+/*
+ * Routine: misc_init_r
+ * Description: A basic misc_init_r that just displays the die ID
+ */
+int __weak misc_init_r(void)
+{
+	dieid_num_r();
+
+	return 0;
+}
+
 /******************************************************************************
  * Routine: wait_for_command_complete
  * Description: Wait for posting to finish on watchdog
diff --git a/board/cm_t35/cm_t35.c b/board/cm_t35/cm_t35.c
index 7a2fed7..b5d2800 100644
--- a/board/cm_t35/cm_t35.c
+++ b/board/cm_t35/cm_t35.c
@@ -100,17 +100,6 @@  int board_init(void)
 }
 
 /*
- * Routine: misc_init_r
- * Description: display die ID
- */
-int misc_init_r(void)
-{
-	dieid_num_r();
-
-	return 0;
-}
-
-/*
  * Routine: set_muxconf_regs
  * Description: Setting up the configuration Mux registers specific to the
  *		hardware. Many pins need to be moved from protect to primary
diff --git a/board/htkw/mcx/mcx.c b/board/htkw/mcx/mcx.c
index 8f0b527..8f75af1 100644
--- a/board/htkw/mcx/mcx.c
+++ b/board/htkw/mcx/mcx.c
@@ -69,17 +69,6 @@  int board_init(void)
 }
 
 /*
- * Routine: misc_init_r
- * Description: late init.
- */
-int misc_init_r(void)
-{
-	dieid_num_r();
-
-	return 0;
-}
-
-/*
  * Routine: set_muxconf_regs
  * Description: Setting up the configuration Mux registers specific to the
  *		hardware. Many pins need to be moved from protect to primary
diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c
index 89b114b..12bcfcb 100644
--- a/board/logicpd/omap3som/omap3logic.c
+++ b/board/logicpd/omap3som/omap3logic.c
@@ -144,17 +144,6 @@  int board_mmc_init(bd_t *bis)
 }
 #endif
 
-/*
- * Routine: misc_init_r
- * Description: display die ID register
- */
-int misc_init_r(void)
-{
-	dieid_num_r();
-
-	return 0;
-}
-
 #ifdef CONFIG_SMC911X
 /* GPMC CS1 settings for Logic SOM LV/Torpedo LAN92xx Ethernet chip */
 static const u32 gpmc_lan92xx_config[] = {
diff --git a/board/teejet/mt_ventoux/mt_ventoux.c b/board/teejet/mt_ventoux/mt_ventoux.c
index c7aedc9..9fbaedd 100644
--- a/board/teejet/mt_ventoux/mt_ventoux.c
+++ b/board/teejet/mt_ventoux/mt_ventoux.c
@@ -196,13 +196,6 @@  int board_init(void)
 	return 0;
 }
 
-int misc_init_r(void)
-{
-	dieid_num_r();
-
-	return 0;
-}
-
 /*
  * Routine: set_muxconf_regs
  * Description: Setting up the configuration Mux registers specific to the