From patchwork Sat Oct 9 17:33:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1538829 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Np8ka7hR; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HRXHQ6bSNz9sPf for ; Sun, 10 Oct 2021 04:34:26 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7C73B836A6; Sat, 9 Oct 2021 19:34:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Np8ka7hR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BD9638369D; Sat, 9 Oct 2021 19:34:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EB29A83616 for ; Sat, 9 Oct 2021 19:33:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id AFF0960F57; Sat, 9 Oct 2021 17:33:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633800831; bh=p9cgza5lydqqBedPlFW/NzmGoo6KYS1VEa9H91X9MsU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Np8ka7hRWqNn/Vk6uEJvapXbOxfqChakn6vDaWT7tYIEFM6pw+jnzJH7Mh0bKjvb3 52WGaoEatQewLI6ccS/nNZ/O6v4H9TZF05+dTWyv86XjpP1HtB0DbsCeYeHjDvCMgj egWZjbKGOQWjd9iL79XtjlDdFsiFjOp8XrXXTN8XDbiuhVmpY0MO9S8MKNAmNzRwL+ IQhLCvgulgDMRcixqOj9o08jJkntIkundFmHLCPqX2twCl6cBbmp5P+7SBXsBc1rKR PAkxdVcByrAXSCcOrb6t3BYfITh1JML1268qChRn7V/SxDGtFbHqmb8MN18+2isX4h stXJx25BqZnGw== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, pali@kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 01/12] arm: mvebu: turris_mox: Drop SF_DEFAULT_MODE from defconfig Date: Sat, 9 Oct 2021 19:33:35 +0200 Message-Id: <20211009173346.7859-2-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211009173346.7859-1-kabel@kernel.org> References: <20211009173346.7859-1-kabel@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Marek Behún This config option defaults to 0, so it is redundant in defconfig. Signed-off-by: Marek Behún --- configs/turris_mox_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig index 82ad68b6a1..6ff551e477 100644 --- a/configs/turris_mox_defconfig +++ b/configs/turris_mox_defconfig @@ -67,7 +67,6 @@ CONFIG_MMC_SDHCI_SDMA=y CONFIG_MMC_SDHCI_XENON=y CONFIG_MTD=y CONFIG_DM_MTD=y -CONFIG_SF_DEFAULT_MODE=0 CONFIG_SF_DEFAULT_SPEED=20000000 CONFIG_SPI_FLASH_MACRONIX=y CONFIG_SPI_FLASH_SPANSION=y From patchwork Sat Oct 9 17:33:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1538830 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Yi54tDkp; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HRXHg4VV0z9sPf for ; Sun, 10 Oct 2021 04:34:39 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8283483689; Sat, 9 Oct 2021 19:34:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Yi54tDkp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 44E3583688; Sat, 9 Oct 2021 19:34:03 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4D78D83678 for ; Sat, 9 Oct 2021 19:33:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 00AA26108B; Sat, 9 Oct 2021 17:33:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633800832; bh=g8unZRjLxehVRTJ3uOnV27d08NYP2+SEY3nwdNDtm+0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yi54tDkphi/W3zFmXfOlMYiP652bCzGlBnd3bfFoL+MBtaPSJQcJFQ+bXnUlTffmZ 1T6rJNx7TvkUW33L2J7bHRHlCPMFfjeXomw1nMnAMcG+Be7quwkOtz3P0qpuXhIxwF whMF6muaONuEnyd6s4HWMVbex1jpyUt5jcgT0HLgUGF4DldEo5VXWb5TDwBfdj+abE aDwdq5PCamcfhDG8F0KNGPJK3d/HWQOE0uX6TBbYAeFowD9hAX+i70Y+vn3eci815V 1w0QtFADg2NG306fa9zc+6DX5Qx8fajeb6cDFuNH6Qp8U77rX5bAn44i9v48NyzyF0 uOSkWDQvqwPQA== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, pali@kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 02/12] arm: mvebu: turris_mox: Move options to defconfig Date: Sat, 9 Oct 2021 19:33:36 +0200 Message-Id: <20211009173346.7859-3-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211009173346.7859-1-kabel@kernel.org> References: <20211009173346.7859-1-kabel@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Marek Behún Move config options CONFIG_LAST_STAGE_INIT and CONFIG_DISPLAY_BOARDINFO_LATE to turris_mox_defconfig. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- configs/turris_mox_defconfig | 2 ++ include/configs/turris_mox.h | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig index 6ff551e477..e494aebecc 100644 --- a/configs/turris_mox_defconfig +++ b/configs/turris_mox_defconfig @@ -24,7 +24,9 @@ CONFIG_USE_PREBOOT=y CONFIG_SYS_CONSOLE_INFO_QUIET=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_ARCH_EARLY_INIT_R=y +CONFIG_LAST_STAGE_INIT=y CONFIG_MISC_INIT_R=y CONFIG_CMD_SHA1SUM=y CONFIG_CMD_CLK=y diff --git a/include/configs/turris_mox.h b/include/configs/turris_mox.h index 0bbc984753..0fcf216eb1 100644 --- a/include/configs/turris_mox.h +++ b/include/configs/turris_mox.h @@ -10,13 +10,6 @@ #define CONFIG_SYS_BOOTM_LEN (64 << 20) -#define CONFIG_LAST_STAGE_INIT - -/* - * High Level Configuration Options (easy to change) - */ -#define CONFIG_DISPLAY_BOARDINFO_LATE - /* additions for new ARM relocation support */ #define CONFIG_SYS_SDRAM_BASE 0x00000000 From patchwork Sat Oct 9 17:33:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1538832 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=k7eOGqPi; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HRXJG2fBDz9sPf for ; Sun, 10 Oct 2021 04:35:10 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 89BE583616; Sat, 9 Oct 2021 19:34:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="k7eOGqPi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C69D683697; Sat, 9 Oct 2021 19:34:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 82B9C8367F for ; Sat, 9 Oct 2021 19:33:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 3D0CF61090; Sat, 9 Oct 2021 17:33:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633800834; bh=I67c8FMixlFb9BAcqdgmUalYWTUukJTKQbe0c76uDFw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k7eOGqPiN6Zbfq9+fZr4XbmkRJj2ihuc3WcBgmSUNeYl63Y6WihuPwvv1OYVFKu9n aCERUVoS+qr7QOVkY88LYNHSPSazldup2IzpP6GJqILmFTEgSRZNoiWon9Ijo4+jTw UohlGpeWbKkn8k694o8XDxFzd5Z93jAvG7hIGphK0xx2Lt/BjUKXkUh2i17fN4fCLi vqLJEeOtzUYfbMDUCQ5LimjvgLp8eQOQNLylIXII662LDVgaGDucbxnTGWiXN1G7T4 6zA2hPASGAdWs/QNJ9K+QNR3E06nL0zrlZ/BMQkFvk65ETZTbrEniQ4HCfcnoAn7tO CMnerE1Tlf0gA== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, pali@kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 03/12] arm: mvebu: a3720: Create Kconfig option for I2C_MV Date: Sat, 9 Oct 2021 19:33:37 +0200 Message-Id: <20211009173346.7859-4-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211009173346.7859-1-kabel@kernel.org> References: <20211009173346.7859-1-kabel@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Marek Behún Move the config option CONFIG_I2C_MV to a Kconfig option CONFIG_SYS_I2C_MV and move the default definition from config header files into defconfigs. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- configs/mvebu_db-88f3720_defconfig | 1 + configs/mvebu_espressobin-88f3720_defconfig | 1 + configs/turris_mox_defconfig | 1 + configs/uDPU_defconfig | 1 + drivers/i2c/Kconfig | 6 ++++++ drivers/i2c/Makefile | 2 +- include/configs/mvebu_armada-37xx.h | 5 ----- include/configs/turris_mox.h | 5 ----- scripts/config_whitelist.txt | 1 - 9 files changed, 11 insertions(+), 12 deletions(-) diff --git a/configs/mvebu_db-88f3720_defconfig b/configs/mvebu_db-88f3720_defconfig index d401f4765f..6c2a2180a4 100644 --- a/configs/mvebu_db-88f3720_defconfig +++ b/configs/mvebu_db-88f3720_defconfig @@ -45,6 +45,7 @@ CONFIG_CLK=y CONFIG_CLK_MVEBU=y # CONFIG_MVEBU_GPIO is not set CONFIG_DM_I2C=y +CONFIG_SYS_I2C_MV=y CONFIG_MISC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_SDMA=y diff --git a/configs/mvebu_espressobin-88f3720_defconfig b/configs/mvebu_espressobin-88f3720_defconfig index 01cf24aec9..b783246562 100644 --- a/configs/mvebu_espressobin-88f3720_defconfig +++ b/configs/mvebu_espressobin-88f3720_defconfig @@ -54,6 +54,7 @@ CONFIG_AHCI_MVEBU=y CONFIG_CLK=y CONFIG_CLK_MVEBU=y CONFIG_DM_I2C=y +CONFIG_SYS_I2C_MV=y CONFIG_MISC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_SDMA=y diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig index e494aebecc..3cae32f69b 100644 --- a/configs/turris_mox_defconfig +++ b/configs/turris_mox_defconfig @@ -61,6 +61,7 @@ CONFIG_CLK=y CONFIG_CLK_MVEBU=y # CONFIG_MVEBU_GPIO is not set CONFIG_DM_I2C=y +CONFIG_SYS_I2C_MV=y CONFIG_LED=y CONFIG_LED_GPIO=y CONFIG_MISC=y diff --git a/configs/uDPU_defconfig b/configs/uDPU_defconfig index a06a25378e..6a222f3d6c 100644 --- a/configs/uDPU_defconfig +++ b/configs/uDPU_defconfig @@ -54,6 +54,7 @@ CONFIG_CLK=y CONFIG_CLK_MVEBU=y CONFIG_DM_I2C=y CONFIG_DM_I2C_GPIO=y +CONFIG_SYS_I2C_MV=y CONFIG_MISC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_SDMA=y diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 57cac4483f..b1c3a96dc0 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -611,6 +611,12 @@ config SYS_I2C_VERSATILE Add support for the Arm Ltd Versatile Express I2C driver. The I2C host controller is present in the development boards manufactured by Arm Ltd. +config SYS_I2C_MV + bool "Marvell PXA (Armada 3720) I2C driver" + help + Support for PXA based I2C controller used on Armada 3720 SoC. + In Linux, this driver is called i2c-pxa. + config SYS_I2C_MVTWSI bool "Marvell I2C driver" help diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index 67841bf3e0..7cfb3b9043 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -10,7 +10,6 @@ obj-$(CONFIG_$(SPL_)DM_I2C_GPIO) += i2c-gpio.o obj-$(CONFIG_$(SPL_)I2C_CROS_EC_TUNNEL) += cros_ec_tunnel.o obj-$(CONFIG_$(SPL_)I2C_CROS_EC_LDO) += cros_ec_ldo.o -obj-$(CONFIG_I2C_MV) += mv_i2c.o obj-$(CONFIG_$(SPL_)SYS_I2C_LEGACY) += i2c_core.o obj-$(CONFIG_SYS_I2C_ASPEED) += ast_i2c.o obj-$(CONFIG_SYS_I2C_AT91) += at91_i2c.o @@ -29,6 +28,7 @@ obj-$(CONFIG_SYS_I2C_IPROC) += iproc_i2c.o obj-$(CONFIG_SYS_I2C_KONA) += kona_i2c.o obj-$(CONFIG_SYS_I2C_LPC32XX) += lpc32xx_i2c.o obj-$(CONFIG_SYS_I2C_MESON) += meson_i2c.o +obj-$(CONFIG_SYS_I2C_MV) += mv_i2c.o obj-$(CONFIG_SYS_I2C_MVTWSI) += mvtwsi.o obj-$(CONFIG_SYS_I2C_MXC) += mxc_i2c.o obj-$(CONFIG_SYS_I2C_NEXELL) += nx_i2c.o diff --git a/include/configs/mvebu_armada-37xx.h b/include/configs/mvebu_armada-37xx.h index 755f59eee9..8c315eb563 100644 --- a/include/configs/mvebu_armada-37xx.h +++ b/include/configs/mvebu_armada-37xx.h @@ -36,11 +36,6 @@ /* End of 16M scrubbed by training in bootrom */ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + 0xFF0000) -/* - * I2C - */ -#define CONFIG_I2C_MV - /* * Environment */ diff --git a/include/configs/turris_mox.h b/include/configs/turris_mox.h index 0fcf216eb1..ab7931d35b 100644 --- a/include/configs/turris_mox.h +++ b/include/configs/turris_mox.h @@ -34,11 +34,6 @@ /* End of 16M scrubbed by training in bootrom */ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + 0xFF0000) -/* - * I2C - */ -#define CONFIG_I2C_MV - /* Environment in SPI NOR flash */ /* diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 02d86d79cf..3475d0bc6d 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -601,7 +601,6 @@ CONFIG_I2C_ENV_EEPROM_BUS CONFIG_I2C_GSC CONFIG_I2C_MBB_TIMEOUT CONFIG_I2C_MULTI_BUS -CONFIG_I2C_MV CONFIG_I2C_MVTWSI CONFIG_I2C_MVTWSI_BASE CONFIG_I2C_MVTWSI_BASE0 From patchwork Sat Oct 9 17:33:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1538831 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=jQooV14R; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HRXHz0NDGz9sPf for ; Sun, 10 Oct 2021 04:34:54 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DA9E083676; Sat, 9 Oct 2021 19:34:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="jQooV14R"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CD4C4836AF; Sat, 9 Oct 2021 19:34:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BC8A783685 for ; Sat, 9 Oct 2021 19:33:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 78944610C7; Sat, 9 Oct 2021 17:33:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633800835; bh=4QIHP8hRzdzdilp2FaUEXR+tsOE6+6te848xD2FtzGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jQooV14RadzZ8VOQt9z7ClNxKXx3lBQWON79HKdscVGR5vun3RGuM43TXPkw8T3uW ffx//sQLaJiG+Fgq+Gikf2AuQv3Jw+Pbf7DbUiCBqCr4QI74cyS8HOWrueGAz6eW3x wYZhkqlIOl0kyRMxIPidd/n6pW2g73fuX/bDsFJct61ONcStfNvk90KT27XFF/A7jH /CJE3kF4V/cdMGcYmfXjQXscVs+IakGl2wdN6+UzwbjoQHPpFAnF+vwPt4jMjJUKIQ 9XJ+qI05lOYAEkMr1NjW8MTzM/Ox3Mzq4pRmTRKluNKeeffxkN4KzGTijypQH0UxNP G2ZvifhvlSV6w== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, pali@kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 04/12] arm: kirkwood, mvebu: Remove CONFIG_SYS_RESET_ADDRESS option Date: Sat, 9 Oct 2021 19:33:38 +0200 Message-Id: <20211009173346.7859-5-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211009173346.7859-1-kabel@kernel.org> References: <20211009173346.7859-1-kabel@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Marek Behún This option is not used anywhere. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- include/configs/SBx81LIFKW.h | 5 ----- include/configs/SBx81LIFXCAT.h | 5 ----- include/configs/edminiv2.h | 6 ------ include/configs/mv-common.h | 1 - include/configs/mvebu_armada-37xx.h | 1 - include/configs/mvebu_armada-8k.h | 1 - include/configs/turris_mox.h | 1 - include/configs/x530.h | 5 ----- 8 files changed, 25 deletions(-) diff --git a/include/configs/SBx81LIFKW.h b/include/configs/SBx81LIFKW.h index fc6167cf96..462619ff69 100644 --- a/include/configs/SBx81LIFKW.h +++ b/include/configs/SBx81LIFKW.h @@ -59,11 +59,6 @@ /* There is no PHY directly connected so don't ask it for link status */ #undef CONFIG_SYS_FAULT_ECHO_LINK_DOWN -/* - * Other required minimal configurations - */ -#define CONFIG_SYS_RESET_ADDRESS 0xffff0000 /* Rst Vector Adr */ - /* * Ethernet Driver configuration */ diff --git a/include/configs/SBx81LIFXCAT.h b/include/configs/SBx81LIFXCAT.h index 06be63e242..a271567f85 100644 --- a/include/configs/SBx81LIFXCAT.h +++ b/include/configs/SBx81LIFXCAT.h @@ -64,11 +64,6 @@ /* There is no PHY directly connected so don't ask it for link status */ #undef CONFIG_SYS_FAULT_ECHO_LINK_DOWN -/* - * Other required minimal configurations - */ -#define CONFIG_SYS_RESET_ADDRESS 0xffff0000 /* Rst Vector Adr */ - /* * Ethernet Driver configuration */ diff --git a/include/configs/edminiv2.h b/include/configs/edminiv2.h index fbe468010b..664d6d1f34 100644 --- a/include/configs/edminiv2.h +++ b/include/configs/edminiv2.h @@ -151,12 +151,6 @@ * Environment variables configurations */ -/* - * Other required minimal configurations - */ - -#define CONFIG_SYS_RESET_ADDRESS 0xffff0000 - /* Enable command line editing */ /* provide extensive help */ diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h index e460f69a08..cc3b597f28 100644 --- a/include/configs/mv-common.h +++ b/include/configs/mv-common.h @@ -55,7 +55,6 @@ /* * Other required minimal configurations */ -#define CONFIG_SYS_RESET_ADDRESS 0xffff0000 /* Rst Vector Adr */ #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ /* ====> Include platform Common Definitions */ diff --git a/include/configs/mvebu_armada-37xx.h b/include/configs/mvebu_armada-37xx.h index 8c315eb563..e7f7e772fc 100644 --- a/include/configs/mvebu_armada-37xx.h +++ b/include/configs/mvebu_armada-37xx.h @@ -30,7 +30,6 @@ /* * Other required minimal configurations */ -#define CONFIG_SYS_RESET_ADDRESS 0xffff0000 /* Rst Vector Adr */ #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ /* End of 16M scrubbed by training in bootrom */ diff --git a/include/configs/mvebu_armada-8k.h b/include/configs/mvebu_armada-8k.h index 2f8be2ee49..886f44c903 100644 --- a/include/configs/mvebu_armada-8k.h +++ b/include/configs/mvebu_armada-8k.h @@ -24,7 +24,6 @@ /* * Other required minimal configurations */ -#define CONFIG_SYS_RESET_ADDRESS 0xffff0000 /* Rst Vector Adr */ #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ /* End of 16M scrubbed by training in bootrom */ diff --git a/include/configs/turris_mox.h b/include/configs/turris_mox.h index ab7931d35b..070abe38db 100644 --- a/include/configs/turris_mox.h +++ b/include/configs/turris_mox.h @@ -28,7 +28,6 @@ /* * Other required minimal configurations */ -#define CONFIG_SYS_RESET_ADDRESS 0xffff0000 /* Rst Vector Adr */ #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ /* End of 16M scrubbed by training in bootrom */ diff --git a/include/configs/x530.h b/include/configs/x530.h index d6aec6d7f2..699deffbe0 100644 --- a/include/configs/x530.h +++ b/include/configs/x530.h @@ -61,11 +61,6 @@ #include -/* - * Other required minimal configurations - */ -#define CONFIG_SYS_RESET_ADDRESS 0xffff0000 /* Rst Vector Adr */ - /* Keep device tree and initrd in low memory so the kernel can access them */ #define CONFIG_EXTRA_ENV_SETTINGS \ "fdt_high=0x10000000\0" \ From patchwork Sat Oct 9 17:33:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1538833 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=G2LJab1W; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HRXJT0W4nz9sPf for ; Sun, 10 Oct 2021 04:35:21 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7E17E83684; Sat, 9 Oct 2021 19:34:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="G2LJab1W"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C81A1836AF; Sat, 9 Oct 2021 19:34:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3C2C98354E for ; Sat, 9 Oct 2021 19:33:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id B432E61055; Sat, 9 Oct 2021 17:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633800836; bh=bog695ujHhkzVRhowItWV2BO+hgj3ddw/MWji0r5GF0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G2LJab1WJzOADbWYIxyo5pMy+9/C8ov7zvImXwGuEYG/vFKPecTTCuF4poMgIuotH bRTMzuudpF+p7rF13NHsYMwjAiApcTGX/ioDodFG3tYmqLsdw97uYw68gAIGcH3+Fs nNFZTugKur8RZhOrQ2Oxzv2SS218shnTGYwc1fabdFpfLO9tQ9YEIG88vemvYFeB/z ddapblrJMdW9tk8Fcpf1kUiMEb+xD0328t+0IBdiLJHwfQli3+sDnNTuuUAgAoMcvV lpxC1jGa2Zc0Yb/pew6R/y2AWrSqEVfYsuVjMvwBR6KeTLF5Qri+I77QWwSArTR+Ge NAvGtfcBhMIAQ== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, pali@kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 05/12] arm: mvebu: turris_mox: Cosmetic update for board config header Date: Sat, 9 Oct 2021 19:33:39 +0200 Message-Id: <20211009173346.7859-6-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211009173346.7859-1-kabel@kernel.org> References: <20211009173346.7859-1-kabel@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Marek Behún Reorder the definitions in Turris MOX' board config header, drop the comment relics from when this file was copied, fix indentation. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- include/configs/turris_mox.h | 61 +++++++++++++----------------------- 1 file changed, 22 insertions(+), 39 deletions(-) diff --git a/include/configs/turris_mox.h b/include/configs/turris_mox.h index 070abe38db..3cfad7cca9 100644 --- a/include/configs/turris_mox.h +++ b/include/configs/turris_mox.h @@ -8,13 +8,11 @@ #ifndef _CONFIG_TURRIS_MOX_H #define _CONFIG_TURRIS_MOX_H -#define CONFIG_SYS_BOOTM_LEN (64 << 20) - -/* additions for new ARM relocation support */ -#define CONFIG_SYS_SDRAM_BASE 0x00000000 - -/* auto boot */ - +#define CONFIG_SYS_BOOTM_LEN (64 << 20) +#define CONFIG_SYS_SDRAM_BASE 0x00000000 +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + 0xFF0000) +#define CONFIG_SYS_CBSIZE 1024 +#define CONFIG_SYS_MAXARGS 32 #define CONFIG_SYS_BAUDRATE_TABLE { 300, 600, 1200, 1800, 2400, 4800, \ 9600, 19200, 38400, 57600, 115200, \ 230400, 460800, 500000, 576000, \ @@ -23,25 +21,10 @@ 4000000, 4500000, 5000000, 5500000, \ 6000000 } -#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buff Size */ - -/* - * Other required minimal configurations - */ -#define CONFIG_SYS_MAXARGS 32 /* max number of command args */ - -/* End of 16M scrubbed by training in bootrom */ -#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + 0xFF0000) - -/* Environment in SPI NOR flash */ - -/* - * Ethernet Driver configuration - */ -#define CONFIG_ARP_TIMEOUT 200 -#define CONFIG_NET_RETRY_COUNT 50 +#define CONFIG_ARP_TIMEOUT 200 +#define CONFIG_NET_RETRY_COUNT 50 -#define CONFIG_USB_MAX_CONTROLLER_COUNT (3 + 3) +#define CONFIG_USB_MAX_CONTROLLER_COUNT 6 #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ @@ -51,22 +34,22 @@ #include -#define TURRIS_MOX_BOOTCMD_RESCUE \ - "setenv bootargs \"console=ttyMV0,115200 " \ - "earlycon=ar3700_uart,0xd0012000\" && " \ - "sf probe && " \ - "sf read 0x5000000 0x190000 && " \ - "lzmadec 0x5000000 0x5800000 && " \ +#define TURRIS_MOX_BOOTCMD_RESCUE \ + "setenv bootargs \"console=ttyMV0,115200 " \ + "earlycon=ar3700_uart,0xd0012000\" && " \ + "sf probe && " \ + "sf read 0x5000000 0x190000 && " \ + "lzmadec 0x5000000 0x5800000 && " \ "bootm 0x5800000" -#define CONFIG_EXTRA_ENV_SETTINGS \ - "scriptaddr=0x4d00000\0" \ - "pxefile_addr_r=0x4e00000\0" \ - "fdt_addr_r=0x4f00000\0" \ - "kernel_addr_r=0x5000000\0" \ - "ramdisk_addr_r=0x8000000\0" \ - "fdtfile=marvell/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ - "bootcmd_rescue=" TURRIS_MOX_BOOTCMD_RESCUE "\0" \ +#define CONFIG_EXTRA_ENV_SETTINGS \ + "scriptaddr=0x4d00000\0" \ + "pxefile_addr_r=0x4e00000\0" \ + "fdt_addr_r=0x4f00000\0" \ + "kernel_addr_r=0x5000000\0" \ + "ramdisk_addr_r=0x8000000\0" \ + "fdtfile=marvell/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ + "bootcmd_rescue=" TURRIS_MOX_BOOTCMD_RESCUE "\0" \ BOOTENV #endif /* _CONFIG_TURRIS_MOX_H */ From patchwork Sat Oct 9 17:33:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1538834 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=g8abm1I7; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HRXJf5LV1z9sPf for ; Sun, 10 Oct 2021 04:35:30 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 35C708367F; Sat, 9 Oct 2021 19:34:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="g8abm1I7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 53AA083681; Sat, 9 Oct 2021 19:34:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1A1C983692 for ; Sat, 9 Oct 2021 19:33:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id F01C16109E; Sat, 9 Oct 2021 17:33:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633800837; bh=dEr/5szhjxoQNQRV7oR40pYrRKt21PFtazoLCbau2/E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g8abm1I7ktHI6ekRPKrlniYxu/q9amivpSaaXwlwEts682UkH2LoUwkVzeqs4xfxz d7OrI5Mv/2xTaBzdeqtDCdjT2P5zVyYm4nH0Ht4nL1jOo5zqTV1644pF7mNRfLAOAY rlwX9qYfWlz28SINjFGnoyW4fAAVhCLIHLsQH9ma2FUc0T1LSyoEpfS2V8X6WwtsLK PnSQO0Xish6sIK85Gb73Kqbowoogwk9AeL63Cjzm/1OTp6amuB/BcGhhy4CHByIwjM TWpj4wOxPTEd5Ufz1IhxYpE5MsISqcsxerem6pK5WN5AIJPRt6/p7nDWooRixn42g1 sqazdNFZeCRVg== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, pali@kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 06/12] arm: mvebu: turris_mox: Use show_board_info() Date: Sat, 9 Oct 2021 19:33:40 +0200 Message-Id: <20211009173346.7859-7-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211009173346.7859-1-kabel@kernel.org> References: <20211009173346.7859-1-kabel@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Marek Behún We are printing board information in last_stage_init(), but U-Boot has dedicated function, show_board_info(), for this. Move code which prints board information (board version, serial number, module topology, ...) to show_board_info(). Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- board/CZ.NIC/turris_mox/turris_mox.c | 67 ++++++++++++++-------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c index 428cd23a19..ff0ed28045 100644 --- a/board/CZ.NIC/turris_mox/turris_mox.c +++ b/board/CZ.NIC/turris_mox/turris_mox.c @@ -485,44 +485,34 @@ static void handle_reset_button(void) } } -static void mox_print_info(void) +int show_board_info(void) { - int ret, board_version, ram_size; - u64 serial_number; + int i, ret, board_version, ram_size, is_sd; const char *pub_key; + const u8 *topology; + u64 serial_number; + + printf("Model: CZ.NIC Turris Mox Board\n"); ret = mbox_sp_get_board_info(&serial_number, NULL, NULL, &board_version, &ram_size); - if (ret < 0) - return; - - printf("Turris Mox:\n"); - printf(" Board version: %i\n", board_version); - printf(" RAM size: %i MiB\n", ram_size); - printf(" Serial Number: %016llX\n", serial_number); + if (ret < 0) { + printf(" Cannot read board info: %i\n", ret); + } else { + printf(" Board version: %i\n", board_version); + printf(" RAM size: %i MiB\n", ram_size); + printf(" Serial Number: %016llX\n", serial_number); + } pub_key = mox_sp_get_ecdsa_public_key(); if (pub_key) printf(" ECDSA Public Key: %s\n", pub_key); else - printf("Cannot read ECDSA Public Key\n"); -} - -int last_stage_init(void) -{ - int ret, i; - const u8 *topology; - int is_sd; - struct mii_dev *bus; - struct gpio_desc reset_gpio = {}; - - mox_print_info(); + printf(" Cannot read ECDSA Public Key\n"); ret = mox_get_topology(&topology, &module_count, &is_sd); - if (ret) { + if (ret) printf("Cannot read module topology!\n"); - return 0; - } printf(" SD/eMMC version: %s\n", is_sd ? "SD" : "eMMC"); @@ -554,8 +544,7 @@ int last_stage_init(void) } } - /* now check if modules are connected in supported mode */ - + /* check if modules are connected in supported mode */ for (i = 0; i < module_count; ++i) { switch (topology[i]) { case MOX_MODULE_SFP: @@ -616,8 +605,17 @@ int last_stage_init(void) } } - /* now configure modules */ + if (module_count) + printf("\n"); + + return 0; +} + +int last_stage_init(void) +{ + struct gpio_desc reset_gpio = {}; + /* configure modules */ if (get_reset_gpio(&reset_gpio) < 0) return 0; @@ -633,16 +631,19 @@ int last_stage_init(void) mdelay(50); } + /* + * check if the addresses are set by reading Scratch & Misc register + * 0x70 of Peridot (and potentially Topaz) modules + */ if (peridot || topaz) { - /* - * now check if the addresses are set by reading Scratch & Misc - * register 0x70 of Peridot (and potentially Topaz) modules - */ + struct mii_dev *bus; bus = miiphy_get_dev_by_name("neta@30000"); if (!bus) { printf("Cannot get MDIO bus device!\n"); } else { + int i; + for (i = 0; i < peridot; ++i) check_switch_address(bus, 0x10 + i); @@ -653,8 +654,6 @@ int last_stage_init(void) } } - printf("\n"); - handle_reset_button(); return 0; From patchwork Sat Oct 9 17:33:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1538835 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ILYeWFWs; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HRXJr6vfWz9sPf for ; Sun, 10 Oct 2021 04:35:40 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ABFC4836A4; Sat, 9 Oct 2021 19:34:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="ILYeWFWs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5EEFA83683; Sat, 9 Oct 2021 19:34:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6614183699 for ; Sat, 9 Oct 2021 19:34:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 3715261090; Sat, 9 Oct 2021 17:33:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633800839; bh=9YNroEdYUeakWEjLMhHBySny1Hibhio67X/eHcmzejU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ILYeWFWsvn83zxw89TiqTL2qE5UEzXbR3Z3LHmq7O0z35mane/phs89cOw77AA2it YZfWuDWVOIYAYD4YJ82hUvt8xeKX585ORM1uDeDL//QDgSaDHmVOWWUuatRMHqaNI5 928N6HoqBVk5jN48U6uJqQjWFu6wbbZuVebymGBlinK8X+GgZAnmog7r48Okri1ip4 /d7krHAAAtarp6Vg0dzTVwjvGaJrzmgsGLzB0hBErSJphXldIV+85WnkGgl8GGDNxb i1u6BnanyJdXtbg2V1MV86ewUiQFqLoG0k190Vn8ZX4kmLHMX7u3XNOSoMifinRXaO UlI11qDIKyBsg== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, pali@kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 07/12] arm: mvebu: turris_mox: Always handle reset button Date: Sat, 9 Oct 2021 19:33:41 +0200 Message-Id: <20211009173346.7859-8-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211009173346.7859-1-kabel@kernel.org> References: <20211009173346.7859-1-kabel@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Marek Behún Handle reset button even if we can't configure modules. This happens if we fail retrieving reset GPIO with which we can reset the modules. (Note that this GPIO is different from reset button GPIO.) Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- board/CZ.NIC/turris_mox/turris_mox.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c index ff0ed28045..7c5acfd1d9 100644 --- a/board/CZ.NIC/turris_mox/turris_mox.c +++ b/board/CZ.NIC/turris_mox/turris_mox.c @@ -617,7 +617,7 @@ int last_stage_init(void) /* configure modules */ if (get_reset_gpio(&reset_gpio) < 0) - return 0; + goto handle_reset_btn; if (peridot > 0) { if (configure_peridots(&reset_gpio) < 0) { @@ -654,6 +654,7 @@ int last_stage_init(void) } } +handle_reset_btn: handle_reset_button(); return 0; From patchwork Sat Oct 9 17:33:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1538836 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=JbAHHAe7; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HRXK30Y9Wz9sPf for ; Sun, 10 Oct 2021 04:35:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F107F83695; Sat, 9 Oct 2021 19:34:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="JbAHHAe7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CD6F583695; Sat, 9 Oct 2021 19:34:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id ACDB38366F for ; Sat, 9 Oct 2021 19:34:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 731DC60F57; Sat, 9 Oct 2021 17:33:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633800840; bh=joTvuu0GmcYRl3A4nFASyEykm72la+hBaR9Q0YFfjJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JbAHHAe7dqkkMSwYgabR5iP/8dCYZNQSjccDtKZVuBiKymyXmFZwxGfM/EtuTyXtJ Isjyzn9bOT2W659HPjgzfYDLeOqZhOTmv0qZApDyrGar0U9fr6MmDvb1zM25CVW+B1 70ULdKnCTxJcb1PKbftGA9nMHsaCvfV6r9Du1Opk9PDqP7UCn5qPQ/wt86hUskmIN7 rHt83TBDDbBuiA/p+0UOyxBdLQ/8MjGEf10+G/7EMHZNowjqzmjTkYURj5IicUUv0t Y5pc6mYlhWTVVRaEoYJnbKiI2p7YF/IWcYbUGIJdBRArM2JbOxyQhYfkUHF8ykOOi1 HdWLaQOz5UGww== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, pali@kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 08/12] arm: mvebu: turris_mox: Better check for valid ethernet addresses in env Date: Sat, 9 Oct 2021 19:33:42 +0200 Message-Id: <20211009173346.7859-9-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211009173346.7859-1-kabel@kernel.org> References: <20211009173346.7859-1-kabel@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Marek Behún Currently we overwrite ethaddr and eth1addr only if these variables don't exist. Better overwrite them even if the env variable exists, but is invalid - eth_env_get_enetaddr_by_index() checks for validity. Refactor the code to use a for cycle. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- board/CZ.NIC/turris_mox/turris_mox.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c index 7c5acfd1d9..2202eb8cfb 100644 --- a/board/CZ.NIC/turris_mox/turris_mox.c +++ b/board/CZ.NIC/turris_mox/turris_mox.c @@ -359,20 +359,22 @@ static int get_reset_gpio(struct gpio_desc *reset_gpio) int misc_init_r(void) { - int ret; - u8 mac1[6], mac2[6]; + u8 mac[2][6]; + int i, ret; - ret = mbox_sp_get_board_info(NULL, mac1, mac2, NULL, NULL); + ret = mbox_sp_get_board_info(NULL, mac[0], mac[1], NULL, NULL); if (ret < 0) { printf("Cannot read data from OTP!\n"); return 0; } - if (is_valid_ethaddr(mac1) && !env_get("ethaddr")) - eth_env_set_enetaddr("ethaddr", mac1); + for (i = 0; i < 2; ++i) { + u8 oldmac[6]; - if (is_valid_ethaddr(mac2) && !env_get("eth1addr")) - eth_env_set_enetaddr("eth1addr", mac2); + if (is_valid_ethaddr(mac[i]) && + !eth_env_get_enetaddr_by_index("eth", i, oldmac)) + eth_env_set_enetaddr_by_index("eth", i, mac[i]); + } return 0; } From patchwork Sat Oct 9 17:33:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1538837 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=gc1HBA4H; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HRXKF5ydRz9sPf for ; Sun, 10 Oct 2021 04:36:01 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B44D583698; Sat, 9 Oct 2021 19:34:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="gc1HBA4H"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DE45083683; Sat, 9 Oct 2021 19:34:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1E614836A2 for ; Sat, 9 Oct 2021 19:34:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id AE87661055; Sat, 9 Oct 2021 17:34:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633800841; bh=tHnApqk4OKnVjU5TZymYTiBfVWVK7qdX5+YZ7tLMqkU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gc1HBA4H0aUQNPh1B3/2tGil1mkf+Uxy74ow4pXjJLHzdIagCT5d3155z7/EN0uuN 9sr5XCd+djQ1RexN+Yif3pFLitHmkM4N8y0PJ46TUFuaQAopjLXVGpn7VOEaR3Krat aq1mTH6NE+1W+DsGnmp255hz+qEeQzs7wOdGkDseJOJqu42S6u5K1o1vj9eLLI8mQd rgYMRNerxeFYsFLii/CYnv82jCQDIDKNZTl2grFVbuEm01OjLlIN6l3rrBjmUt0sX2 o7p7k2fZC/SxX5Ckuyiec0U0rRP1eSt8Oh6/IZDtVZ4rnX23FKXqfHE37roqljgEh2 NtsjHYRudeudQ== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, pali@kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 09/12] arm: mvebu: turris_omnia: Overwrite ethaddr only if invalid Date: Sat, 9 Oct 2021 19:33:43 +0200 Message-Id: <20211009173346.7859-10-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211009173346.7859-1-kabel@kernel.org> References: <20211009173346.7859-1-kabel@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Marek Behún Currently we always overwrite ethaddrs with those from EEPROM. In order to allow user to use a cloned MAC address in U-Boot, change the code so that it sets ethaddr variables only if they aren't set or are invalid. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- board/CZ.NIC/turris_omnia/turris_omnia.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index a48e1f5c30..7a86111890 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -518,6 +518,15 @@ static void increment_mac(u8 *mac) } } +static void set_mac_if_invalid(int i, u8 *mac) +{ + u8 oldmac[6]; + + if (is_valid_ethaddr(mac) && + !eth_env_get_enetaddr_by_index("eth", i, oldmac)) + eth_env_set_enetaddr_by_index("eth", i, mac); +} + int misc_init_r(void) { int err; @@ -550,18 +559,11 @@ int misc_init_r(void) mac[4] = mac1[2]; mac[5] = mac1[3]; - if (is_valid_ethaddr(mac)) - eth_env_set_enetaddr("eth1addr", mac); - + set_mac_if_invalid(1, mac); increment_mac(mac); - - if (is_valid_ethaddr(mac)) - eth_env_set_enetaddr("eth2addr", mac); - + set_mac_if_invalid(2, mac); increment_mac(mac); - - if (is_valid_ethaddr(mac)) - eth_env_set_enetaddr("ethaddr", mac); + set_mac_if_invalid(0, mac); out: return 0; From patchwork Sat Oct 9 17:33:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1538838 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=EaI5s7uQ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HRXKS5m78z9sPf for ; Sun, 10 Oct 2021 04:36:12 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 199CD836B4; Sat, 9 Oct 2021 19:34:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="EaI5s7uQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7C2B283697; Sat, 9 Oct 2021 19:34:27 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 43E248367B for ; Sat, 9 Oct 2021 19:34:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id EA0446109E; Sat, 9 Oct 2021 17:34:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633800842; bh=cfqytUUCu8wyN3BlODe/cudHxBJbQpEtwNdnxmsUCbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EaI5s7uQe7JkDJ+s9TQJTiZkGErSh0u4+rjXI+SkMi/pVWNr1CMNpRB29bxbgCR1H +hPux2IEhTPnz9d18sFvtk369lSar2hghQKGTCuaLQRFmxpWjCATrLlgGckla5QpWE fpQxuhW91/+T2RYZXjkPpuexjUp3cfY2w3SMsCZGuaU+T/G5IZ/cktV/flQlHkcinV azJmOggOGENL3UoDx1wchF0LygbP8PrpaHgAil5La1eVwCuy/MHeoryls1Gz0KMT8q I1tqihrVmHYXW2u3qcUTdFTw0i9BRe1FuGRR40kpJe7hpEDiI41GNPefLtFsOpGGiF zuGdZj6+oBvZg== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, pali@kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 10/12] arm: mvebu: turris_omnia: Use show_board_info() Date: Sat, 9 Oct 2021 19:33:44 +0200 Message-Id: <20211009173346.7859-11-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211009173346.7859-1-kabel@kernel.org> References: <20211009173346.7859-1-kabel@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Marek Behún We are printing board information in checkboard() function, which is called from the default weak implementation of show_board_info(). Rename checkboard() to show_board_info(). This throws away the weak implementation of show_board_info(). Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- board/CZ.NIC/turris_omnia/turris_omnia.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 7a86111890..39051a803a 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -468,7 +468,7 @@ static struct udevice *get_atsha204a_dev(void) return dev; } -int checkboard(void) +int show_board_info(void) { u32 version_num, serial_num; int err = 1; @@ -496,7 +496,7 @@ int checkboard(void) } out: - printf("Turris Omnia:\n"); + printf("Model: Turris Omnia\n"); printf(" RAM size: %i MiB\n", omnia_get_ram_size_gb() * 1024); if (err) printf(" Serial Number: unknown\n"); From patchwork Sat Oct 9 17:33:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1538839 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=hRGkvXZM; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HRXKf6mX3z9sPf for ; Sun, 10 Oct 2021 04:36:22 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D230A836BA; Sat, 9 Oct 2021 19:34:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="hRGkvXZM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0812C8369B; Sat, 9 Oct 2021 19:34:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 56FA1836A4 for ; Sat, 9 Oct 2021 19:34:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 3172960F57; Sat, 9 Oct 2021 17:34:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633800844; bh=cSRVoxJuR6de1o7D2IaO5vkI3BZWptotPVUuuOWeQmg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hRGkvXZMwr0l6CnpPdF/QoPg7yX+alwKbiyRKJbk94Glg94LoMPNZSKkVibMvNozD a83g0wrtUxG9CrZwtEN64KZ0yrCmrSesSiCI/5XcOVmHgOyY34+UpVWA3XP3Vpl4Nx sAf9uy40Hz3x5+gsja7RC++tbIFd0zocIn/oEps+LfHnURyRq4+gVVBJ1v0e5oLJG6 xbID/WKbIO6lBFM+W5t1DZycKRgpK3c5O2VP182eV7A8NppbynnOQJBljsQo1nwbAL OwC6vokcBZ72pFrYU3N3Ca9EHn31e6W5nPC0OYEwfB7BZiKGWKdDUSFpiHuz0ta+aK heLXOJnBh+2zw== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, pali@kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 11/12] arm: mvebu: turris_omnia: Move SPL's SYS_MALLOC_SIMPLE to Kconfig Date: Sat, 9 Oct 2021 19:33:45 +0200 Message-Id: <20211009173346.7859-12-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211009173346.7859-1-kabel@kernel.org> References: <20211009173346.7859-1-kabel@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Marek Behún Instead of declaring CONFIG_SYS_MALLOC_SIMPLE dependant on CONFIG_SPL_BUILD in board config header, select CONFIG_SPL_SYS_MALLOC_SIMPLE in Kconfig. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- arch/arm/mach-mvebu/Kconfig | 1 + include/configs/turris_omnia.h | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 54dff9986b..8365305733 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -128,6 +128,7 @@ config TARGET_TURRIS_OMNIA select I2C_MUX select I2C_MUX_PCA954x select SPL_I2C_MUX + select SPL_SYS_MALLOC_SIMPLE select SYS_I2C_MVTWSI select ATSHA204A diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index 8646633ea4..562b49327f 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -36,10 +36,6 @@ #define CONFIG_SPL_BSS_START_ADDR (0x40000000 + CONFIG_SPL_SIZE) #define CONFIG_SPL_BSS_MAX_SIZE (16 << 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) #define CONFIG_SPL_DRIVERS_MISC From patchwork Sat Oct 9 17:33:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1538840 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=IE/nMCwM; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HRXKr2nfvz9sPf for ; Sun, 10 Oct 2021 04:36:32 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 300C1836C7; Sat, 9 Oct 2021 19:35:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="IE/nMCwM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 854E283684; Sat, 9 Oct 2021 19:34:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A08AC836A9 for ; Sat, 9 Oct 2021 19:34:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 6CB5B61055; Sat, 9 Oct 2021 17:34:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633800845; bh=isAT4hHKvsMosU5z/U4br6wI8bsQFwDcYiXQHbVF+1E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IE/nMCwMZzZ4DIxt2r8lktbuzlC4MMtZZx6BWgNTL8x1ujk1VMlTco52D0LDQAQ0l +6niRGpLZY03/DuBWcaT2UfR1un6lPE7GopVRIb5mISBK2TicrBxIhKolgZll/SLO+ ykw6dfh2mG/VgzXIy3xZOzf6seG/yqVDeAqIIA7C0NV9RnwAaAvRU5VGDIfaQ9DNno pon849CrEBPXw9h3wTDAygPbCjkdBKErhQCHSJLb0eHm9PEnQyHE3Kxc4sRdZhr7Pc FhYLvBW4H05LI+z+gTVB7RD36/wYZzDFfRcGdYE1I7xEvQOp/vBHElJo+i6HXZCpK1 eYiUj9gOwrXxA== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, pali@kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 12/12] arm: mvebu: turris_omnia: Move CONFIG_SPL_DRIVERS_MISC to Kconfig Date: Sat, 9 Oct 2021 19:33:46 +0200 Message-Id: <20211009173346.7859-13-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211009173346.7859-1-kabel@kernel.org> References: <20211009173346.7859-1-kabel@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Marek Behún Instead of declaring CONFIG_SPL_DRIVERS_MISC in board config header, select it in Kconfig. Signed-off-by: Marek Behún Reviewed-by: Stefan Roese --- arch/arm/mach-mvebu/Kconfig | 1 + include/configs/turris_omnia.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 8365305733..c66dab6012 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -127,6 +127,7 @@ config TARGET_TURRIS_OMNIA select DM_I2C select I2C_MUX select I2C_MUX_PCA954x + select SPL_DRIVERS_MISC select SPL_I2C_MUX select SPL_SYS_MALLOC_SIMPLE select SYS_I2C_MVTWSI diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index 562b49327f..3af62ef48c 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -38,7 +38,6 @@ #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) -#define CONFIG_SPL_DRIVERS_MISC #ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC /* SPL related MMC defines */