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 5FA28C433F5 for ; Mon, 23 May 2022 19:14:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9AF7A8421D; Mon, 23 May 2022 21:14:14 +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 007038421D; Mon, 23 May 2022 21:14:08 +0200 (CEST) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (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 5BDB184021 for ; Mon, 23 May 2022 21:14:00 +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-qk1-f177.google.com with SMTP id i68so12286765qke.11 for ; Mon, 23 May 2022 12:14:00 -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:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X66vEw1QcFOHebEKxrxJsmC/Y+blyMfP/iXPpaksM5I=; b=3BH6I0hM1ev9NEPkqRygC/P8G/3Vxqcsv05K+OfyYwV/rAVLEigx57/QOvxug65jCg vh0Yl86NdIo8jUBpeKeyBnOAMHbfy8xo+3IXVu5ylKN//zRdPYT+jppqNDbz2e9tS9cd Bx555xp1fDBhZ6IMu4vfyAMRg7Mc5yajzXZMyLrw2PRhkQ4E23oal1qz4Dgd/PTjIIsf eN5GVwttak0GUU5oeHh/YhHH9/S/R4MHfGr9U34AakzVEfzpdkvtDFzh/okLcz8OCDU6 AhDoUEwFmGU/JxxalglNcKk+gClxwTq7hEAo5Rw6gbXvRf86Etr5lh6PK9uLN23jgcs9 0vyw== X-Gm-Message-State: AOAM533Kg7XUzIZuCTVTNeCepER6wjT36tepb2QBagW3yBmLkFyvQcff hsYxrmNLAc1DVfb4ka4WojeWgBLDBw== X-Google-Smtp-Source: ABdhPJzCXzacWbBmQDCV31lG8E0RAkWNL+ai0TCTGMRE/NGN6B8Gid8PlpqX9sLgUxQPt1f3uIMBJQ== X-Received: by 2002:a05:620a:38e:b0:6a3:4485:3596 with SMTP id q14-20020a05620a038e00b006a344853596mr11667061qkm.761.1653333238846; Mon, 23 May 2022 12:13:58 -0700 (PDT) Received: from localhost.localdomain (2603-6081-7b00-25fd-0000-0000-0000-1003.res6.spectrum.com. [2603:6081:7b00:25fd::1003]) by smtp.gmail.com with ESMTPSA id s63-20020ae9de42000000b006a2f5ea4a29sm4910662qkf.46.2022.05.23.12.13.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 12:13:58 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 2/4] Convert CONFIG_SPL_SYS_MALLOC_SIMPLE to Kconfig Date: Mon, 23 May 2022 15:13:51 -0400 Message-Id: <20220523191353.1419390-2-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220523191353.1419390-1-trini@konsulko.com> References: <20220523191353.1419390-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_SPL_SYS_MALLOC_SIMPLE The problem here is that a few platforms have been doing: #ifdef CONFIG_SPL_BUILD #define CONFIG_SYS_MALLOC_SIMPLE #endif instead of defining CONFIG_SPL_SYS_MALLOC_SIMPLE directly. Correct this and update the documentation in a few places to match usage. Signed-off-by: Tom Rini --- configs/clearfog_defconfig | 1 + configs/db-88f6720_defconfig | 1 + configs/db-88f6820-amc_defconfig | 1 + configs/db-88f6820-gp_defconfig | 1 + configs/db-mv784mp-gp_defconfig | 1 + configs/ds414_defconfig | 1 + configs/helios4_defconfig | 1 + configs/maxbcm_defconfig | 1 + configs/theadorable_debug_defconfig | 1 + configs/x530_defconfig | 1 + doc/develop/driver-model/design.rst | 2 +- drivers/core/Kconfig | 6 +++--- include/configs/clearfog.h | 4 ---- include/configs/controlcenterdc.h | 4 ---- include/configs/db-88f6720.h | 4 ---- include/configs/db-88f6820-amc.h | 4 ---- include/configs/db-88f6820-gp.h | 4 ---- include/configs/db-mv784mp-gp.h | 4 ---- include/configs/ds414.h | 4 ---- include/configs/helios4.h | 4 ---- include/configs/maxbcm.h | 4 ---- include/configs/theadorable.h | 4 ---- include/configs/x530.h | 4 ---- 23 files changed, 14 insertions(+), 48 deletions(-) diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig index c26ee5bfacac..7f4ecc3f3ee4 100644 --- a/configs/clearfog_defconfig +++ b/configs/clearfog_defconfig @@ -26,6 +26,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x22fd0 CONFIG_SPL_BSS_MAX_SIZE=0x4000 +CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_I2C=y CONFIG_SYS_MAXARGS=32 CONFIG_CMD_TLV_EEPROM=y diff --git a/configs/db-88f6720_defconfig b/configs/db-88f6720_defconfig index 8d48428c2257..5970e750a837 100644 --- a/configs/db-88f6720_defconfig +++ b/configs/db-88f6720_defconfig @@ -25,6 +25,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x1ffd0 CONFIG_SPL_BSS_MAX_SIZE=0x4000 +CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_I2C=y CONFIG_SYS_MAXARGS=32 CONFIG_CMD_I2C=y diff --git a/configs/db-88f6820-amc_defconfig b/configs/db-88f6820-amc_defconfig index 7a208ad819b1..aebc1f75fa62 100644 --- a/configs/db-88f6820-amc_defconfig +++ b/configs/db-88f6820-amc_defconfig @@ -26,6 +26,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x22fd0 CONFIG_SPL_BSS_MAX_SIZE=0x4000 +CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_I2C=y CONFIG_SYS_MAXARGS=96 # CONFIG_CMD_FLASH is not set diff --git a/configs/db-88f6820-gp_defconfig b/configs/db-88f6820-gp_defconfig index 339558545da5..934b36ae05f9 100644 --- a/configs/db-88f6820-gp_defconfig +++ b/configs/db-88f6820-gp_defconfig @@ -25,6 +25,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x22fd0 CONFIG_SPL_BSS_MAX_SIZE=0x4000 +CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_I2C=y CONFIG_SYS_MAXARGS=32 CONFIG_CMD_I2C=y diff --git a/configs/db-mv784mp-gp_defconfig b/configs/db-mv784mp-gp_defconfig index 22f76eba174c..b8444e1ab366 100644 --- a/configs/db-mv784mp-gp_defconfig +++ b/configs/db-mv784mp-gp_defconfig @@ -25,6 +25,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x1bfd0 CONFIG_SPL_BSS_MAX_SIZE=0x4000 +CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_I2C=y CONFIG_SYS_MAXARGS=32 # CONFIG_CMD_FLASH is not set diff --git a/configs/ds414_defconfig b/configs/ds414_defconfig index 8e1f69d636b2..7c25cce8ff5e 100644 --- a/configs/ds414_defconfig +++ b/configs/ds414_defconfig @@ -33,6 +33,7 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_MISC_INIT_R=y CONFIG_SPL_MAX_SIZE=0x1bfd0 CONFIG_SPL_BSS_MAX_SIZE=0x4000 +CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_I2C=y CONFIG_SYS_MAXARGS=32 # CONFIG_CMD_FLASH is not set diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig index 30d65acbee99..6988e9bf0d4d 100644 --- a/configs/helios4_defconfig +++ b/configs/helios4_defconfig @@ -26,6 +26,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x22fd0 CONFIG_SPL_BSS_MAX_SIZE=0x4000 +CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_I2C=y CONFIG_SYS_MAXARGS=32 CONFIG_CMD_TLV_EEPROM=y diff --git a/configs/maxbcm_defconfig b/configs/maxbcm_defconfig index 442af9cb3826..ba0e2089f559 100644 --- a/configs/maxbcm_defconfig +++ b/configs/maxbcm_defconfig @@ -24,6 +24,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x1bfd0 CONFIG_SPL_BSS_MAX_SIZE=0x4000 +CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_I2C=y CONFIG_SYS_MAXARGS=32 CONFIG_CMD_I2C=y diff --git a/configs/theadorable_debug_defconfig b/configs/theadorable_debug_defconfig index c5bd8909c914..b6444b244082 100644 --- a/configs/theadorable_debug_defconfig +++ b/configs/theadorable_debug_defconfig @@ -29,6 +29,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_MAX_SIZE=0x1bfd0 CONFIG_SPL_BSS_MAX_SIZE=0x4000 +CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_I2C=y CONFIG_HUSH_PARSER=y CONFIG_SYS_MAXARGS=32 diff --git a/configs/x530_defconfig b/configs/x530_defconfig index 67d082e883a3..73ea57891956 100644 --- a/configs/x530_defconfig +++ b/configs/x530_defconfig @@ -29,6 +29,7 @@ CONFIG_MISC_INIT_R=y CONFIG_SPL_MAX_SIZE=0x22fd0 CONFIG_SPL_BSS_MAX_SIZE=0x4000 CONFIG_SPL_BOARD_INIT=y +CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_WATCHDOG=y CONFIG_SYS_CBSIZE=256 CONFIG_SYS_PBSIZE=276 diff --git a/doc/develop/driver-model/design.rst b/doc/develop/driver-model/design.rst index 5f33f9fbb327..a75d637ec331 100644 --- a/doc/develop/driver-model/design.rst +++ b/doc/develop/driver-model/design.rst @@ -1135,7 +1135,7 @@ constrained systems. To enable driver model in SPL, define CONFIG_SPL_DM. You might want to consider the following option also. See the main README for more details. - - CONFIG_SYS_MALLOC_SIMPLE + - CONFIG_SPL_SYS_MALLOC_SIMPLE - CONFIG_DM_WARN - CONFIG_DM_DEVICE_REMOVE - CONFIG_DM_STDIO diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig index 408a8d8e28b1..27d6578772a1 100644 --- a/drivers/core/Kconfig +++ b/drivers/core/Kconfig @@ -15,7 +15,7 @@ config SPL_DM Enable driver model in SPL. You will need to provide a suitable malloc() implementation. If you are not using the full malloc() enabled by CONFIG_SYS_SPL_MALLOC_START, - consider using CONFIG_SYS_MALLOC_SIMPLE. In that case you + consider using CONFIG_SPL_SYS_MALLOC_SIMPLE. In that case you must provide CONFIG_SPL_SYS_MALLOC_F_LEN to set the size. In most cases driver model will only allocate a few uclasses and devices in SPL, so 1KB should be enable. See @@ -28,7 +28,7 @@ config TPL_DM Enable driver model in TPL. You will need to provide a suitable malloc() implementation. If you are not using the full malloc() enabled by CONFIG_SYS_SPL_MALLOC_START, - consider using CONFIG_SYS_MALLOC_SIMPLE. In that case you + consider using CONFIG_TPL_SYS_MALLOC_SIMPLE. In that case you must provide CONFIG_SPL_SYS_MALLOC_F_LEN to set the size. In most cases driver model will only allocate a few uclasses and devices in SPL, so 1KB should be enough. See @@ -43,7 +43,7 @@ config VPL_DM Enable driver model in VPL. You will need to provide a suitable malloc() implementation. If you are not using the full malloc() enabled by CONFIG_SYS_SPL_MALLOC_START, - consider using CONFIG_SYS_MALLOC_SIMPLE. + consider using CONFIG_SPL_SYS_MALLOC_SIMPLE. config DM_WARN bool "Enable warnings in driver model" diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h index 22f37495299f..b67a31981b07 100644 --- a/include/configs/clearfog.h +++ b/include/configs/clearfog.h @@ -47,10 +47,6 @@ #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + CONFIG_SPL_SIZE) -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_MALLOC_SIMPLE -#endif - #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) diff --git a/include/configs/controlcenterdc.h b/include/configs/controlcenterdc.h index 9fafa8fe35fc..08eb0dbbf954 100644 --- a/include/configs/controlcenterdc.h +++ b/include/configs/controlcenterdc.h @@ -39,10 +39,6 @@ #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + CONFIG_SPL_SIZE) -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_MALLOC_SIMPLE -#endif - #define CONFIG_SPL_STACK (0x40000000 + ((212 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) diff --git a/include/configs/db-88f6720.h b/include/configs/db-88f6720.h index f8d50d259654..89786044c834 100644 --- a/include/configs/db-88f6720.h +++ b/include/configs/db-88f6720.h @@ -37,10 +37,6 @@ #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + (128 << 10)) -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_MALLOC_SIMPLE -#endif - #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) diff --git a/include/configs/db-88f6820-amc.h b/include/configs/db-88f6820-amc.h index 06161e467025..56fd872272d9 100644 --- a/include/configs/db-88f6820-amc.h +++ b/include/configs/db-88f6820-amc.h @@ -44,10 +44,6 @@ #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + CONFIG_SPL_SIZE) -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_MALLOC_SIMPLE -#endif - #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h index 6294092f8746..0c42ef415da9 100644 --- a/include/configs/db-88f6820-gp.h +++ b/include/configs/db-88f6820-gp.h @@ -44,10 +44,6 @@ #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + CONFIG_SPL_SIZE) -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_MALLOC_SIMPLE -#endif - #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) diff --git a/include/configs/db-mv784mp-gp.h b/include/configs/db-mv784mp-gp.h index 14b307343ce7..4e0563dd5dae 100644 --- a/include/configs/db-mv784mp-gp.h +++ b/include/configs/db-mv784mp-gp.h @@ -56,10 +56,6 @@ #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + (128 << 10)) -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_MALLOC_SIMPLE -#endif - #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) diff --git a/include/configs/ds414.h b/include/configs/ds414.h index 94b4ebc39348..41f72eef4fcd 100644 --- a/include/configs/ds414.h +++ b/include/configs/ds414.h @@ -48,10 +48,6 @@ #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + (128 << 10)) -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_MALLOC_SIMPLE -#endif - #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) diff --git a/include/configs/helios4.h b/include/configs/helios4.h index 3a748ea3b893..aed4d7e8f536 100644 --- a/include/configs/helios4.h +++ b/include/configs/helios4.h @@ -47,10 +47,6 @@ #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + CONFIG_SPL_SIZE) -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_MALLOC_SIMPLE -#endif - #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) diff --git a/include/configs/maxbcm.h b/include/configs/maxbcm.h index a57946fb0f86..0eaf08e18c93 100644 --- a/include/configs/maxbcm.h +++ b/include/configs/maxbcm.h @@ -51,10 +51,6 @@ #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + (128 << 10)) -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_MALLOC_SIMPLE -#endif - #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) diff --git a/include/configs/theadorable.h b/include/configs/theadorable.h index dbc358d9d8d1..8e13b47eab9c 100644 --- a/include/configs/theadorable.h +++ b/include/configs/theadorable.h @@ -76,10 +76,6 @@ #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + (128 << 10)) -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_MALLOC_SIMPLE -#endif - #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) diff --git a/include/configs/x530.h b/include/configs/x530.h index 6218291c56fa..5065eb87a39d 100644 --- a/include/configs/x530.h +++ b/include/configs/x530.h @@ -71,10 +71,6 @@ #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + CONFIG_SPL_SIZE) -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SYS_MALLOC_SIMPLE -#endif - #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) -- 2.25.1