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 6A178C4332F for ; Fri, 2 Dec 2022 21:48:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3C9F6853E9; Fri, 2 Dec 2022 22:44:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="OCbyiDrq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AB3C2851CC; Fri, 2 Dec 2022 22:43:29 +0100 (CET) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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 440FC84567 for ; Fri, 2 Dec 2022 22:43:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-ed1-x534.google.com with SMTP id x2so8171950edd.2 for ; Fri, 02 Dec 2022 13:43:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=TAVnNxYTc2E8zG6nePyXSXihqK0jmKl2YVYLXzdgi84=; b=OCbyiDrq0NeIu8FYR9RRlJiA4Yath9JY6+YUhh/0JNb+XYdrDvC5hrSp7HPb76MOIl MyMWfSWbPsGJlIbSuMbkV9l320tcMiAw3tKyK9ergi8j2snv28KSIcjARNlq7jjzSMlr am2gVKCtifXd1gfaVSSIoDsy78pVL04C0UEXw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TAVnNxYTc2E8zG6nePyXSXihqK0jmKl2YVYLXzdgi84=; b=Hfg9tmKbnqTjJEd0KJY+tPj/Xy5O3STcmfBxEwanUD6Y+O3gXq608fgoYaspcHJRz1 kmoyp2bJ7dxO9yi9kDKyFHlrbsNb1A4w2PkzcDmWC5BbcJP2mJYqBP2cruzXodS/38no FDiUqhH7BsgAtmp3mpH+oWkZjj2b2Td8vwopWpJ4laae/WybMNEX64OZTONjrpyi7Ho4 ddWRzJizg0jER/lh3hVsuyGUj9SyX39icNJkPpWsg2zvJDMWB331AdCgpO5p1TchpkTm c6lR46FmqO6oEbbz/sKn4SXDnD3o9KNa4NljFS8NFNEfUXJPQ4pfUMdGf1lUoxsmmP3h LsQQ== X-Gm-Message-State: ANoB5pmEE40FqQW6OpMUMThHen78ccDxYPDTc3hcB3dWvSKnFFyy0lRM pHdnAwVtgfSION5kMFedmyAwOyykiGS2WxKa X-Google-Smtp-Source: AA0mqf7vgMrLzJnizC9ib61TAcqetnvdMdyzL8Osv4p5F/AIZe3sUZW0vJnQGnLaUUygHYYDnpDOYA== X-Received: by 2002:a05:6402:360b:b0:468:f365:dca with SMTP id el11-20020a056402360b00b00468f3650dcamr29074308edb.41.1670017402719; Fri, 02 Dec 2022 13:43:22 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b00-6400-f99b-6f1a-2cc1-7368.res6.spectrum.com. [2603:6081:7b00:6400:f99b:6f1a:2cc1:7368]) by smtp.gmail.com with ESMTPSA id b23-20020a1709062b5700b007c0991735c0sm3434248ejg.79.2022.12.02.13.43.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 13:43:22 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 26/41] Convert CONFIG_MONITOR_IS_IN_RAM to Kconfig Date: Fri, 2 Dec 2022 16:42:36 -0500 Message-Id: <20221202214251.3027264-26-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221202214251.3027264-1-trini@konsulko.com> References: <20221127152536.1556469-41-trini@konsulko.com> <20221202214251.3027264-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.6 at phobos.denx.de X-Virus-Status: Clean This converts the following to Kconfig: CONFIG_MONITOR_IS_IN_RAM As part of this, reword some of the documentation slightly to reflect that this is in Kconfig and not a define now. Signed-off-by: Tom Rini --- arch/Kconfig | 4 ++++ board/cobra5272/README | 27 +++++++++------------------ configs/10m50_defconfig | 1 + configs/3c120_defconfig | 1 + doc/arch/m68k.rst | 4 ++-- include/configs/10m50_devboard.h | 1 - include/configs/3c120_devboard.h | 1 - include/configs/M5249EVB.h | 2 -- include/configs/M5272C3.h | 2 -- include/configs/M5282EVB.h | 2 -- include/configs/astro_mcf5373l.h | 25 ------------------------- include/configs/cobra5272.h | 21 --------------------- include/configs/eb_cpu5282.h | 2 -- 13 files changed, 17 insertions(+), 76 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index b074cc6c51eb..026d6b5ad789 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -380,6 +380,10 @@ config SYS_IMMR Address for the Internal Memory-Mapped Registers (IMMR) window used to configure the features of many Freescale / NXP SoCs. +config MONITOR_IS_IN_RAM + bool "U-Boot is loaded in to RAM by a pre-loader" + depends on M68K || NIOS2 + config SKIP_LOWLEVEL_INIT bool "Skip the calls to certain low level initialization functions" depends on ARM || MIPS || RISCV diff --git a/board/cobra5272/README b/board/cobra5272/README index ac62e557a075..11abcfacdb6e 100644 --- a/board/cobra5272/README +++ b/board/cobra5272/README @@ -77,21 +77,16 @@ in dir ./u-boot-x-x-x/ please first check: - in ./include/configs/cobra5272.h + in ./configs/cobra5272_defconfig - CONFIG_MONITOR_IS_IN_RAM has to be undefined, e. g. as follows: - - #if 0 - #define CONFIG_MONITOR_IS_IN_RAM - /* define if monitor is started from a pre-loader */ - #endif + CONFIG_MONITOR_IS_IN_RAM has to be not present in the file => u-boot as single bootloader starting from flash - in board/cobra5272/config.mk CONFIG_TEXT_BASE should be + in configs/cobra5272_defconfig CONFIG_TEXT_BASE should be - CONFIG_TEXT_BASE = 0xffe00000 + CONFIG_TEXT_BASE=0xffe00000 => linking address for u-boot as single bootloader stored in flash @@ -115,22 +110,18 @@ in dir ./u-boot-x-x-x/ host> make distclean please modify the settings: + in ./configs/cobra5272_defconfig - in ./include/configs/cobra5272.h - - CONFIG_MONITOR_IS_IN_RAM now has to be defined, e. g. as follows: + CONFIG_MONITOR_IS_IN_RAM now has to be enabled, e. g. as follows: - #if 1 - #define CONFIG_MONITOR_IS_IN_RAM - /*define if monitor is started from a pre-loader */ - #endif + CONFIG_MONITOR_IS_IN_RAM=y => u-boot as RAM version, chainloaded by another bootloader or using bdm cable - in board/cobra5272/config.mk CONFIG_TEXT_BASE should be + in configs/cobra5272_defconfig CONFIG_TEXT_BASE should be - CONFIG_TEXT_BASE = 0x00020000 + CONFIG_TEXT_BASE=0x00020000 => target linking address for RAM diff --git a/configs/10m50_defconfig b/configs/10m50_defconfig index 28966e0d0a41..7dc9d2ed27be 100644 --- a/configs/10m50_defconfig +++ b/configs/10m50_defconfig @@ -1,5 +1,6 @@ CONFIG_NIOS2=y CONFIG_SYS_CONFIG_NAME="10m50_devboard" +CONFIG_MONITOR_IS_IN_RAM=y CONFIG_SYS_MALLOC_LEN=0x20000 CONFIG_SYS_MALLOC_F_LEN=0x400 CONFIG_NR_DRAM_BANKS=1 diff --git a/configs/3c120_defconfig b/configs/3c120_defconfig index 8c421f099be8..46dfaf827ac2 100644 --- a/configs/3c120_defconfig +++ b/configs/3c120_defconfig @@ -1,5 +1,6 @@ CONFIG_NIOS2=y CONFIG_SYS_CONFIG_NAME="3c120_devboard" +CONFIG_MONITOR_IS_IN_RAM=y CONFIG_SYS_MALLOC_LEN=0x20000 CONFIG_SYS_MALLOC_F_LEN=0x400 CONFIG_NR_DRAM_BANKS=1 diff --git a/doc/arch/m68k.rst b/doc/arch/m68k.rst index 770327fea21a..a9180fd7850b 100644 --- a/doc/arch/m68k.rst +++ b/doc/arch/m68k.rst @@ -93,10 +93,10 @@ Configuration to use a pre-loader ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If U-Boot should be loaded to RAM and started by a pre-loader -CONFIG_MONITOR_IS_IN_RAM must be defined. If it is defined the +CONFIG_MONITOR_IS_IN_RAM must be enabled. If it is enabled the initial vector table and basic processor initialization will not be compiled in. The start address of U-Boot must be adjusted in -the boards config header file (CONFIG_SYS_MONITOR_BASE) and Makefile +the boards defconfig file (CONFIG_SYS_MONITOR_BASE) and Makefile (CONFIG_TEXT_BASE) to the load address. ColdFire CPU specific options/settings diff --git a/include/configs/10m50_devboard.h b/include/configs/10m50_devboard.h index 3a4fbc6eab83..b898ec0cc3e3 100644 --- a/include/configs/10m50_devboard.h +++ b/include/configs/10m50_devboard.h @@ -32,6 +32,5 @@ */ #define CFG_SYS_SDRAM_BASE 0xc8000000 #define CFG_SYS_SDRAM_SIZE 0x08000000 -#define CONFIG_MONITOR_IS_IN_RAM #endif /* __CONFIG_H */ diff --git a/include/configs/3c120_devboard.h b/include/configs/3c120_devboard.h index ab889180eede..e67338c202c9 100644 --- a/include/configs/3c120_devboard.h +++ b/include/configs/3c120_devboard.h @@ -28,6 +28,5 @@ */ #define CFG_SYS_SDRAM_BASE 0xD0000000 #define CFG_SYS_SDRAM_SIZE 0x08000000 -#define CONFIG_MONITOR_IS_IN_RAM #endif /* __CONFIG_H */ diff --git a/include/configs/M5249EVB.h b/include/configs/M5249EVB.h index 0e38eeb4a365..c71130909fca 100644 --- a/include/configs/M5249EVB.h +++ b/include/configs/M5249EVB.h @@ -20,8 +20,6 @@ #define CFG_SYS_UART_PORT (0) -#undef CONFIG_MONITOR_IS_IN_RAM /* no pre-loader required!!! ;-) */ - /* * Clock configuration: enable only one of the following options */ diff --git a/include/configs/M5272C3.h b/include/configs/M5272C3.h index c58d19c810f4..6aae584afda9 100644 --- a/include/configs/M5272C3.h +++ b/include/configs/M5272C3.h @@ -19,8 +19,6 @@ #define CFG_SYS_UART_PORT (0) -#undef CONFIG_MONITOR_IS_IN_RAM /* define if monitor is started from a pre-loader */ - /* Configuration for environment * Environment is embedded in u-boot in the second sector of the flash */ diff --git a/include/configs/M5282EVB.h b/include/configs/M5282EVB.h index e23439fd7820..7cfe7a2da3e3 100644 --- a/include/configs/M5282EVB.h +++ b/include/configs/M5282EVB.h @@ -19,8 +19,6 @@ #define CFG_SYS_UART_PORT (0) -#undef CONFIG_MONITOR_IS_IN_RAM /* define if monitor is started from a pre-loader */ - /* Configuration for environment * Environment is embedded in u-boot in the second sector of the flash */ diff --git a/include/configs/astro_mcf5373l.h b/include/configs/astro_mcf5373l.h index 62aa99342a0e..6aef3bd86f74 100644 --- a/include/configs/astro_mcf5373l.h +++ b/include/configs/astro_mcf5373l.h @@ -38,16 +38,6 @@ #error No card type defined! #endif -/* - * CONFIG_RAM defines if u-boot is loaded via BDM (or started from - * a different bootloader that has already performed RAM setup) or - * started directly from flash, which is the regular case for production - * boards. - */ -#ifdef CONFIG_RAM -#define CONFIG_MONITOR_IS_IN_RAM -#endif - /* I2C */ /* @@ -69,21 +59,6 @@ #define CFG_SYS_UART_PORT (2) #define CFG_SYS_UART2_ALT3_GPIO -/* - * Configuration for environment - * Environment is located in the last sector of the flash - */ - -#ifndef CONFIG_MONITOR_IS_IN_RAM -#else -/* - * environment in RAM - This is used to use a single PC-based application - * to load an image, load U-Boot, load an environment and then start U-Boot - * to execute the commands from the environment. Feedback is done via setting - * and reading memory locations. - */ -#endif - /* here we put our FPGA configuration... */ /* Define user parameters that have to be customized most likely */ diff --git a/include/configs/cobra5272.h b/include/configs/cobra5272.h index 8c83c3ac06a5..cd50ffe98d0d 100644 --- a/include/configs/cobra5272.h +++ b/include/configs/cobra5272.h @@ -42,27 +42,6 @@ #define CFG_SYS_UART_PORT (0) -/* --- - * CONFIG_MONITOR_IS_IN_RAM defines if u-boot is started from a different - * bootloader residing in flash ('chainloading'); if you want to use - * chainloading or want to compile a u-boot binary that can be loaded into - * RAM via BDM set - * "#if 0" to "#if 1" - * You will need a first stage bootloader then, e. g. colilo or a working BDM - * cable (Background Debug Mode) - * - * Setting #if 0: u-boot will start from flash and relocate itself to RAM - * - * Please do not forget to modify the setting of CONFIG_TEXT_BASE - * in board/cobra5272/config.mk accordingly (#if 0: 0xffe00000; #if 1: 0x20000) - * - * --- - */ - -#if 0 -#define CONFIG_MONITOR_IS_IN_RAM /* monitor is started from a preloader */ -#endif - /* --- * Configuration for environment * Environment is embedded in u-boot in the second sector of the flash diff --git a/include/configs/eb_cpu5282.h b/include/configs/eb_cpu5282.h index 029f13dad36f..b267b74b1595 100644 --- a/include/configs/eb_cpu5282.h +++ b/include/configs/eb_cpu5282.h @@ -14,8 +14,6 @@ #define CFG_SYS_UART_PORT (0) -#undef CONFIG_MONITOR_IS_IN_RAM /* starts uboot direct */ - /*----------------------------------------------------------------------* * Options * *----------------------------------------------------------------------*/ -- 2.25.1