All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/4] arm: lager: Disable TMU0 before OS boots
@ 2014-01-08  1:32 Nobuhiro Iwamatsu
  2014-01-08  1:32 ` [U-Boot] [PATCH v2 2/4] arm: lager: Add support QSPI device and enable boot from SPI flash Nobuhiro Iwamatsu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nobuhiro Iwamatsu @ 2014-01-08  1:32 UTC (permalink / raw)
  To: u-boot

On U-boot uses TMU0 as timer, but TMU0 does not use on linux kernel
and other.
This disables TMU0 at the request of from kernel user.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
 v2: no changes.

 board/renesas/lager/lager.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c
index cdd5b32..ad5289a 100644
--- a/board/renesas/lager/lager.c
+++ b/board/renesas/lager/lager.c
@@ -254,6 +254,12 @@ int board_early_init_f(void)
 	return 0;
 }
 
+void arch_preboot_os(void)
+{
+	/* Disable TMU0 */
+	mstp_setbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
+}
+
 DECLARE_GLOBAL_DATA_PTR;
 int board_init(void)
 {
-- 
1.8.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2 2/4] arm: lager: Add support QSPI device and enable boot from SPI flash
  2014-01-08  1:32 [U-Boot] [PATCH v2 1/4] arm: lager: Disable TMU0 before OS boots Nobuhiro Iwamatsu
@ 2014-01-08  1:32 ` Nobuhiro Iwamatsu
  2014-01-08  1:32 ` [U-Boot] [PATCH v2 3/4] arm: koelsch: Disable TMU0 before OS boots Nobuhiro Iwamatsu
  2014-01-08  1:32 ` [U-Boot] [PATCH v2 4/4] arm: koelsch: Add support QSPI device and enable boot from SPI flash Nobuhiro Iwamatsu
  2 siblings, 0 replies; 4+ messages in thread
From: Nobuhiro Iwamatsu @ 2014-01-08  1:32 UTC (permalink / raw)
  To: u-boot

This supports SH-QSPI device on lager board, and enable booting from
SPI flash.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
 v2: Remove address definition of SH QSPI
     Move CONFIG_SYS_TEXT_BASE from SPI section.

 include/configs/lager.h | 33 +++++++++++++++++++++++++++++----
 1 file changed, 29 insertions(+), 4 deletions(-)

diff --git a/include/configs/lager.h b/include/configs/lager.h
index 8932825..b6c1954 100644
--- a/include/configs/lager.h
+++ b/include/configs/lager.h
@@ -34,7 +34,15 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_NFS
 #define CONFIG_CMD_BOOTZ
-#define	CONFIG_CMD_FLASH
+
+#if defined(CONFIG_SYS_USE_BOOT_NORFLASH)
+#define CONFIG_CMD_FLASH
+#define CONFIG_SYS_TEXT_BASE	0x00000000
+#else
+#define CONFIG_CMD_SF
+#define CONFIG_CMD_SPI
+#define CONFIG_SYS_TEXT_BASE	0xE8080000
+#endif
 
 #define	CONFIG_CMDLINE_TAG
 #define	CONFIG_SETUP_MEMORY_TAGS
@@ -104,8 +112,8 @@
 #define CONFIG_SYS_GBL_DATA_SIZE	(256)
 #define CONFIG_SYS_BOOTMAPSZ		(8 * 1024 * 1024)
 
+#if defined(CONFIG_SYS_USE_BOOT_NORFLASH)
 /* USE NOR FLASH */
-#define CONFIG_SYS_TEXT_BASE	0x00000000
 #define CONFIG_SYS_FLASH_CFI
 #define CONFIG_SYS_FLASH_CFI_WIDTH	FLASH_CFI_16BIT
 #define	CONFIG_FLASH_CFI_DRIVER
@@ -124,10 +132,27 @@
 
 /* ENV setting */
 #define CONFIG_ENV_IS_IN_FLASH
