From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 84355C77B6E for ; Thu, 13 Apr 2023 21:12:36 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A83BE85DD9; Thu, 13 Apr 2023 23:12:29 +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="kbXDgFPY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B4FB485CB1; Thu, 13 Apr 2023 23:12:08 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (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 298CA85E61 for ; Thu, 13 Apr 2023 23:11: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=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CF17B60AB4; Thu, 13 Apr 2023 21:11:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03CDAC433EF; Thu, 13 Apr 2023 21:11:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681420313; bh=i1YvDpEip/JFv4A+9pWy6ok4IyltpYrGfxoweQtKHP4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kbXDgFPYTNtApRYsVo0btrcedPFGztR9HEJUG9E0Krlton4Tsmhnt38pA8HfnltE0 XsrTHOMRpZJnPlCKE0FDl3ESMAi1KnNPeIilG07YXvdMoq/1ePVjEq55NyS9jpPhq4 z2MD8OsFUpKeMULwpTOvS+AiyHM0E60tLBlCwaxmrfJ9nNP0zi+yLHnrb90IP6rgTs xE5/ez2X23DZJbxmWgiHPJU0ngg8zQarKz3hkovDKNhxts8ygCBA930wsDEuCSayN7 bJ4DnNkrA9pPxbAGs5UL41B5NvOAbN1C1A9MMfQ7WB9kl2ACc90phJlhdn/71B36fa qVdb/QqjmOTZA== Received: by pali.im (Postfix) id DB5F3788; Thu, 13 Apr 2023 23:11:50 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Jaehoon Chung , Peng Fan , Stefan Roese , Angus Ainslie , kernel@puri.sm Cc: u-boot@lists.denx.de Subject: [PATCH u-boot 4/4] board: purism: Use U-Boot mmc function for converting boot part to part access Date: Thu, 13 Apr 2023 23:10:57 +0200 Message-Id: <20230413211057.10975-5-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230413211057.10975-1-pali@kernel.org> References: <20230413211057.10975-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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.8 at phobos.denx.de X-Virus-Status: Clean eMMC Boot Partition Enable bits in mmc->part_config (EXT_CSD[179]) has different coding than eMMC Partition Access bits. Use spl_mmc_emmc_boot_partition() function which does this conversion properly (hopefully). Signed-off-by: Pali Rohár --- board/purism/librem5/librem5.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/board/purism/librem5/librem5.c b/board/purism/librem5/librem5.c index 386ed1b4fb22..36ecac9d9ed0 100644 --- a/board/purism/librem5/librem5.c +++ b/board/purism/librem5/librem5.c @@ -41,11 +41,7 @@ int board_early_init_f(void) #if IS_ENABLED(CONFIG_LOAD_ENV_FROM_MMC_BOOT_PARTITION) uint board_mmc_get_env_part(struct mmc *mmc) { - uint part = EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config); - - if (part == 7) - part = 0; - return part; + return spl_mmc_emmc_boot_partition(mmc); } #endif -- 2.20.1