From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 994C5C433F5 for ; Wed, 30 Mar 2022 22:07:53 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4B7BA8419B; Thu, 31 Mar 2022 00:07:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 6D8F984195; Thu, 31 Mar 2022 00:07:49 +0200 (CEST) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6CB1284158 for ; Thu, 31 Mar 2022 00:07:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tom.rini@gmail.com Received: by mail-qv1-f47.google.com with SMTP id f3so18149669qvz.10 for ; Wed, 30 Mar 2022 15:07:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=p3c55adDUGLSSx5ttQPxdD4DPGOg3IsaEQxdUBl7cz4=; b=I6VUyfO0YxkGVJ3xjj+aKtBXOrqgq82idGxPYCDXD+AvvcdsRZTQi/1q0aDi5lx0cx Xr44CNZ9LVxP7GoiTSDDZsrQDEmLUWyPij3d2px9yT1sALxf84iENvs2spgDl4E3rT/+ 7v9FllI2uM6+RZe3et7Eiwven1C2Jz/6BQpEB5S3fnM6yx/0dvjtsUPMgiRVE+T5DIc2 wya/2NkSyUnfOp9UlIRI+Q0KcsEbzH3S9hcHqDCVZLtjdeQ+7iOZdJIOfQEEifzN2QjD FGyixzr5ZxkF+WNaslRHAvUe+6/an4N7AUy1S79hdfb3e0xn5netOVh/nX5SAMepkJbv bV0g== X-Gm-Message-State: AOAM531ZHaUVluZvgEDxpvLmPUsA1l66S2ADoxU7pd81yt1rQ8ppceiZ d6L+UnpYSwpioGHokFupE6mYFIzVJA== X-Google-Smtp-Source: ABdhPJwaCDffJqaLoZqbVKBk/oMsUu5nigUTIaToHqaWk/d/ReY3p5u6kWpmCfT0x1Ng2k5KtMWC3Q== X-Received: by 2002:a0c:c784:0:b0:440:c2fe:33a3 with SMTP id k4-20020a0cc784000000b00440c2fe33a3mr1483278qvj.38.1648678062070; Wed, 30 Mar 2022 15:07:42 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id h2-20020ac85842000000b002e1ec550506sm17749694qth.87.2022.03.30.15.07.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 15:07:41 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Linus Walleij , Andre Przywara Subject: [PATCH 05/25] arm: integrator: Migrate platform-specific options and cleanup armcoremodule.h Date: Wed, 30 Mar 2022 18:07:15 -0400 Message-Id: <20220330220735.908616-5-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220330220735.908616-1-trini@konsulko.com> References: <20220330220735.908616-1-trini@konsulko.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean 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 Cc: Andre Przywara Signed-off-by: Tom Rini --- 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 #include #include +#include #include #include #include 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 +#include /* 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