Skip to contentSkip to conversation

armv7: Mark the default lowlevel_init function as weak

PATCH New Tom Rini 1 participant 14 messages May 16, 2017 – Jun 6, 2017

Subsystems (4)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/7 armv7: Mark the default lowlevel_init function as weak

Rather than have a long and if check in the Makefile, mark the default lowlevel_init function as weak (as we do on armv8) so that SoCs can override it if needed, and it will still be discarded if unused. Provide a weak s_init as well to allow for this to link and be discarded.

---
 arch/arm/cpu/armv7/Makefile        |  2 --
 arch/arm/cpu/armv7/lowlevel_init.S | 10 +++++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)
arch/arm/cpu/armv7/Makefile +0 -2
index 5fac252c0e00..45dd3caec6b3 100644
@@ -12,11 +12,9 @@ obj-y	+= cache_v7.o cache_v7_asm.o
 obj-y	+= cpu.o cp15.o
 obj-y	+= syslib.o
 
-ifneq ($(CONFIG_AM43XX)$(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA)$(CONFIG_MX6)$(CONFIG_MX7)$(CONFIG_TI81XX)$(CONFIG_AT91FAMILY)$(CONFIG_ARCH_SUNXI)$(CONFIG_ARCH_SOCFPGA)$(CONFIG_ARCH_MX7ULP)$(CONFIG_ARCH_LS1021A),)
 ifneq ($(CONFIG_SKIP_LOWLEVEL_INIT),y)
 obj-y	+= lowlevel_init.o
 endif
-endif
 
 obj-$(CONFIG_ARM_SMCCC)		+= smccc-call.o
 obj-$(CONFIG_ARMV7_NONSEC)	+= nonsec_virt.o virt-v7.o virt-dt.o
arch/arm/cpu/armv7/lowlevel_init.S +9 -1
index 658934d664a4..64f105864f87 100644
@@ -15,7 +15,14 @@
 #include <config.h>
 #include <linux/linkage.h>
 
-ENTRY(lowlevel_init)
+.pushsection .text.s_init, "ax"
+WEAK(s_init)
+	bx	lr
+ENDPROC(s_init)
+.popsection
+
+.pushsection .text.lowlevel_init, "ax"
+WEAK(lowlevel_init)
 	/*
 	 * Setup a temporary stack. Global data is not available yet.
 	 */
@@ -61,3 +68,4 @@ ENTRY(lowlevel_init)
 	bl	s_init
 	pop	{ip, pc}
 ENDPROC(lowlevel_init)
+.popsection
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/7 armv7: Mark the default lowlevel_init function as weak

Quoted 7 lines · Tom Rini

Rather than have a long and if check in the Makefile, mark the default lowlevel_init function as weak (as we do on armv8) so that SoCs can override it if needed, and it will still be discarded if unused. Provide a weak s_init as well to allow for this to link and be discarded.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/0187d868/attachment.sig>
author
#2 lore raw

PATCH 2/7 ti816x: Rework DDR initialization sequence

In reply to Tom Rini

The ti816x/am389x SoC is the first generation in what U-Boot calls the "am33xx" family. In the first generation of this family the DDR initialization sequence is quite different from all of the subsequent generations. Whereas with ti814x (second generation) we can easily work the minor differenced between that and am33xx (third generation), our attempts to do this for ti816x weren't sufficient. Rather than add a large amount of #ifdef logic to make this different sequence work we add a new file, ti816x_emif4.c to handle the various required undocumented register writes and sequence and leverage what we can from arch/arm/mach-omap2/am33xx/ddr.c still. As DDR2 has similar problems today but I am unable to test it, we drop the DDR2 defines from the code rather than imply that it works by leaving it. We also remove a bunch of other untested code about changing the speed the DDR runs at.

---
Note that today the board will boot perhaps 3 out of 5 times in a row. This allows us to perform power on reset reliably. And yes, there are lots of undocumented register writes, but no, it is unlikely that they will ever be documented.

