From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Cc: Linus Walleij <linus.walleij@linaro.org>,
Andre Przywara <andre.przywara@arm.com>
Subject: [PATCH 05/25] arm: integrator: Migrate platform-specific options and cleanup armcoremodule.h
Date: Wed, 30 Mar 2022 18:07:15 -0400 [thread overview]
Message-ID: <20220330220735.908616-5-trini@konsulko.com> (raw)
In-Reply-To: <20220330220735.908616-1-trini@konsulko.com>
This converts the following to Kconfig:
CONFIG_CM_INIT
CONFIG_CM_REMAP
CONFIG_CM_SPD_DETECT
CONFIG_CM_MULTIPLE_SSRAM
CONFIG_CM_TCRAM
We make the first three of these options be always enabled, as that
matches usage. We select the last two based on how they were defined in
armcoremodule.h. This also allows us to remove some unused code in
board/armltd/integrator/lowlevel_init.S
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
arch/arm/mach-integrator/Kconfig | 19 +++++++++++++
board/armltd/integrator/integrator.c | 1 +
board/armltd/integrator/lowlevel_init.S | 7 +----
include/armcoremodule.h | 36 -------------------------
include/configs/integrator-common.h | 27 -------------------
include/configs/integratorap.h | 9 -------
6 files changed, 21 insertions(+), 78 deletions(-)
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig
index d506ee5b39cd..4b5a50717a55 100644
--- a/arch/arm/mach-integrator/Kconfig
+++ b/arch/arm/mach-integrator/Kconfig
@@ -32,14 +32,18 @@ config CM920T
config CM926EJ_S
bool "Core Module for ARM926EJ-STM"
select CPU_ARM926EJS
+ select CM_TCRAM
config CM946ES
bool "Core Module for ARM946E-STM"
select CPU_ARM946ES
+ select CM_MULTIPLE_SSRAM
+ select CM_TCRAM
config CM1136
bool "Core Module for ARM1136JF-STM"
select CPU_ARM1136
+ select CM_TCRAM
endchoice
@@ -56,4 +60,19 @@ config SYS_CONFIG_NAME
config SYS_MALLOC_F_LEN
default 0x2000
+config CM_INIT
+ def_bool y
+
+config CM_REMAP
+ def_bool y
+
+config CM_SPD_DETECT
+ def_bool y
+
+config CM_MULTIPLE_SSRAM
+ bool
+
+config CM_TCRAM
+ bool
+
endmenu
diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c
index 388795809dfd..e734ceae8890 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -24,6 +24,7 @@
#include <init.h>
#include <net.h>
#include <netdev.h>
+#include <armcoremodule.h>
#include <asm/global_data.h>
#include <asm/io.h>
#include <dm/platform_data/serial_pl01x.h>
diff --git a/board/armltd/integrator/lowlevel_init.S b/board/armltd/integrator/lowlevel_init.S
index 1a1cb580be63..ea5b654ed527 100644
--- a/board/armltd/integrator/lowlevel_init.S
+++ b/board/armltd/integrator/lowlevel_init.S
@@ -7,6 +7,7 @@
*/
#include <config.h>
+#include <armcoremodule.h>
/* Reset using CM control register */
.global reset_cpu
@@ -41,10 +42,6 @@ lowlevel_init:
/* set the desired CM specific value */
mov r2,#CMMASK_LOWVEC /* Vectors at 0x00000000 for all */
-#if defined (CONFIG_CM10200E) || defined (CONFIG_CM10220E)
- orr r2,r2,#CMMASK_INIT_102
-#else
-
#if !defined (CONFIG_CM920T) && !defined (CONFIG_CM920T_ETM) && \
!defined (CONFIG_CM940T)
@@ -69,8 +66,6 @@ lowlevel_init:
#endif /* CMxx6 code */
-#endif /* ARM102xxE value */
-
/* read CM_INIT */
mov r0, #CM_BASE
ldr r1, [r0, #OS_INIT]
diff --git a/include/armcoremodule.h b/include/armcoremodule.h
index 613b88427026..ee839c886da1 100644
--- a/include/armcoremodule.h
+++ b/include/armcoremodule.h
@@ -34,42 +34,6 @@
/* CM926EJ-S */
/* CM1136-EJ-S */
-#if defined (CONFIG_CM10200E) || defined (CONFIG_CM10220E)
-#define CMMASK_INIT_102 0x00000300 /* see CM102xx ref manual */
- /* - PLL test clock bypassed */
- /* - bus clock ratio 2 */
- /* - little endian */
- /* - vectors at zero */
-#endif /* CM1022xx */
-
-/* Determine CM characteristics */
-
-#undef CONFIG_CM_MULTIPLE_SSRAM
-#undef CONFIG_CM_SPD_DETECT
-#undef CONFIG_CM_REMAP
-#undef CONFIG_CM_INIT
-#undef CONFIG_CM_TCRAM
-
-#if defined (CONFIG_CM946E_S) || defined (CONFIG_CM966E_S)
-#define CONFIG_CM_MULTIPLE_SSRAM /* CM has multiple SSRAM mapping */
-#endif
-
-/* Excalibur core module has reduced functionality */
-#ifndef CONFIG_CM922T_XA10
-#define CONFIG_CM_SPD_DETECT /* CM supports SPD query */
-#define OS_SPD 0x00000100 /* Address of SPD data */
-#define CONFIG_CM_REMAP /* CM supports remapping */
-#define CONFIG_CM_INIT /* CM has initialization reg */
-#endif /* NOT EXCALIBUR */
-
-#if defined(CONFIG_CM926EJ_S) || defined (CONFIG_CM946E_S) || \
- defined(CONFIG_CM966E_S) || defined (CONFIG_CM1026EJ_S) || \
- defined(CONFIG_CM1136JF_S)
-#define CONFIG_CM_TCRAM /* CM has TCRAM */
-#endif
-
-#ifdef CONFIG_CM_SPD_DETECT
#define OS_SPD 0x00000100 /* The SDRAM SPD data is copied here */
-#endif
#endif /* __ARMCOREMODULE_H */
diff --git a/include/configs/integrator-common.h b/include/configs/integrator-common.h
index 48d522550ed3..d578b0246051 100644
--- a/include/configs/integrator-common.h
+++ b/include/configs/integrator-common.h
@@ -8,33 +8,6 @@
#define CONFIG_SYS_TIMERBASE 0x13000100 /* Timer1 */
-/*
- * There are various dependencies on the core module (CM) fitted
- * Users should refer to their CM user guide
- */
-#include "armcoremodule.h"
-
-/*
- * Initialize and remap the core module, use SPD to detect memory size
- * If CONFIG_SKIP_LOWLEVEL_INIT is not defined &
- * the core module has a CM_INIT register
- * then the U-Boot initialisation code will
- * e.g. ARM Boot Monitor or pre-loader is repeated once
- * (to re-initialise any existing CM_INIT settings to safe values).
- *
- * This is usually not the desired behaviour since the platform
- * will either reboot into the ARM monitor (or pre-loader)
- * or continuously cycle thru it without U-Boot running,
- * depending upon the setting of Integrator/CP switch S2-4.
- *
- * However it may be needed if Integrator/CP switch S2-1
- * is set OFF to boot direct into U-Boot.
- * In that case comment out the line below.
- */
-#define CONFIG_CM_INIT
-#define CONFIG_CM_REMAP
-#define CONFIG_CM_SPD_DETECT
-
/*
* The ARM boot monitor initializes the board.
* However, the default U-Boot code also performs the initialization.
diff --git a/include/configs/integratorap.h b/include/configs/integratorap.h
index f15a4d572587..49f07e997d83 100644
--- a/include/configs/integratorap.h
+++ b/include/configs/integratorap.h
@@ -27,13 +27,4 @@
* PCI definitions
*/
-/*-----------------------------------------------------------------------
- * There are various dependencies on the core module (CM) fitted
- * Users should refer to their CM user guide
- * - when porting adjust u-boot/Makefile accordingly
- * to define the necessary CONFIG_ s for the CM involved
- * see e.g. integratorcp_CM926EJ-S_config
- */
-#include "armcoremodule.h"
-
#endif /* __CONFIG_H */
--
2.25.1
next prev parent reply other threads:[~2022-03-30 22:07 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 22:07 [PATCH 01/25] Convert CONFIG_BOARD_SIZE_LIMIT to Kconfig Tom Rini
2022-03-30 22:07 ` [PATCH 02/25] mvebu: Move BOOTROM_ERR_REG out of CONFIG namespace Tom Rini
2022-03-31 8:58 ` Stefan Roese
2022-04-08 18:02 ` Tom Rini
2022-03-30 22:07 ` [PATCH 03/25] tegra: Migrate CI_UDC_HAS_HOSTPC to Kconfig Tom Rini
2022-04-01 16:21 ` Peter Robinson
2022-04-08 18:02 ` Tom Rini
2022-03-30 22:07 ` [PATCH 04/25] Convert CONFIG_CMDLINE_PS_SUPPORT " Tom Rini
2022-04-08 18:02 ` Tom Rini
2022-03-30 22:07 ` Tom Rini [this message]
2022-04-08 18:02 ` [PATCH 05/25] arm: integrator: Migrate platform-specific options and cleanup armcoremodule.h Tom Rini
2022-03-30 22:07 ` [PATCH 06/25] s5p_goni, smdkc100: Move some environment settings out of CONFIG Tom Rini
2022-04-04 4:19 ` Minkyu Kang
2022-04-08 18:02 ` Tom Rini
2022-04-22 12:04 ` Jaehoon Chung
2022-03-30 22:07 ` [PATCH 07/25] MPC837XERDB: Stop using CONFIG_RAMDISKFILE Tom Rini
2022-04-08 18:03 ` Tom Rini
2022-03-30 22:07 ` [PATCH 08/25] corvus: Migrate CONFIG_*_LED out of CONFIG namespace Tom Rini
2022-03-31 4:19 ` Heiko Schocher
2022-04-08 18:03 ` Tom Rini
2022-03-30 22:07 ` [PATCH 09/25] stm32f429-discovery: " Tom Rini
2022-03-31 7:20 ` Patrice CHOTARD
2022-04-08 18:03 ` Tom Rini
2022-03-30 22:07 ` [PATCH 10/25] at91: Remove unused LED code Tom Rini
2022-04-08 18:03 ` Tom Rini
2022-03-30 22:07 ` [PATCH 11/25] Convert CONFIG_CONS_SCIF0 et al to Kconfig Tom Rini
2022-04-08 18:03 ` Tom Rini
2022-03-30 22:07 ` [PATCH 12/25] Convert CONFIG_SH_SCIF_CLK_FREQ " Tom Rini
2022-04-08 18:03 ` Tom Rini
2022-03-30 22:07 ` [PATCH 13/25] spi: cadence_qspi: Migrate CONFIG_CQSPI_REF_CLK " Tom Rini
2022-03-31 16:30 ` Pratyush Yadav
2022-03-31 17:41 ` Tom Rini
2022-03-31 18:54 ` Pratyush Yadav
2022-03-31 19:35 ` [v2 " Tom Rini
2022-03-31 19:43 ` Pratyush Yadav
2022-04-08 14:47 ` Tom Rini
2022-04-11 19:05 ` Pratyush Yadav
2022-04-11 19:30 ` Tom Rini
2022-04-08 18:05 ` [PATCH " Tom Rini
2022-03-30 22:07 ` [PATCH 14/25] controlcenterdc: Migrate CUSTOMER_BOARD_SUPPORT " Tom Rini
2022-03-31 9:00 ` Stefan Roese
2022-04-08 18:03 ` Tom Rini
2022-03-30 22:07 ` [PATCH 15/25] tegra: Drop CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS Tom Rini
2022-04-08 18:03 ` Tom Rini
2022-03-30 22:07 ` [PATCH 16/25] microblaze: Migrate DCACHE/ICACHE to Kconfig Tom Rini
2022-03-31 5:42 ` Michal Simek
2022-04-08 18:03 ` Tom Rini
2022-03-30 22:07 ` [PATCH 17/25] ls1021atwr: Use DEBUG and not CONFIG_DEBUG Tom Rini
2022-04-08 18:03 ` Tom Rini
2022-03-30 22:07 ` [PATCH 18/25] nds32: Migrate CONFIG_DEBUG_LED to Kconfig Tom Rini
2022-04-08 18:03 ` Tom Rini
2022-03-30 22:07 ` [PATCH 19/25] powerpc: mpc83xx: Migrate DEFAULT_IMMR " Tom Rini
2022-04-08 18:04 ` Tom Rini
2022-03-30 22:07 ` [PATCH 20/25] galileo: Remove CONFIG_DESIGNWARE_ETH reference Tom Rini
2022-04-08 18:04 ` Tom Rini
2022-03-30 22:07 ` [PATCH 21/25] Convert CONFIG_DIMM_SLOTS_PER_CTLR to Kconfig Tom Rini
2022-04-08 18:04 ` Tom Rini
2022-03-30 22:07 ` [PATCH 22/25] Convert CONFIG_FSL_QIXIS et al " Tom Rini
2022-04-08 18:04 ` Tom Rini
2022-03-30 22:07 ` [PATCH 23/25] m53menlo: Drop CONFIG_DISCOVER_PHY Tom Rini
2022-04-08 18:04 ` Tom Rini
2022-03-30 22:07 ` [PATCH 24/25] siemens-am33x-common: Drop CONFIG_DMA_COHERENT* Tom Rini
2022-04-08 18:04 ` Tom Rini
2022-03-30 22:07 ` [PATCH 25/25] arm: fsl-layerscape: Migrate more DP-DDR options to Kconfig Tom Rini
2022-04-08 18:04 ` Tom Rini
2022-04-08 18:02 ` [PATCH 01/25] Convert CONFIG_BOARD_SIZE_LIMIT " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220330220735.908616-5-trini@konsulko.com \
--to=trini@konsulko.com \
--cc=andre.przywara@arm.com \
--cc=linus.walleij@linaro.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox