From patchwork Thu Feb 25 10:49:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Delaunay X-Patchwork-Id: 1444268 X-Patchwork-Delegate: patrice.chotard@st.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector1 header.b=oPVCxJc3; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4DmV0t49Rsz9rx8 for ; Thu, 25 Feb 2021 21:49:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 603CB80F00; Thu, 25 Feb 2021 11:49:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com 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=foss.st.com header.i=@foss.st.com header.b="oPVCxJc3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0F155812A5; Thu, 25 Feb 2021 11:49:40 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (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 AC1F780CE8 for ; Thu, 25 Feb 2021 11:49:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick.delaunay@foss.st.com Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11PAbCaU003688; Thu, 25 Feb 2021 11:49:36 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=selector1; bh=edfnj/RQ6gLmfFxrxnjoevz10VUrNXCzrnzJpefecUo=; b=oPVCxJc3xsIgHJcF2px58Ucozo6bygxxXrxbfkh8WsWM/8v+We+zR4VyeXGCxT2UJRus vugcpj4zpSKa1TgyYzHspF4x+QIfNtahcjRP+iz1a3VLxLp2LuLCCiJ9psC7QwwPPNLQ rUeCWUgUXik8f+F3xcrtMPUMRC2Kw2QGf6rxyvMMppF8dzof7FYWfFKCf3/xIENDTWI9 tjG75zWZbQjcx4KAFkc2x3F4NJMGeGr1jxU3u8PzOsNjmNrk4pS+LKrqqKbzBDPa6W5s FlBaxQzXktwTOoow/i9pZRopXg7QNYxnbmoCZlmrYBJ0YsK4L8drp+2ANKOjhG1ef6vI sQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 36w66u5249-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 11:49:36 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C512B10002A; Thu, 25 Feb 2021 11:49:35 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 9BF40226200; Thu, 25 Feb 2021 11:49:35 +0100 (CET) Received: from localhost (10.75.127.45) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 25 Feb 2021 11:49:35 +0100 From: Patrick Delaunay To: CC: Patrick Delaunay , Patrick Delaunay , Patrice Chotard , Subject: [PATCH] board: st: remove the nand MTD configuration for NOR boot in stm32mp1 board Date: Thu, 25 Feb 2021 11:49:28 +0100 Message-ID: <20210225114917.1.If8dd5ef8c9f53bfc56498a9c7c8f23ea05588829@changeid> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG1NODE3.st.com (10.75.127.3) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-02-25_06:2021-02-24, 2021-02-25 signatures=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.102.4 at phobos.denx.de X-Virus-Status: Clean Since commit d5d726d3cc47 ("configs: stm32mp1: only support SD card after NOR in bootcmd_stm32mp"), the stm32mp1 boards only support SD card after NOR boot device, so the MTD partitions for nand0 or spi-nand0 are useless (no need of "UBI" partition in nand0 or spi-nand0). This patch removes these nand MTD update for nor boot and simplify nand0 and spi-nand0 support (remove the mtd_boot variable). Signed-off-by: Patrick Delaunay Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- board/st/common/stm32mp_mtdparts.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/board/st/common/stm32mp_mtdparts.c b/board/st/common/stm32mp_mtdparts.c index 69eb10844d..f074fc189d 100644 --- a/board/st/common/stm32mp_mtdparts.c +++ b/board/st/common/stm32mp_mtdparts.c @@ -122,28 +122,24 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts) log_debug("mtd device = %s\n", dev->name); } - if (nor || nand) { + if (nand) { mtd = get_mtd_device_nm("nand0"); if (!IS_ERR_OR_NULL(mtd)) { - const char *mtd_boot = CONFIG_MTDPARTS_NAND0_BOOT; const char *mtd_tee = CONFIG_MTDPARTS_NAND0_TEE; - board_set_mtdparts("nand0", ids, parts, - !nor ? mtd_boot : NULL, + CONFIG_MTDPARTS_NAND0_BOOT, !nor && tee ? mtd_tee : NULL, "-(UBI)"); put_mtd_device(mtd); } } - if (nor || spinand) { + if (spinand) { mtd = get_mtd_device_nm("spi-nand0"); if (!IS_ERR_OR_NULL(mtd)) { - const char *mtd_boot = CONFIG_MTDPARTS_SPINAND0_BOOT; const char *mtd_tee = CONFIG_MTDPARTS_SPINAND0_TEE; - board_set_mtdparts("spi-nand0", ids, parts, - !nor ? mtd_boot : NULL, + CONFIG_MTDPARTS_SPINAND0_BOOT, !nor && tee ? mtd_tee : NULL, "-(UBI)"); put_mtd_device(mtd); @@ -152,11 +148,9 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts) if (nor) { if (!uclass_get_device(UCLASS_SPI_FLASH, 0, &dev)) { - const char *mtd_boot = CONFIG_MTDPARTS_NOR0_BOOT; const char *mtd_tee = CONFIG_MTDPARTS_NOR0_TEE; - board_set_mtdparts("nor0", ids, parts, - mtd_boot, + CONFIG_MTDPARTS_NOR0_BOOT, tee ? mtd_tee : NULL, "-(nor_user)"); }