---
 arch/arm/include/asm/arch-am33xx/clocks_am33xx.h |   1 +
 arch/arm/include/asm/arch-am33xx/ddr_defs.h      |   6 +
 arch/arm/mach-omap2/am33xx/Makefile              |   3 +
 arch/arm/mach-omap2/am33xx/board.c               |  21 +++
 arch/arm/mach-omap2/am33xx/clock_ti816x.c        |  68 ++------
 arch/arm/mach-omap2/am33xx/ddr.c                 |   9 ++
 arch/arm/mach-omap2/am33xx/emif4.c               |  41 +----
 arch/arm/mach-omap2/am33xx/ti816x_emif4.c        | 165 +++++++++++++++++++
 board/ti/ti816x/evm.c                            | 192 +++++------------------
 include/configs/ti816x_evm.h                     |  15 --
 scripts/config_whitelist.txt                     |   5 -
 11 files changed, 260 insertions(+), 266 deletions(-)
 create mode 100644 arch/arm/mach-omap2/am33xx/ti816x_emif4.c
arch/arm/include/asm/arch-am33xx/clocks_am33xx.h +1 -0
index 653ec1b2394f..bc1dab5b72b2 100644
@@ -29,6 +29,7 @@
 #define NUM_OPPS	6
 
 extern void enable_dmm_clocks(void);
+extern void enable_emif_clocks(void);
 extern const struct dpll_params dpll_core_opp100;
 extern struct dpll_params dpll_mpu_opp100;
 
arch/arm/include/asm/arch-am33xx/ddr_defs.h +6 -0
index 43e122e26191..a97ebb557bcd 100644
@@ -354,9 +354,15 @@ struct ddr_ctrl {
 	unsigned int ddrckectrl;
 };
 
+#ifdef CONFIG_TI816X
+void config_ddr(const struct ddr_data *data, const struct cmd_control *ctrl,
+		const struct emif_regs *regs,
+		const struct dmm_lisa_map_regs *lisa_regs, int nrs);
+#else
 void config_ddr(unsigned int pll, const struct ctrl_ioregs *ioregs,
 		const struct ddr_data *data, const struct cmd_control *ctrl,
 		const struct emif_regs *regs, int nr);
+#endif
 void emif_get_ext_phy_ctrl_const_regs(const u32 **regs, u32 *size);
 
 #endif  /* _DDR_DEFS_H */
arch/arm/mach-omap2/am33xx/Makefile +3 -0
index 05cc8a11c5cb..1e4c04e7a65b 100644
@@ -15,7 +15,10 @@ endif
 obj-$(CONFIG_TI816X)	+= clock_ti816x.o
 obj-y	+= sys_info.o
 obj-y	+= ddr.o
+ifeq ($(CONFIG_TI816X)$(CONFIG_SKIP_LOWLEVEL_INIT),)
 obj-y	+= emif4.o
+endif
+obj-$(CONFIG_TI816X)	+= ti816x_emif4.o
 obj-y	+= board.o
 obj-y	+= mux.o
 
