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 1FB4CC6FD18 for ; Wed, 29 Mar 2023 19:29:25 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5BB6F86032; Wed, 29 Mar 2023 21:28:51 +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="KKQVxrop"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3400985B93; Wed, 29 Mar 2023 21:28:23 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (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 E16B085DD9 for ; Wed, 29 Mar 2023 21:28: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=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 937AB61DF6; Wed, 29 Mar 2023 19:28:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0DC1C433A4; Wed, 29 Mar 2023 19:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680118085; bh=VJGRu1YDTC6nCPEpmXbl56BInii67N5Nr+jrv58ju/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KKQVxropMKJN3Xr1RtWrBMUCQJzNpCL9mE7Cw6BxEJ2qCwkP21LkklB7RbhDHVV/t KXbNZd/7EqK8EJNG7+6EO20xO6i4QKN+cnzHbOhpLSnBv/Dd/ziMSUciA+uciL/+3G BPlKSGSbO9FCFKUURNDraKZF1fVJNO2SqB4+V55XpkUtEPtCiFqoCr7czNoMkgUSaa 6O3+Js1CRWDwZ5YLzS3AOHI5uuyXFkWiAgyXcHGxKpKQgRSzgsrX/+viYmzE2IngKH erWf34xrWdoRDoBlqhFtJWGt5y8eSO6JfJDg2MlHedjwMEpEyop672H1nLwFazv4mv rJuom51MQFYXg== Received: by pali.im (Postfix) id 1A5AF1061; Wed, 29 Mar 2023 21:28:03 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Martin Rowe , Tony Dinh , Stefan Roese , Chris Packham , Baruch Siach Cc: u-boot@lists.denx.de Subject: [PATCH u-boot-mvebu 7/7] arm: mvebu: spl: Allow to build SATA kwbimage for 4K Native disks Date: Wed, 29 Mar 2023 21:25:58 +0200 Message-Id: <20230329192558.12417-8-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230329192558.12417-1-pali@kernel.org> References: <20230329192558.12417-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 Add a new config option CONFIG_MVEBU_SPL_SATA_BLKSZ for specifying block size of SATA disk. This information is used during building of SATA kwbimage and must be correctly set, otherwise BootROM does not load SPL. For 4K Native disks CONFIG_MVEBU_SPL_SATA_BLKSZ must be set to 4096. Signed-off-by: Pali Rohár --- arch/arm/mach-mvebu/Kconfig | 10 ++++++++++ arch/arm/mach-mvebu/Makefile | 5 +++++ arch/arm/mach-mvebu/kwbimage.cfg.in | 3 +++ 3 files changed, 18 insertions(+) diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 1f0dbef1c68a..e6e911f8af7d 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -380,6 +380,16 @@ config MVEBU_SPL_NAND_BADBLK_LOCATION Value 0x0 = SLC flash = BBI at page 0 or page 1 Value 0x1 = MLC flash = BBI at last page in the block +config MVEBU_SPL_SATA_BLKSZ + int "SATA block size" + depends on MVEBU_SPL_BOOT_DEVICE_SATA + range 512 32768 + default 512 + help + Block size of the SATA disk in bytes. + Typically 512 bytes for majority of disks + and 4096 bytes for 4K Native disks. + config MVEBU_EFUSE bool "Enable eFuse support" depends on HAVE_MVEBU_EFUSE diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index 90f88337bc10..0584ed2be5b4 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile @@ -73,6 +73,11 @@ KWB_CFG_NAND_BLKSZ = $(CONFIG_SYS_NAND_BLOCK_SIZE) KWB_CFG_NAND_BADBLK_LOCATION = $(CONFIG_MVEBU_SPL_NAND_BADBLK_LOCATION) endif +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA),) +KWB_REPLACE += SATA_BLKSZ +KWB_CFG_SATA_BLKSZ = $(CONFIG_MVEBU_SPL_SATA_BLKSZ) +endif + ifneq ($(CONFIG_SECURED_MODE_IMAGE),) KWB_REPLACE += CSK_INDEX KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX) diff --git a/arch/arm/mach-mvebu/kwbimage.cfg.in b/arch/arm/mach-mvebu/kwbimage.cfg.in index 90cf00c5b984..588c259202bb 100644 --- a/arch/arm/mach-mvebu/kwbimage.cfg.in +++ b/arch/arm/mach-mvebu/kwbimage.cfg.in @@ -16,6 +16,9 @@ VERSION 1 #@NAND_BLKSZ #@NAND_BADBLK_LOCATION +# SATA configuration +#@SATA_BLKSZ + # Enable BootROM output via DEBUG flag on SoCs which require it #@DEBUG -- 2.20.1