-#define CONFIG_ENV_OVERWRITE	1
-#define CONFIG_ENV_SECT_SIZE	(256 * 1024)
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_FLASH_BASE + \
 				 CONFIG_SYS_MONITOR_LEN)
+
+#else /* CONFIG_SYS_USE_BOOT_NORFLASH */
+
+/* USE SPI */
+#define CONFIG_SPI
+#define CONFIG_SPI_FLASH_BAR
+#define CONFIG_SH_QSPI
+#define CONFIG_SPI_FLASH
+#define CONFIG_SPI_FLASH_SPANSION
+#define CONFIG_SYS_NO_FLASH
+
+/* ENV setting */
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_ADDR	0xC0000
+#endif
+
+/* Common ENV setting */
+#define CONFIG_ENV_OVERWRITE
+#define CONFIG_ENV_SECT_SIZE	(256 * 1024)
 #define CONFIG_ENV_OFFSET	(CONFIG_ENV_ADDR)
 #define CONFIG_ENV_SIZE		(CONFIG_ENV_SECT_SIZE)
 #define CONFIG_ENV_SIZE_REDUND	(CONFIG_SYS_MONITOR_LEN)
-- 
1.8.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2 3/4] arm: koelsch: Disable TMU0 before OS boots
  2014-01-08  1:32 [U-Boot] [PATCH v2 1/4] arm: lager: Disable TMU0 before OS boots Nobuhiro Iwamatsu
  2014-01-08  1:32 ` [U-Boot] [PATCH v2 2/4] arm: lager: Add support QSPI device and enable boot from SPI flash Nobuhiro Iwamatsu
@ 2014-01-08  1:32 ` Nobuhiro Iwamatsu
  2014-01-08  1:32 ` [U-Boot] [PATCH v2 4/4] arm: koelsch: Add support QSPI device and enable boot from SPI flash Nobuhiro Iwamatsu
  2 siblings, 0 replies; 4+ messages in thread
From: Nobuhiro Iwamatsu @ 2014-01-08  1:32 UTC (permalink / raw)
  To: u-boot

On U-boot uses TMU0 as timer, but TMU0 does not use on linux kernel
and other.
This disables TMU0 at the request of from kernel user.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
 v2: no changes.

 board/renesas/koelsch/koelsch.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/board/renesas/koelsch/koelsch.c b/board/renesas/koelsch/koelsch.c
index 89f5c91..32d3b58 100644
--- a/board/renesas/koelsch/koelsch.c
+++ b/board/renesas/koelsch/koelsch.c
@@ -253,6 +253,12 @@ int board_early_init_f(void)
 	return 0;
 }
 
+void arch_preboot_os(void)
+{
+	/* Disable TMU0 */
+	mstp_setbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
+}
+
 /* LSI pin pull-up control */
 #define PUPR5 0xe6060114
 #define PUPR5_ETH 0x3FFC0000
-- 
1.8.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2 4/4] arm: koelsch: Add support QSPI device and enable boot from SPI flash
  2014-01-08  1:32 [U-Boot] [PATCH v2 1/4] arm: lager: Disable TMU0 before OS boots Nobuhiro Iwamatsu
  2014-01-08  1:32 ` [U-Boot] [PATCH v2 2/4] arm: lager: Add support QSPI device and enable boot from SPI flash Nobuhiro Iwamatsu
  2014-01-08  1:32 ` [U-Boot] [PATCH v2 3/4] arm: koelsch: Disable TMU0 before OS boots Nobuhiro Iwamatsu
@ 2014-01-08  1:32 ` Nobuhiro Iwamatsu
  2 siblings, 0 replies; 4+ messages in thread
From: Nobuhiro Iwamatsu @ 2014-01-08  1:32 UTC (permalink / raw)
  To: u-boot

