Skip to contentSkip to conversation

configs: make keystone2 config to start using arm_v7_common header

PATCH Superseded Nishanth Menon 1 participant 4 messages Jul 16, 2015

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

cover configs: make keystone2 config to start using arm_v7_common header

For legacy reasons, keystone2 had kind of stayed completely seperated from the rest of the TI SoC families. This makes no sense since there are a lot of common definitions that can be reused between all SoC configuration allowing for a consistent user experience.

So make keystone2 follow the rest of the TI SoCs based on OMAP architecture as well.

Test log: K2H: http://pastebin.ubuntu.com/11888160/ (using https://patchwork.ozlabs.org/patch/440665/)
I have no other platform to verify on.

Series based on master 4905dfc65d9a Merge branch 'master' of git://git.denx.de/u-boot-spi

Nishanth Menon (3):
configs: split ti_armv7_common into a omap generic header
configs: rename ks2_evm into ti_armv7_keystone2
configs: ti_armv7_keystone2: start using armv7_common

 include/configs/am43xx_evm.h                       |  2 +-
 include/configs/k2e_evm.h                          |  4 +-
 include/configs/k2hk_evm.h                         |  4 +-
 include/configs/k2l_evm.h                          |  4 +-
 include/configs/ti_am335x_common.h                 |  2 +-
 include/configs/ti_armv7_common.h                  | 31 ++++----------
 .../configs/{ks2_evm.h => ti_armv7_keystone2.h}    | 50 +++++++---------------
 include/configs/ti_armv7_omap.h                    | 49 +++++++++++++++++++++
 include/configs/ti_omap3_common.h                  |  2 +-
 include/configs/ti_omap4_common.h                  |  2 +-
 include/configs/ti_omap5_common.h                  |  2 +-
 11 files changed, 81 insertions(+), 71 deletions(-)
 rename include/configs/{ks2_evm.h => ti_armv7_keystone2.h} (90%)
 create mode 100644 include/configs/ti_armv7_omap.h
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/3 configs: split ti_armv7_common into a omap generic header

TI armv7 based SoCs are based on two architectures - one based on OMAP generation architecture and others based on Keystone architecture.

Many of the options are architecture specific, however a lot are common with v7 architecture. So, step 1 will be to move out OMAP specific stuff from ti_armv7_common into a ti_armv7_omap.h header which is then used by all the relevant architecture headers.

---
 include/configs/am43xx_evm.h       |  2 +-
 include/configs/ti_am335x_common.h |  2 +-
 include/configs/ti_armv7_common.h  | 21 ----------------
 include/configs/ti_armv7_omap.h    | 49 ++++++++++++++++++++++++++++++++++++++
 include/configs/ti_omap3_common.h  |  2 +-
 include/configs/ti_omap4_common.h  |  2 +-
 include/configs/ti_omap5_common.h  |  2 +-
 7 files changed, 54 insertions(+), 26 deletions(-)
 create mode 100644 include/configs/ti_armv7_omap.h
include/configs/am43xx_evm.h +1 -1
index 33e534a76583..65ac8ef34eb8 100644
@@ -80,7 +80,7 @@
 #endif
 
 /* Now bring in the rest of the common code. */
-#include <configs/ti_armv7_common.h>
+#include <configs/ti_armv7_omap.h>
 
 /* Always 64 KiB env size */
 #define CONFIG_ENV_SIZE			(64 << 10)
include/configs/ti_am335x_common.h +1 -1
index 4d2ae280e7f1..9697431b4496 100644
@@ -94,6 +94,6 @@
 #endif
 
 /* Now bring in the rest of the common code. */
-#include <configs/ti_armv7_common.h>
+#include <configs/ti_armv7_omap.h>
 
 #endif	/* __CONFIG_TI_AM335X_COMMON_H__ */
include/configs/ti_armv7_common.h +0 -21
index 0aea7d12ec16..63244dbc83ff 100644
@@ -18,8 +18,6 @@
 #define __CONFIG_TI_ARMV7_COMMON_H__
 
 /* Common define for many platforms. */
-#define CONFIG_OMAP
-#define CONFIG_OMAP_COMMON
 #define CONFIG_SYS_GENERIC_BOARD
 
 /*
@@ -86,39 +84,20 @@
 #define CONFIG_I2C
 #define CONFIG_CMD_I2C
 #define CONFIG_SYS_I2C
-#define CONFIG_SYS_OMAP24_I2C_SPEED	100000
-#define CONFIG_SYS_OMAP24_I2C_SLAVE	1
-#define CONFIG_SYS_I2C_OMAP24XX
 
 /* MMC/SD IP block */
 #define CONFIG_MMC
 #define CONFIG_GENERIC_MMC
