Skip to contentSkip to conversation

ARM pca-a-l1: call omap3_core_init from board code

PATCH New Juergen Kilb 3 participants 7 messages Jan 20, 2012 – Jan 23, 2012

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH 1/1 ARM pca-a-l1: should depend on ARCH_OMAP3

In reply to Juergen Kilb
---
 arch/arm/mach-omap/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-omap/Kconfig +1 -0
index ecdabb0..50f53dd 100644
@@ -152,6 +152,7 @@ config MACH_PCAAL1
 	bool "Phytec phyCARD-A-L1"
 	select OMAP_CLOCK_ALL
 	select HAS_OMAP_NAND
+	depends on ARCH_OMAP3
 	  help
 	  Say Y here if you are using a phyCARD-A-L1 PCA-A-L1
 
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#0 lore raw

PATCH 1/1 ARM pca-a-l1: call omap3_core_init from board code

since commit ae2ac15105cbf198ebd2b7ac0428641423b83c08 a_init was renamed to omap3_core_init and called from board code.

---
 arch/arm/boards/phycard-a-l1/pca-a-l1.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/boards/phycard-a-l1/pca-a-l1.c +2 -0
index 0518894..8015087 100644
@@ -226,6 +226,8 @@ static int pcaal1_board_init(void)
 {
 	int in_sdram = running_in_sdram();
 
+	omap3_core_init();
+
 	pcaal1_mux_config();
 
 	/* Dont reconfigure SDRAM while running in SDRAM! */
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH 1/1 ARM pca-a-l1: delete platform.S

since commit 494a12f703c33f80fe96e2a728545c490347eceb platform lowlevel init was moved to mach-omap.

---
 arch/arm/boards/phycard-a-l1/platform.S |   65 -------------------------------
 1 files changed, 0 insertions(+), 65 deletions(-)
 delete mode 100644 arch/arm/boards/phycard-a-l1/platform.S
arch/arm/boards/phycard-a-l1/platform.S deleted +0 -65
deleted file mode 100644
index 596d3ab..0000000
@@ -1,65 +0,0 @@
-/**
- * @file
- * @brief Wrapper to call board level initialization routine
- *
- * FileName: arch/arm/boards/phycard-a-l1/platform.S
- *
- * board_init_lowlevel is defined here. This calls board_init which
- * is linked to the binary - the board_init only has a SRAM stack.
- * so it needs to be careful about the usage of global variables
- * and the likes. Enabled only if CONFIG_MACH_DO_LOWLEVEL_INIT is
- * defined
- */
-/*
- * (C) Copyright 2006-2008
- * Texas Instruments, <www.ti.com>
- * Nishanth Menon <[email protected]>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <config.h>
-#include <mach/silicon.h>
-
-#ifdef CONFIG_MACH_DO_LOWLEVEL_INIT
-/**
- * @fn void board_init_lowlevel(void)
- *
- * @brief This provides a assembly wrapper setting up SRAM before calling
- * board_init
- *
- * @return void
- */
-.globl board_init_lowlevel
-board_init_lowlevel:
-	/* Setup a temporary stack so that we can call C functions
-	 * Yes. this might have been already done by arch code.
-	 * No harm in being a bit redundant to avoid future complications
-	 */
-	ldr	sp,	SRAM_STACK
-        str     ip,	[sp]    /* stash old link register */
-        str     lr,	[sp]    /* stash current link register */
-	mov	ip,	lr	/* save link reg across call */
-	/* Do the pin muxes, sdram init etc..board-xxx.c */
-	bl	board_init
-        ldr     lr,	[sp]    /* restore current link register */
-        ldr     ip,	[sp]    /* restore save ip */
-	/* back to arch calling code */
-	mov	pc,	lr
-SRAM_STACK:
-	.word	OMAP_SRAM_STACK
-
-#endif /* CONFIG_MACH_DO_LOWLEVEL_INIT */
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

PATCH 1/1 ARM pca-a-l1: fix board_init

In reply to Juergen Kilb

board_init was moved to pure_initcall. broken since:

commit 0adce7ec683b4b325f51de4ac8892b32925d7ef8

Author: Sascha Hauer <[email protected]>
Date:   Sun Jan 15 21:11:17 2012 +0100

ARM omap3: move board_init to pure_initcall

board_init initializes the mux and sdram. For both there is no need to configure this so early. Move the code to a pure_initcall and remove the surrounding unneeded code.

---
 arch/arm/boards/phycard-a-l1/pca-a-l1.c |    8 +++++---
 arch/arm/mach-omap/Kconfig              |    1 -
 barebox_default_env.gz                  |  Bin 0 -> 2656 bytes
 3 files changed, 5 insertions(+), 4 deletions(-)
 create mode 100644 barebox_default_env.gz
arch/arm/boards/phycard-a-l1/pca-a-l1.c +5 -3
index 11e8638..0518894 100644
@@ -74,8 +74,6 @@
 #include <mach/syslib.h>
 #include <mach/xload.h>
 
-#include "pca-a-l1.h"
-
 #define SMC911X_BASE 0x2c000000
 
 /*
@@ -224,15 +222,19 @@ static void pcaal1_mux_config(void)
  *
  * @return void
  */
-void omap3_board_init(void)
+static int pcaal1_board_init(void)
 {
 	int in_sdram = running_in_sdram();
 
 	pcaal1_mux_config();
+
 	/* Dont reconfigure SDRAM while running in SDRAM! */
 	if (!in_sdram)
 		pcaal1_sdrc_init();
+
+	return 0;
 }
+pure_initcall(pcaal1_board_init);
 
 /*
  * Run-time initialization(s)
arch/arm/mach-omap/Kconfig +0 -1
index 970c899..ecdabb0 100644
@@ -150,7 +150,6 @@ config MACH_PCM049
 
 config MACH_PCAAL1
 	bool "Phytec phyCARD-A-L1"
-	select MACH_HAS_LOWLEVEL_INIT
 	select OMAP_CLOCK_ALL
 	select HAS_OMAP_NAND
 	  help
barebox_default_env.gz new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..bdf466e5d710f54fe8d66db5fb74edb33a788ff3
GIT binary patch
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw

Re: [PATCH] ARM pca-a-l1: fix board_init

barebox_default_env.gz

Quoted 70 lines · Juergen Kilb

board_init was moved to pure_initcall. broken since:

commit 0adce7ec683b4b325f51de4ac8892b32925d7ef8

Author: Sascha Hauer <[email protected]>
Date:   Sun Jan 15 21:11:17 2012 +0100

ARM omap3: move board_init to pure_initcall

board_init initializes the mux and sdram. For both there is no need to configure this so early. Move the code to a pure_initcall and remove the surrounding unneeded code.

---
 arch/arm/boards/phycard-a-l1/pca-a-l1.c |    8 +++++---
 arch/arm/mach-omap/Kconfig              |    1 -
 barebox_default_env.gz                  |  Bin 0 -> 2656 bytes
 3 files changed, 5 insertions(+), 4 deletions(-)
 create mode 100644 barebox_default_env.gz
arch/arm/boards/phycard-a-l1/pca-a-l1.c +5 -3
index 11e8638..0518894 100644
@@ -74,8 +74,6 @@
 #include <mach/syslib.h>
 #include <mach/xload.h>
 
-#include "pca-a-l1.h"
-
 #define SMC911X_BASE 0x2c000000
 
 /*
@@ -224,15 +222,19 @@ static void pcaal1_mux_config(void)
  *
  * @return void
  */
-void omap3_board_init(void)
+static int pcaal1_board_init(void)
 {
 	int in_sdram = running_in_sdram();
 
 	pcaal1_mux_config();
+
 	/* Dont reconfigure SDRAM while running in SDRAM! */
 	if (!in_sdram)
 		pcaal1_sdrc_init();
+
+	return 0;
 }
+pure_initcall(pcaal1_board_init);
 
 /*
  * Run-time initialization(s)
arch/arm/mach-omap/Kconfig +0 -1
index 970c899..ecdabb0 100644
@@ -150,7 +150,6 @@ config MACH_PCM049
 
 config MACH_PCAAL1
 	bool "Phytec phyCARD-A-L1"
-	select MACH_HAS_LOWLEVEL_INIT
 	select OMAP_CLOCK_ALL
 	select HAS_OMAP_NAND
 	  help
barebox_default_env.gz +0 -0

Ups. Applied the series with this removed.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

Re: [PATCH] ARM pca-a-l1: fix board_init

In reply to Juergen Kilb
Quoted 8 lines · Juergen Kilb

board_init was moved to pure_initcall. broken since:

commit 0adce7ec683b4b325f51de4ac8892b32925d7ef8

Author: Sascha Hauer <[email protected]>
Date:   Sun Jan 15 21:11:17 2012 +0100

ARM omap3: move board_init to pure_initcall

Quoted 8 lines

board_init initializes the mux and sdram. For both there is no need to configure this so early. Move the code to a pure_initcall and remove the surrounding unneeded code.

can't you fix all in one patch?

Quoted 6 lines
---
 arch/arm/boards/phycard-a-l1/pca-a-l1.c |    8 +++++---
 arch/arm/mach-omap/Kconfig              |    1 -
 barebox_default_env.gz                  |  Bin 0 -> 2656 bytes
 3 files changed, 5 insertions(+), 4 deletions(-)
 create mode 100644 barebox_default_env.gz

???

Best Regards,
J.

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#6 lore raw

Re: [PATCH] ARM pca-a-l1: fix board_init

Hi Jean-Christophe

Quoted 13 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 12 lines · Juergen Kilb

board_init was moved to pure_initcall. broken since:

commit 0adce7ec683b4b325f51de4ac8892b32925d7ef8

Author: Sascha Hauer<[email protected]>
Date:   Sun Jan 15 21:11:17 2012 +0100

ARM omap3: move board_init to pure_initcall

board_init initializes the mux and sdram. For both there is no need to configure this so early. Move the code to a pure_initcall and remove the surrounding unneeded code.

Quoted 5 lines
Quoted 4 lines

can't you fix all in one patch?

I'v used separate patches because the break was created by two different commits and the other two doesn't depend on each other.

Quoted 7 lines
Quoted 6 lines
---
  arch/arm/boards/phycard-a-l1/pca-a-l1.c |    8 +++++---
  arch/arm/mach-omap/Kconfig              |    1 -
  barebox_default_env.gz                  |  Bin 0 ->  2656 bytes
  3 files changed, 5 insertions(+), 4 deletions(-)

create mode 100644 barebox_default_env.gz

???

ups.. have not seen this. Was a result of 'git add .'

Quoted 2 lines

Best Regards,
J.

greetings,
Jürgen

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox