Skip to contentSkip to conversation

socfpga: Relocate arch common functions away from board

PATCH New Chin Liang See 2 participants 3 messages Jun 10, 2014 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 socfpga: Relocate arch common functions away from board

To move the arch common function away from board folder to arch/arm/cpu/armv7/socfpga folder.

Cc Wolfgang Denk <[email protected]>
Cc Detlev Zundel <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Dinh Nguyen <[email protected]>
---
 arch/arm/cpu/armv7/socfpga/misc.c       |   24 ++++++++++++++++++++++++
 board/altera/socfpga/socfpga_cyclone5.c |   23 -----------------------
 2 files changed, 24 insertions(+), 23 deletions(-)
arch/arm/cpu/armv7/socfpga/misc.c +24 -0
index 2f1c716..5268f2c 100644
@@ -14,3 +14,27 @@ int dram_init(void)
 	gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
 	return 0;
 }
+
+#if defined(CONFIG_DISPLAY_CPUINFO)
+/*
+ * Print CPU information
+ */
+int print_cpuinfo(void)
+{
+	puts("CPU   : Altera SOCFPGA Platform\n");
+	return 0;
+}
+#endif
+
+#if defined(CONFIG_SYS_CONSOLE_IS_IN_ENV) && \
+defined(CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE)
+int overwrite_console(void)
+{
+	return 0;
+}
+#endif
+
+int misc_init_r(void)
+{
+	return 0;
+}
board/altera/socfpga/socfpga_cyclone5.c +0 -23
index a960eb6..f366565 100644
@@ -12,17 +12,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_DISPLAY_CPUINFO)
-/*
- * Print CPU information
- */
-int print_cpuinfo(void)
-{
-	puts("CPU   : Altera SOCFPGA Platform\n");
-	return 0;
-}
-#endif
-
 /*
  * Print Board information
  */
@@ -49,18 +38,6 @@ int board_init(void)
 	return 0;
 }
 
-int misc_init_r(void)
-{
-	return 0;
-}
-
-#if defined(CONFIG_SYS_CONSOLE_IS_IN_ENV) && defined(CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE)
-int overwrite_console(void)
-{
-	return 0;
-}
-#endif
-
 /*
  * DesignWare Ethernet initialization
  */
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 socfpga: Relocate arch common functions away from board

Hi Chin,

Quoted 76 lines · Chin Liang See

To move the arch common function away from board folder to arch/arm/cpu/armv7/socfpga folder.

Cc Wolfgang Denk <[email protected]>
Cc Detlev Zundel <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Dinh Nguyen <[email protected]>
---
 arch/arm/cpu/armv7/socfpga/misc.c       |   24 ++++++++++++++++++++++++
 board/altera/socfpga/socfpga_cyclone5.c |   23 -----------------------
 2 files changed, 24 insertions(+), 23 deletions(-)
arch/arm/cpu/armv7/socfpga/misc.c +24 -0
index 2f1c716..5268f2c 100644
@@ -14,3 +14,27 @@ int dram_init(void)
 	gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
 	return 0;
 }
+
+#if defined(CONFIG_DISPLAY_CPUINFO)
+/*
+ * Print CPU information
+ */
+int print_cpuinfo(void)
+{
+	puts("CPU   : Altera SOCFPGA Platform\n");
+	return 0;
+}
+#endif
+
+#if defined(CONFIG_SYS_CONSOLE_IS_IN_ENV) && \
+defined(CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE)
+int overwrite_console(void)
+{
+	return 0;
+}
+#endif
+
+int misc_init_r(void)
+{
+	return 0;
+}
board/altera/socfpga/socfpga_cyclone5.c +0 -16
index a960eb6..f366565 100644
@@ -12,17 +12,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_DISPLAY_CPUINFO)
-/*
- * Print CPU information
- */
-int print_cpuinfo(void)
-{
-	puts("CPU   : Altera SOCFPGA Platform\n");
-	return 0;
-}
-#endif
-
 /*
  * Print Board information
  */
@@ -49,18 +38,6 @@ int board_init(void)
 	return 0;
 }
 
-int misc_init_r(void)
-{
-	return 0;
-}
-

board/altera/socfpga/socfpga_cyclone5.c int board_init(void) · line 43

Quoted 10 lines
board/altera/socfpga/socfpga_cyclone5.c +0 -7
-#if defined(CONFIG_SYS_CONSOLE_IS_IN_ENV) && defined(CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE)
-int overwrite_console(void)
-{
-	return 0;
-}
-#endif
-
 /*
  * DesignWare Ethernet initialization
  */

Can you clarify in the commit message why this change is needed or useful?

Amicalement,

Signature · 1 line
Albert.
#2 lore raw

PATCH 1/1 socfpga: Relocate arch common functions away from board

Hi Albert,

Quoted 86 lines · ZY - albert.u.boot

Hi Chin,

Quoted 81 lines · Chin Liang See

To move the arch common function away from board folder to arch/arm/cpu/armv7/socfpga folder.

Cc Wolfgang Denk <[email protected]>
Cc Detlev Zundel <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Dinh Nguyen <[email protected]>
---
 arch/arm/cpu/armv7/socfpga/misc.c       |   24 ++++++++++++++++++++++++
 board/altera/socfpga/socfpga_cyclone5.c |   23 -----------------------
 2 files changed, 24 insertions(+), 23 deletions(-)
arch/arm/cpu/armv7/socfpga/misc.c +24 -0
index 2f1c716..5268f2c 100644
@@ -14,3 +14,27 @@ int dram_init(void)
 	gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
 	return 0;
 }
+
+#if defined(CONFIG_DISPLAY_CPUINFO)
+/*
+ * Print CPU information
+ */
+int print_cpuinfo(void)
+{
+	puts("CPU   : Altera SOCFPGA Platform\n");
+	return 0;
+}
+#endif
+
+#if defined(CONFIG_SYS_CONSOLE_IS_IN_ENV) && \
+defined(CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE)
+int overwrite_console(void)
+{
+	return 0;
+}
+#endif
+
+int misc_init_r(void)
+{
+	return 0;
+}
board/altera/socfpga/socfpga_cyclone5.c +0 -21
index a960eb6..f366565 100644
@@ -12,17 +12,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_DISPLAY_CPUINFO)
-/*
- * Print CPU information
- */
-int print_cpuinfo(void)
-{
-	puts("CPU   : Altera SOCFPGA Platform\n");
-	return 0;
-}
-#endif
-
 /*
  * Print Board information
  */
@@ -49,18 +38,6 @@ int board_init(void)
 	return 0;
 }
 
-int misc_init_r(void)
-{
-	return 0;
-}
-
-#if defined(CONFIG_SYS_CONSOLE_IS_IN_ENV) && defined(CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE)
-int overwrite_console(void)
-{
-	return 0;
-}
Quoted 9 lines

board/altera/socfpga/socfpga_cyclone5.c int board_init(void) · line 43

Quoted 5 lines
board/altera/socfpga/socfpga_cyclone5.c +0 -2
-#endif
-
 /*
  * DesignWare Ethernet initialization
  */

Can you clarify in the commit message why this change is needed or useful?

Sure, let me send out the v2.
Its to avoid code duplication for other non Altera board which use socfpga.
Thanks

Chin Liang

Quoted 1 line

Amicalement,