-#define CONFIG_OMAP_HSMMC
 #define CONFIG_CMD_MMC
 
 /* McSPI IP block */
 #define CONFIG_SPI
-#define CONFIG_OMAP3_SPI
 #define CONFIG_CMD_SPI
 
 /* GPIO block */
-#define CONFIG_OMAP_GPIO
 #define CONFIG_CMD_GPIO
 
 /*
- * GPMC NAND block.  We support 1 device and the physical address to
- * access CS0 at is 0x8000000.
- */
-#ifdef CONFIG_NAND
-#define CONFIG_NAND_OMAP_GPMC
-#ifndef CONFIG_SYS_NAND_BASE
-#define CONFIG_SYS_NAND_BASE		0x8000000
-#endif
-#define CONFIG_SYS_MAX_NAND_DEVICE	1
-#define CONFIG_CMD_NAND
-#endif
-
-/*
  * The following are general good-enough settings for U-Boot.  We set a
  * large malloc pool as we generally have a lot of DDR, and we opt for
  * function over binary size in the main portion of U-Boot as this is
include/configs/ti_armv7_omap.h new file +49 -0

49 lines not on this page · raw message

include/configs/ti_omap3_common.h +1 -1
index 429b109afa23..be231a551361 100644
@@ -84,6 +84,6 @@
 #endif
 
 /* Now bring in the rest of the common code. */
-#include <configs/ti_armv7_common.h>
+#include <configs/ti_armv7_omap.h>
 
 #endif	/* __CONFIG_TI_OMAP3_COMMON_H__ */
include/configs/ti_omap4_common.h +1 -1
index e96613406b3b..959f312edb5b 100644
@@ -52,7 +52,7 @@
 #define CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS
 #endif
 
-#include <configs/ti_armv7_common.h>
+#include <configs/ti_armv7_omap.h>
 
 /*
  * Hardware drivers
include/configs/ti_omap5_common.h +1 -1
index f3e5a7587de9..789542be6710 100644
@@ -47,7 +47,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/arch/omap.h>
 
-#include <configs/ti_armv7_common.h>
+#include <configs/ti_armv7_omap.h>
 
 /*
  * Hardware drivers
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/3 configs: rename ks2_evm into ti_armv7_keystone2

In reply to Nishanth Menon

rename the keystone2 common header into an keystone2 architecture specific header which can then reuse the common ti_armv7 config headers.

---
 include/configs/k2e_evm.h                           | 2 +-
 include/configs/k2hk_evm.h                          | 2 +-
 include/configs/k2l_evm.h                           | 2 +-
 include/configs/{ks2_evm.h => ti_armv7_keystone2.h} | 0
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename include/configs/{ks2_evm.h => ti_armv7_keystone2.h} (100%)
include/configs/k2e_evm.h +1 -1
index a28ceb7064a7..ac50a01b2980 100644
@@ -27,7 +27,7 @@
 	"name_uboot=u-boot-spi-k2e-evm.gph\0"				\
 	"name_fs=arago-console-image-k2e-evm.cpio.gz\0"
 
-#include <configs/ks2_evm.h>
+#include <configs/ti_armv7_keystone2.h>
 
 /* SPL SPI Loader Configuration */
 #define CONFIG_SPL_TEXT_BASE           0x0c100000
include/configs/k2hk_evm.h +1 -1
index eae772178338..29e3403aa082 100644
@@ -27,7 +27,7 @@
 	"name_uboot=u-boot-spi-k2hk-evm.gph\0"				\
 	"name_fs=arago-console-image-k2hk-evm.cpio.gz\0"
 
-#include <configs/ks2_evm.h>
+#include <configs/ti_armv7_keystone2.h>
 
 /* SPL SPI Loader Configuration */
 #define CONFIG_SPL_TEXT_BASE		0x0c200000
include/configs/k2l_evm.h +1 -1
index 57da0579255a..50d5c991a0bb 100644
@@ -27,7 +27,7 @@
 	"name_uboot=u-boot-spi-k2l-evm.gph\0"				\
 	"name_fs=arago-console-image-k2l-evm.cpio.gz\0"
 