arch/arm/mach-omap2/am33xx/board.c +21 -0
index a8b5d13238a2..faf7d07a0330 100644
@@ -39,6 +39,27 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+int dram_init(void)
+{
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
+	sdram_init();
+#endif
+
+	/* dram_init must store complete ramsize in gd->ram_size */
+	gd->ram_size = get_ram_size(
+			(void *)CONFIG_SYS_SDRAM_BASE,
+			CONFIG_MAX_RAM_BANK_SIZE);
+	return 0;
+}
+
+int dram_init_banksize(void)
+{
+	gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
+	gd->bd->bi_dram[0].size = gd->ram_size;
+
+	return 0;
+}
+
 #if !CONFIG_IS_ENABLED(OF_CONTROL)
 static const struct ns16550_platdata am33xx_serial[] = {
 	{ .base = CONFIG_SYS_NS16550_COM1, .reg_shift = 2,
arch/arm/mach-omap2/am33xx/clock_ti816x.c +9 -59

96 lines not on this page · raw message

arch/arm/mach-omap2/am33xx/ddr.c +9 -0
index 690487e7c38b..7bf19ed9665f 100644
@@ -163,6 +163,14 @@ void config_sdram_emif4d5(const struct emif_regs *regs, int nr)
  */
 void config_sdram(const struct emif_regs *regs, int nr)
 {
+#ifdef CONFIG_TI816X
+	writel(regs->sdram_config, &emif_reg[nr]->emif_sdram_config);
+	writel(regs->emif_ddr_phy_ctlr_1, &emif_reg[nr]->emif_ddr_phy_ctrl_1);
+	writel(regs->emif_ddr_phy_ctlr_1, &emif_reg[nr]->emif_ddr_phy_ctrl_1_shdw);
+	writel(0x0000613B, &emif_reg[nr]->emif_sdram_ref_ctrl);   /* initially a large refresh period */
+	writel(0x1000613B, &emif_reg[nr]->emif_sdram_ref_ctrl);   /* trigger initialization           */
+	writel(regs->ref_ctrl, &emif_reg[nr]->emif_sdram_ref_ctrl);
+#else
 	if (regs->zq_config) {
 		writel(regs->zq_config, &emif_reg[nr]->emif_zq_config);
 		writel(regs->sdram_config, &cstat->secure_emif_sdram_config);
@@ -184,6 +192,7 @@ void config_sdram(const struct emif_regs *regs, int nr)
 	/* Write REG_COS_COUNT_1, REG_COS_COUNT_2, and REG_PR_OLD_COUNT. */
 	if (regs->ocp_config)
 		writel(regs->ocp_config, &emif_reg[nr]->emif_l3_config);
+#endif
 }
 
 /**
arch/arm/mach-omap2/am33xx/emif4.c +4 -37

80 lines not on this page · raw message

arch/arm/mach-omap2/am33xx/ti816x_emif4.c new file +165 -0

165 lines not on this page · raw message

board/ti/ti816x/evm.c +42 -150

218 lines not on this page · raw message

include/configs/ti816x_evm.h +0 -15
index 51b09d4b5616..335f71f292f5 100644
@@ -52,21 +52,6 @@
 
 #define CONFIG_FS_FAT
 
-/*
- * Only one of the following two options (DDR3/DDR2) should be enabled
- * CONFIG_TI816X_EVM_DDR2
- * CONFIG_TI816X_EVM_DDR3
- */
-#define CONFIG_TI816X_EVM_DDR3
-
-/*
- * Supported values: 400, 531, 675 or 796 MHz
- */
-#define CONFIG_TI816X_DDR_PLL_796
-
-#define CONFIG_TI816X_USE_EMIF0	1
-#define CONFIG_TI816X_USE_EMIF1	1
-
 #define CONFIG_NR_DRAM_BANKS	2		/* we have 2 banks of DRAM */
 #define PHYS_DRAM_1		0x80000000	/* DRAM Bank #1 */
 #define PHYS_DRAM_1_SIZE        0x40000000	/* 1 GB */
scripts/config_whitelist.txt +0 -5
index fa9c3fc8cbd0..8d56daebedd0 100644
@@ -6113,11 +6113,6 @@ CONFIG_THUMB2_KERNEL
 CONFIG_THUNDERX
 CONFIG_TI814X
 CONFIG_TI816X
-CONFIG_TI816X_DDR_PLL_796
-CONFIG_TI816X_EVM_DDR2
-CONFIG_TI816X_EVM_DDR3
-CONFIG_TI816X_USE_EMIF0
-CONFIG_TI816X_USE_EMIF1
 CONFIG_TI81XX
 CONFIG_TIMESTAMP
 CONFIG_TIZEN
Signature · 1 line
1.9.1
author
#3 lore raw

PATCH 2/7 ti816x: Rework DDR initialization sequence

Quoted 14 lines · Tom Rini

The ti816x/am389x SoC is the first generation in what U-Boot calls the "am33xx" family. In the first generation of this family the DDR initialization sequence is quite different from all of the subsequent generations. Whereas with ti814x (second generation) we can easily work the minor differenced between that and am33xx (third generation), our attempts to do this for ti816x weren't sufficient. Rather than add a large amount of #ifdef logic to make this different sequence work we add a new file, ti816x_emif4.c to handle the various required undocumented register writes and sequence and leverage what we can from arch/arm/mach-omap2/am33xx/ddr.c still. As DDR2 has similar problems today but I am unable to test it, we drop the DDR2 defines from the code rather than imply that it works by leaving it. We also remove a bunch of other untested code about changing the speed the DDR runs at.

Quoted 1 line

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/7a8fb36b/attachment.sig>
author
#4 lore raw

PATCH 3/7 ti816x_evm: Disable CONFIG_USE_PRIVATE_LIBGCC

In reply to Tom Rini

On this platform, we can trace a general failure to boot to enabling / disabling this option. When this is enabled, we go off into the weeds during SPL and are unable to talk with the SD card and mmc_initialize() fails.

---
 configs/ti816x_evm_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/ti816x_evm_defconfig +1 -0
index 8021defb87af..abfc7d5b120f 100644
@@ -27,3 +27,4 @@ CONFIG_CMD_FAT=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+# CONFIG_USE_PRIVATE_LIBGCC is not set
Signature · 1 line
1.9.1
author
#5 lore raw

PATCH 3/7 ti816x_evm: Disable CONFIG_USE_PRIVATE_LIBGCC

Quoted 6 lines · Tom Rini

On this platform, we can trace a general failure to boot to enabling / disabling this option. When this is enabled, we go off into the weeds during SPL and are unable to talk with the SD card and mmc_initialize() fails.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/8ae27f1a/attachment.sig>
author
#6 lore raw

PATCH 4/7 ti816x: Enable NAND

In reply to Tom Rini

The TI8168-EVM comes with NAND on board. Enable it and move environment over there.

---
 board/ti/ti816x/evm.c        |  4 ++-
 configs/ti816x_evm_defconfig |  2 ++
 include/configs/ti816x_evm.h | 60 +++++++++++++++++++++++++++++++++++++++++---
 3 files changed, 62 insertions(+), 4 deletions(-)
board/ti/ti816x/evm.c +3 -1
index ad98e09e2082..8f07e2c9aa00 100644
@@ -25,11 +25,13 @@ DECLARE_GLOBAL_DATA_PTR;
 int board_init(void)
 {
 	gd->bd->bi_boot_params = PHYS_DRAM_1 + 0x100;
+#if defined(CONFIG_NAND)
+	gpmc_init();
+#endif
 	return 0;
 }
 
 #ifdef CONFIG_SPL_BUILD
-
 static struct module_pin_mux mmc_pin_mux[] = {
 	{ OFFSET(pincntl157), PULLDOWN_EN | PULLUDDIS | MODE(0x0) },
 	{ OFFSET(pincntl158), PULLDOWN_EN | PULLUDEN | MODE(0x0) },
configs/ti816x_evm_defconfig +2 -0
index abfc7d5b120f..4f9019220b1b 100644
@@ -7,7 +7,9 @@ CONFIG_TARGET_TI816X_EVM=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
+CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_SPL_FAT_SUPPORT=y
+CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_BOOTDELAY=3
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_VERSION_VARIABLE=y
include/configs/ti816x_evm.h +57 -3

75 lines not on this page · raw message

Signature · 1 line
1.9.1
author
#7 lore raw

PATCH 4/7 ti816x: Enable NAND

Quoted 4 lines · Tom Rini

The TI8168-EVM comes with NAND on board. Enable it and move environment over there.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/2bbfc4e6/attachment.sig>
author
#8 lore raw

PATCH 5/7 ti816x: Import dts files from Linux Kernel v4.11

In reply to Tom Rini

This brings in the required dts/dtsi files for the TI8168-EVM from the Linux Kernel v4.11 release.

---
 arch/arm/dts/Makefile           |   1 +
 arch/arm/dts/dm8168-evm.dts     | 175 ++++++++++++++
 arch/arm/dts/dm816x-clocks.dtsi | 250 +++++++++++++++++++
 arch/arm/dts/dm816x.dtsi        | 518 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 944 insertions(+)
 create mode 100644 arch/arm/dts/dm8168-evm.dts
 create mode 100644 arch/arm/dts/dm816x-clocks.dtsi
 create mode 100644 arch/arm/dts/dm816x.dtsi
arch/arm/dts/Makefile +1 -0
index a985c5d216d6..73b10921443a 100644
@@ -146,6 +146,7 @@ dtb-$(CONFIG_AM33XX) += am335x-boneblack.dtb am335x-bone.dtb \
 dtb-$(CONFIG_AM43XX) += am437x-gp-evm.dtb am437x-sk-evm.dtb	\
 	am43x-epos-evm.dtb \
 	am437x-idk-evm.dtb
+dtb-$(CONFIG_TI816X) += dm8168-evm.dtb
 dtb-$(CONFIG_THUNDERX) += thunderx-88xx.dtb
 
 dtb-$(CONFIG_ARCH_SOCFPGA) +=				\
arch/arm/dts/dm8168-evm.dts new file +175 -0

175 lines not on this page · raw message

arch/arm/dts/dm816x-clocks.dtsi new file +250 -0

250 lines not on this page · raw message

arch/arm/dts/dm816x.dtsi new file +518 -0

518 lines not on this page · raw message

Signature · 1 line
1.9.1
author
#9 lore raw

PATCH 5/7 ti816x: Import dts files from Linux Kernel v4.11

Quoted 4 lines · Tom Rini

This brings in the required dts/dtsi files for the TI8168-EVM from the Linux Kernel v4.11 release.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/8692d76c/attachment.sig>
author
#10 lore raw

PATCH 6/7 ti816x: Modernize the defconfig

In reply to Tom Rini

- Switch to using <configs/ti_armv7_omap.h> and family. This lets us drop lots of custom defines.
- Ensure that our default environment uses DEFAULT_LINUX_BOOT_ENV so that Linux will boot correctly.
- Enable CONFIG_DISTRO_DEFAULTS
- Switch to using CONFIG_OF_CONTROL
- Various other cleanups to match other SoCs in the family line.

---
 board/ti/ti816x/evm.c        |  2 +-
 configs/ti816x_evm_defconfig | 19 +++++++++-----
 include/configs/ti816x_evm.h | 60 +++++++++++---------------------------------
 3 files changed, 28 insertions(+), 53 deletions(-)
board/ti/ti816x/evm.c +1 -1
index 8f07e2c9aa00..577e60f875f4 100644
@@ -24,7 +24,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int board_init(void)
 {
-	gd->bd->bi_boot_params = PHYS_DRAM_1 + 0x100;
+	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 #if defined(CONFIG_NAND)
 	gpmc_init();
 #endif
configs/ti816x_evm_defconfig +13 -6
index 4f9019220b1b..729b709df900 100644
@@ -8,25 +8,32 @@ CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_SPL_FAT_SUPPORT=y
+CONFIG_DEFAULT_DEVICE_TREE="dm8168-evm"
+CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_BOOTDELAY=3
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_VERSION_VARIABLE=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SPL=y
+CONFIG_SPL_STACK_R=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300
-CONFIG_SPL_YMODEM_SUPPORT=y
-CONFIG_HUSH_PARSER=y
-CONFIG_SYS_PROMPT="u-boot/ti816x# "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
+CONFIG_CMD_I2C=y
+# CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_FAT=y
+CONFIG_CMD_EXT4_WRITE=y
+# CONFIG_ISO_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_I2C=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_SYS_NS16550=y
-CONFIG_OF_LIBFDT=y
 # CONFIG_USE_PRIVATE_LIBGCC is not set
include/configs/ti816x_evm.h +14 -46

111 lines not on this page · raw message

Signature · 1 line
1.9.1
author
#11 lore raw

PATCH 6/7 ti816x: Modernize the defconfig

Quoted 9 lines · Tom Rini

- Switch to using <configs/ti_armv7_omap.h> and family. This lets us drop lots of custom defines.
- Ensure that our default environment uses DEFAULT_LINUX_BOOT_ENV so that Linux will boot correctly.
- Enable CONFIG_DISTRO_DEFAULTS
- Switch to using CONFIG_OF_CONTROL
- Various other cleanups to match other SoCs in the family line.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/fb6e816a/attachment.sig>
author
#12 lore raw

PATCH 7/7 t81xx: Migrate TI81XX/TI816X/TI814X symbols to Kconfig

In reply to Tom Rini

The symbol CONFIG_TI81XX is used for the parts that are common to the TI816x and TI814x SoCs and are not part of CONFIG_ARCH_OMAP2PLUS nor CONFIG_AM33XX. It however has so few uses that we can just modify the code to check for both and drop the symbol. The symbols CONFIG_TI816X and CONFIG_TI814X are for the repective SoCs.

---
 arch/arm/include/asm/arch-am33xx/clock.h |  2 +-
 arch/arm/include/asm/arch-am33xx/omap.h  |  2 +-
 arch/arm/mach-omap2/Kconfig              | 20 ++++++++++++++------
 arch/arm/mach-omap2/am33xx/Kconfig       | 20 ++++++++++++++++++++
 configs/ti814x_evm_defconfig             |  1 +
 configs/ti816x_evm_defconfig             |  1 +
 include/configs/ti814x_evm.h             |  3 ---
 include/configs/ti816x_evm.h             |  3 ---
 scripts/config_whitelist.txt             |  3 ---
 9 files changed, 38 insertions(+), 17 deletions(-)
arch/arm/include/asm/arch-am33xx/clock.h +1 -1
index 19ccf5c8dbb1..5399bb81f0bb 100644
@@ -14,7 +14,7 @@
 #include <asm/arch/clocks_am33xx.h>
 #include <asm/arch/hardware.h>
 
-#ifdef CONFIG_TI81XX
+#if defined(CONFIG_TI816X) || defined(CONFIG_TI814X)
 #include <asm/arch/clock_ti81xx.h>
 #endif
 
arch/arm/include/asm/arch-am33xx/omap.h +1 -1
index 3293caaca4ab..0dafb9e3270a 100644
@@ -21,7 +21,7 @@
 #define NON_SECURE_SRAM_START	0x402F0400
 #define NON_SECURE_SRAM_END	0x40310000
 #define NON_SECURE_SRAM_IMG_END	0x4030B800
-#elif defined(CONFIG_TI81XX)
+#elif defined(CONFIG_TI816X) || defined(CONFIG_TI814X)
 #define NON_SECURE_SRAM_START	0x40300000
 #define NON_SECURE_SRAM_END	0x40320000
 #define NON_SECURE_SRAM_IMG_END	0x4031B800
arch/arm/mach-omap2/Kconfig +14 -6
index 408b62c663af..d161b5194640 100644
@@ -54,12 +54,6 @@ config TARGET_RUT
 	select DM_SERIAL
 	select DM_GPIO
 
-config TARGET_TI814X_EVM
-	bool "Support ti814x_evm"
-
-config TARGET_TI816X_EVM
-	bool "Support ti816x_evm"
-
 config OMAP34XX
 	bool "OMAP34XX SoC"
 	select ARM_ERRATA_430973
@@ -116,6 +110,20 @@ config OMAP54XX
 	imply SPL_POWER_SUPPORT
 	imply SPL_SERIAL_SUPPORT
 
+config TI814X
+	bool "TI814X SoC"
+	help
+	  Support for AM335x SOC from Texas Instruments.
+	  The AM335x high performance SOC features a Cortex-A8
+	  ARM core and more.
+
+config TI816X
+	bool "TI816X SoC"
+	help
+	  Support for AM335x SOC from Texas Instruments.
+	  The AM335x high performance SOC features a Cortex-A8
+	  ARM core and more.
+
 config AM43XX
 	bool "AM43XX SoC"
 	imply SPL_DM
arch/arm/mach-omap2/am33xx/Kconfig +20 -0
index 5c4168fefc08..36ec13414098 100644
@@ -1,3 +1,23 @@
+if TI816X
+
+config TARGET_TI816X_EVM
+	bool "Support ti816x_evm"
+	help
+	  This option specifies support for the TI8168 EVM development platform
+	  with PG2.0 silicon and DDR3 DRAM.
+
+endif
+
+if TI814X
+
+config TARGET_TI814X_EVM
+	bool "Support ti814x_evm"
+	help
+	  This option specifies support for the TI8148
+	  EVM development platform.
+
+endif
+
 if AM33XX
 
 config AM33XX_CHILISOM
configs/ti814x_evm_defconfig +1 -0
index a72c7642f601..1b127b860926 100644
@@ -3,6 +3,7 @@ CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_TI814X=y
 CONFIG_TARGET_TI814X_EVM=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
configs/ti816x_evm_defconfig +1 -0
index 729b709df900..1c6608218b00 100644
@@ -3,6 +3,7 @@ CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_TI816X=y
 CONFIG_TARGET_TI816X_EVM=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
include/configs/ti814x_evm.h +0 -3
index 60322b1938af..068771b6dbd9 100644
@@ -16,9 +16,6 @@
 #ifndef __CONFIG_TI814X_EVM_H
 #define __CONFIG_TI814X_EVM_H
 
-#define CONFIG_TI81XX
-#define CONFIG_TI814X
-
 #include <asm/arch/omap.h>
 
 #define CONFIG_ENV_SIZE			(128 << 10)	/* 128 KiB */
include/configs/ti816x_evm.h +0 -3
index 27c6479ccc29..defcad451880 100644
@@ -10,9 +10,6 @@
 #ifndef __CONFIG_TI816X_EVM_H
 #define __CONFIG_TI816X_EVM_H
 
-#define CONFIG_TI81XX
-#define CONFIG_TI816X
-
 #include <configs/ti_armv7_omap.h>
 #include <asm/arch/omap.h>
 
scripts/config_whitelist.txt +0 -3
index 8d56daebedd0..04874a54807e 100644
@@ -6111,9 +6111,6 @@ CONFIG_TFTP_TSIZE
 CONFIG_THOR_RESET_OFF
 CONFIG_THUMB2_KERNEL
 CONFIG_THUNDERX
-CONFIG_TI814X
-CONFIG_TI816X
-CONFIG_TI81XX
 CONFIG_TIMESTAMP
 CONFIG_TIZEN
 CONFIG_TI_KEYSTONE_SERDES
Signature · 1 line
1.9.1
author
#13 lore raw

PATCH 7/7 t81xx: Migrate TI81XX/TI816X/TI814X symbols to Kconfig

Quoted 7 lines · Tom Rini

The symbol CONFIG_TI81XX is used for the parts that are common to the TI816x and TI814x SoCs and are not part of CONFIG_ARCH_OMAP2PLUS nor CONFIG_AM33XX. It however has so few uses that we can just modify the code to check for both and drop the symbol. The symbols CONFIG_TI816X and CONFIG_TI814X are for the repective SoCs.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/e4aeef73/attachment.sig>