diff mbox

[U-Boot,v6,2/3] OMAP3: drop CONFIG_SPL_OS_BOOT_KEY and use local define

Message ID 1361616807-9496-2-git-send-email-sbabic@denx.de
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Stefano Babic Feb. 23, 2013, 10:53 a.m. UTC
CONFIG_SPL_OS_BOOT_KEY is used only in board files. It is
not required to have a general CONFIG_ option. Rename it and
define it in board directory.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 board/technexion/twister/twister.c  |    8 ++++----
 board/technexion/twister/twister.h  |    2 ++
 board/timll/devkit8000/devkit8000.c |    8 ++++----
 board/timll/devkit8000/devkit8000.h |    3 +++
 include/configs/devkit8000.h        |    1 -
 include/configs/twister.h           |    1 -
 6 files changed, 13 insertions(+), 10 deletions(-)

Comments

Tom Rini Feb. 23, 2013, 12:56 p.m. UTC | #1
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/23/2013 05:53 AM, Stefano Babic wrote:
> CONFIG_SPL_OS_BOOT_KEY is used only in board files. It is not
> required to have a general CONFIG_ option. Rename it and define it
> in board directory.
> 
> Signed-off-by: Stefano Babic <sbabic@denx.de>

Reviewed-by: Tom Rini <trini@ti.com>

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRKLyOAAoJENk4IS6UOR1WxnoQAKwtVT2wcw7k8IkhNwaT4fsl
5yackDMi+3J4XvLvg/G6FtRrigeQeJkuHzVwyoppgZMsw8/RDUmFPZPxAYstMWoB
uwCiu/4dVZOb8XMi0nMiX9zlNhjDna9WwhRgw2ZlOxzCC+rWkIZhMrDRc3J54iBY
ECTtHniXO6xYz+io/Et3zkX/f3XpNVNoL1LbTD/OiNvu+Nxo5lYW3VcGE8pUCohu
iut7WNl4RWbe40IdbwAbb9I/4ptAUjhzBZj110NHrUNEkHr2NK9PqwPFWxImauBq
eSWGQEyC6WfhIdamApmPJs4e4xoTYQh2tkvhn9RTxgq/hpQ4QBuU2oZ/P572mFKC
WPuNwu9BxMbx0MAvhREAQ7/mcNXV3ZOcFCCpIY+O5p8qJjOzTSRjNzIBxIhuNVAZ
OO2oQcjJ+iOya9eOXiXSOFfhXE5PiCi8XULafMBrx/yEOMcQE0K99q9RnVA8gKam
4nqCHRJry0wrZm5pbEA+aclSsMVqz87cezd46qWFhEEduUETaYcsIuTRUdi/maWj
8lM08b6aywHSML4dFhZCk/GOS37vd4mku94rPV0PO/s9oYPPgLbl0jtyUsOuqvCZ
y4/Oyl3OmlhhKMIIc3RDNBuyakGnyuKO/twtgipizBbvu1ZdxT9o5pI7AArvQy4N
3sFaSB53uSHw4IDp8Nq9
=TX4b
-----END PGP SIGNATURE-----
diff mbox

Patch

diff --git a/board/technexion/twister/twister.c b/board/technexion/twister/twister.c
index c9eea9b..fa0ace0 100644
--- a/board/technexion/twister/twister.c
+++ b/board/technexion/twister/twister.c
@@ -165,10 +165,10 @@  void spl_board_prepare_for_linux(void)
 int spl_start_uboot(void)
 {
 	int val = 0;
-	if (!gpio_request(CONFIG_SPL_OS_BOOT_KEY, "U-Boot key")) {
-		gpio_direction_input(CONFIG_SPL_OS_BOOT_KEY);
-		val = gpio_get_value(CONFIG_SPL_OS_BOOT_KEY);
-		gpio_free(CONFIG_SPL_OS_BOOT_KEY);
+	if (!gpio_request(SPL_OS_BOOT_KEY, "U-Boot key")) {
+		gpio_direction_input(SPL_OS_BOOT_KEY);
+		val = gpio_get_value(SPL_OS_BOOT_KEY);
+		gpio_free(SPL_OS_BOOT_KEY);
 	}
 	return val;
 }
diff --git a/board/technexion/twister/twister.h b/board/technexion/twister/twister.h
index a2051c0..cff479c 100644
--- a/board/technexion/twister/twister.h
+++ b/board/technexion/twister/twister.h
@@ -38,6 +38,8 @@  const omap3_sysinfo sysinfo = {
 #define XR16L2751_UART1_BASE	0x21000000
 #define XR16L2751_UART2_BASE	0x23000000
 
+/* GPIO used to select between U-Boot and kernel */
+#define SPL_OS_BOOT_KEY	55
 
 /*
  * IEN  - Input Enable
diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
index 85685ee..b88d978 100644
--- a/board/timll/devkit8000/devkit8000.c
+++ b/board/timll/devkit8000/devkit8000.c
@@ -172,10 +172,10 @@  void spl_board_prepare_for_linux(void)
 int spl_start_uboot(void)
 {
 	int val = 0;
-	if (!gpio_request(CONFIG_SPL_OS_BOOT_KEY, "U-Boot key")) {
-		gpio_direction_input(CONFIG_SPL_OS_BOOT_KEY);
-		val = gpio_get_value(CONFIG_SPL_OS_BOOT_KEY);
-		gpio_free(CONFIG_SPL_OS_BOOT_KEY);
+	if (!gpio_request(SPL_OS_BOOT_KEY, "U-Boot key")) {
+		gpio_direction_input(SPL_OS_BOOT_KEY);
+		val = gpio_get_value(SPL_OS_BOOT_KEY);
+		gpio_free(SPL_OS_BOOT_KEY);
 	}
 	return !val;
 }
diff --git a/board/timll/devkit8000/devkit8000.h b/board/timll/devkit8000/devkit8000.h
index aa69e6c..c1965e2 100644
--- a/board/timll/devkit8000/devkit8000.h
+++ b/board/timll/devkit8000/devkit8000.h
@@ -32,6 +32,9 @@  const omap3_sysinfo sysinfo = {
 	"NAND",
 };
 
+/* GPIO used to select between U-Boot and kernel */
+#define SPL_OS_BOOT_KEY	26
+
 /*
  * IEN  - Input Enable
  * IDIS - Input Disable
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index d926f74..788227d 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -354,7 +354,6 @@ 
 
 /* SPL OS boot options */
 #define CONFIG_SPL_OS_BOOT
-#define CONFIG_SPL_OS_BOOT_KEY	26
 
 #define CONFIG_CMD_SPL
 #define CONFIG_CMD_SPL_WRITE_SIZE       0x400 /* 1024 byte */
diff --git a/include/configs/twister.h b/include/configs/twister.h
index a852481..4205a11 100644
--- a/include/configs/twister.h
+++ b/include/configs/twister.h
@@ -58,7 +58,6 @@ 
 #define CONFIG_CMD_SPL_NAND_OFS	(CONFIG_SYS_NAND_SPL_KERNEL_OFFS+\
 						0x600000)
 #define CONFIG_SPL_OS_BOOT
-#define CONFIG_SPL_OS_BOOT_KEY	55
 
 #define CONFIG_SYS_SPL_ARGS_ADDR	(PHYS_SDRAM_1 + 0x100)
 #define CONFIG_SPL_BOARD_INIT