-#include <configs/ks2_evm.h>
+#include <configs/ti_armv7_keystone2.h>
 
 /* SPL SPI Loader Configuration */
 #define CONFIG_SPL_TEXT_BASE		0x0c100000
include/configs/ti_armv7_keystone2.h renamed from include/configs/ks2_evm.h +0 -0
similarity index 100%
rename from include/configs/ks2_evm.h
rename to include/configs/ti_armv7_keystone2.h
Signature · 1 line
2.1.4
#3 lore raw

PATCH 3/3 configs: ti_armv7_keystone2: start using armv7_common

In reply to Nishanth Menon

Try to maintain as much commonality by conditionally including stuff in armv7_common as necessary and removing the common defines from keystone2 header.

---
note: this has a minor 80char checkpatch warning for definition, which i kind of left alone considering bit of readability subjective view..

 include/configs/k2e_evm.h            |  2 --
 include/configs/k2hk_evm.h           |  2 --
 include/configs/k2l_evm.h            |  2 --
 include/configs/ti_armv7_common.h    | 10 +++++++-
 include/configs/ti_armv7_keystone2.h | 50 +++++++++++-------------------------
 5 files changed, 24 insertions(+), 42 deletions(-)
include/configs/k2e_evm.h +0 -2
index ac50a01b2980..f1e650141ae1 100644
@@ -15,8 +15,6 @@
 #define CONFIG_K2E_EVM
 
 /* U-Boot general configuration */
-#define CONFIG_SYS_PROMPT               "K2E EVM # "
-
 #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS				\
 	"addr_mon=0x0c140000\0"						\
 	"args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs "	\
include/configs/k2hk_evm.h +0 -2
index 29e3403aa082..f8e83de64b63 100644
@@ -15,8 +15,6 @@
 #define CONFIG_K2HK_EVM
 
 /* U-Boot general configuration */
-#define CONFIG_SYS_PROMPT               "K2HK EVM # "
-
 #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS				\
 	"addr_mon=0x0c5f0000\0"						\
 	"args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs "	\
include/configs/k2l_evm.h +0 -2
index 50d5c991a0bb..395608a5f6db 100644
@@ -15,8 +15,6 @@
 #define CONFIG_K2L_EVM
 
 /* U-Boot general configuration */
-#define CONFIG_SYS_PROMPT		"K2L EVM # "
-
 #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS				\
 	"addr_mon=0x0c140000\0"						\
 	"args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs "	\
include/configs/ti_armv7_common.h +9 -1
index 63244dbc83ff..477454ce6d37 100644
@@ -38,7 +38,9 @@
  * However, set this to a 32MB offset to allow for easier Linux kernel
  * booting as the default is often used as the kernel load address.
  */
+#ifndef CONFIG_SYS_LOAD_ADDR
 #define CONFIG_SYS_LOAD_ADDR		0x82000000
+#endif
 
 /*
  * We setup defaults based on constraints from the Linux kernel, which should
@@ -73,9 +75,15 @@
 #ifndef CONFIG_NR_DRAM_BANKS
 #define CONFIG_NR_DRAM_BANKS		1
 #endif
+
+#ifndef CONFIG_SYS_SDRAM_BASE
 #define CONFIG_SYS_SDRAM_BASE		0x80000000
+#endif
+
+#ifndef CONFIG_SYS_INIT_SP_ADDR
 #define CONFIG_SYS_INIT_SP_ADDR         (NON_SECURE_SRAM_END - \
 						GENERATED_GBL_DATA_SIZE)
+#endif
 
 /* Timer information. */
 #define CONFIG_SYS_PTV			2	/* Divisor: 2^(PTV+1) => 8 */
@@ -140,7 +148,7 @@
  * mtdparts, both for ease of use in U-Boot and for passing information
  * on to the Linux kernel.
  */
-#if defined(CONFIG_SPI_BOOT) || defined(CONFIG_NOR) || defined(CONFIG_NAND)
+#if defined(CONFIG_SPI_BOOT) || defined(CONFIG_NOR) || defined(CONFIG_NAND) || defined(CONFIG_NAND_DAVINCI)
 #define CONFIG_MTD_DEVICE		/* Required for mtdparts */
 #define CONFIG_CMD_MTDPARTS
 #endif
include/configs/ti_armv7_keystone2.h +15 -35

136 lines not on this page · raw message

Signature · 1 line
2.1.4