This supports SH-QSPI device on koelsch board, and enable booting from
SPI flash.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
 v2: Remove address definition of SH QSPI
     Move CONFIG_SYS_TEXT_BASE from SPI section.

 include/configs/koelsch.h | 32 ++++++++++++++++++++++++++++----
 1 file changed, 28 insertions(+), 4 deletions(-)

diff --git a/include/configs/koelsch.h b/include/configs/koelsch.h
index f8cca5b..cc3c7a8 100644
--- a/include/configs/koelsch.h
+++ b/include/configs/koelsch.h
@@ -31,7 +31,16 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_NFS
 #define CONFIG_CMD_BOOTZ
+
+#if defined(CONFIG_SYS_USE_BOOT_NORFLASH)
 #define	CONFIG_CMD_FLASH
+#define CONFIG_SYS_TEXT_BASE	0x00000000
+#else
+/* SPI flash boot is default. */
+#define CONFIG_CMD_SF
+#define CONFIG_CMD_SPI
+#define CONFIG_SYS_TEXT_BASE	0xE6304000
+#endif
 
 #define	CONFIG_CMDLINE_TAG
 #define	CONFIG_SETUP_MEMORY_TAGS
@@ -101,7 +110,7 @@
 #define CONFIG_SYS_BOOTMAPSZ		(8 * 1024 * 1024)
 
 /* FLASH */
-#define CONFIG_SYS_TEXT_BASE	0x00000000
+#if defined(CONFIG_SYS_USE_BOOT_NORFLASH)
 #define CONFIG_SYS_FLASH_CFI
 #define CONFIG_SYS_FLASH_CFI_WIDTH	FLASH_CFI_16BIT
 #define	CONFIG_FLASH_CFI_DRIVER
@@ -117,13 +126,28 @@
 #define CONFIG_SYS_FLASH_WRITE_TOUT	3000
 #define CONFIG_SYS_FLASH_LOCK_TOUT	3000
 #define CONFIG_SYS_FLASH_UNLOCK_TOUT	3000
-
 /* ENV setting */
 #define CONFIG_ENV_IS_IN_FLASH
-#define CONFIG_ENV_OVERWRITE	1
-#define CONFIG_ENV_SECT_SIZE	(256 * 1024)
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_FLASH_BASE + \
 				 CONFIG_SYS_MONITOR_LEN)
+
+#else /* CONFIG_SYS_USE_BOOT_NORFLASH */
+
+#define CONFIG_SYS_NO_FLASH
+#define CONFIG_SPI
+#define CONFIG_SH_QSPI
+#define CONFIG_SPI_FLASH
+#define CONFIG_SPI_FLASH_BAR
+#define CONFIG_SPI_FLASH_SPANSION
+/* ENV setting */
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_ADDR	0xC0000
+
+#endif /* CONFIG_SYS_USE_BOOT_NORFLASH */
+
+/* Common ENV setting */
+#define CONFIG_ENV_OVERWRITE
+#define CONFIG_ENV_SECT_SIZE	(256 * 1024)
 #define CONFIG_ENV_OFFSET	(CONFIG_ENV_ADDR)
 #define CONFIG_ENV_SIZE		(CONFIG_ENV_SECT_SIZE)
 #define CONFIG_ENV_SIZE_REDUND	(CONFIG_SYS_MONITOR_LEN)
-- 
1.8.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-08  1:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-08  1:32 [U-Boot] [PATCH v2 1/4] arm: lager: Disable TMU0 before OS boots Nobuhiro Iwamatsu
2014-01-08  1:32 ` [U-Boot] [PATCH v2 2/4] arm: lager: Add support QSPI device and enable boot from SPI flash Nobuhiro Iwamatsu
2014-01-08  1:32 ` [U-Boot] [PATCH v2 3/4] arm: koelsch: Disable TMU0 before OS boots Nobuhiro Iwamatsu
2014-01-08  1:32 ` [U-Boot] [PATCH v2 4/4] arm: koelsch: Add support QSPI device and enable boot from SPI flash Nobuhiro Iwamatsu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.