From patchwork Sun Oct 27 15:53:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1185050 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="fIB6gQFv"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 471MtS6XQGz9sP4 for ; Mon, 28 Oct 2019 02:57:20 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 8AEA7C21DCA; Sun, 27 Oct 2019 15:56:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B94BDC21DAF; Sun, 27 Oct 2019 15:55:05 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1ECD9C21DF9; Sun, 27 Oct 2019 15:55:02 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id 08778C21DA1 for ; Sun, 27 Oct 2019 15:54:29 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id i26so7710853iog.9 for ; Sun, 27 Oct 2019 08:54:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cT4uVWA5Xw7NGF7bINDXuaiLO+vhHDfRIiChhxv3W1w=; b=fIB6gQFvCqPWkYPxlrz7YBsEbfCdPA3jc/sS9ccm1xrz6rWBMK6no8EyzI3P2jxYUQ H+FF47ecLa6IP2vz/Rd8hLIW9bhK6Y4d8NjZ7Mb3iPk+u+Gl6PBgdvyj9WecaP71LMKU VBxcZk14yAXALfAH3WIdeWqCWnPj2QcNgLV3k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cT4uVWA5Xw7NGF7bINDXuaiLO+vhHDfRIiChhxv3W1w=; b=C2PkrDWvwwVgr1avu0ediq7Bwq0uaJofPQU9DHzJDif9zBw1Z3WA1O/chzVB+KuFFL amadM/76GldAICGQ4brXzQrjSqJzomkQdEao4j3gChbdpavpzbM82du93akY05lNZf1M t+6NYn2Lc5KadF4o0MJhy3Ojqu2z/isaRE7iE7NWMs9auQyW3FqKq3WM9HB2Bt98Ed+H 1rBmhQQWSnZdZX6WLSBcDoSPZWS+n4YYdkkIX7sXZ3jH76W+hl3oXc5jfTMZoyjwtv14 GZT5a9ZMQxRtduUnXCVb+lowyg2dW2YwylA7Nmn+h5+SLYczJak/wBn0u/EK8RJHF64M md/w== X-Gm-Message-State: APjAAAXXGbblaZmRujOEbFl8ly81Ex3aZg9vVNpqFLNRlsg21rVl5kt2 6zerQE9Xp1EEfATcKsBUMkCldNv23jVamg== X-Google-Smtp-Source: APXvYqwtosmnKxmqxxQzis5LCTYzvmRyROXK/OzGQHr1D97Y8HUFZ7MFvyPPVgdsYFJ3q6HHSoUtrQ== X-Received: by 2002:a02:330e:: with SMTP id c14mr13635172jae.5.1572191667797; Sun, 27 Oct 2019 08:54:27 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id n3sm1215070ilm.8.2019.10.27.08.54.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2019 08:54:27 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 27 Oct 2019 09:53:42 -0600 Message-Id: <20191027155410.187957-2-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.rc0.303.g954a862665-goog In-Reply-To: <20191027155410.187957-1-sjg@chromium.org> References: <20191027155410.187957-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Tom Rini , Tien Fong Chee , Jagannadha Sutradharudu Teki Subject: [U-Boot] [PATCH 02/30] spi: Allow separate control of SPI_FLASH_TINY for SPL/TPL X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" In some cases SPL needs to be able to erase but TPL just needs to read. Allow these to have separate settings for SPI_FLASH_TINY. Signed-off-by: Simon Glass --- common/spl/Kconfig | 10 ++++++++++ drivers/mtd/spi/Makefile | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 86d7edfee1..604bb69d69 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -1423,6 +1423,16 @@ config TPL_SPI_FLASH_SUPPORT Enable support for using SPI flash in TPL. See SPL_SPI_FLASH_SUPPORT for details. +config TPL_SPI_FLASH_TINY + bool "Enable low footprint TPL SPI Flash support" + depends on TPL_SPI_FLASH_SUPPORT && !SPI_FLASH_BAR + default y if SPI_FLASH + help + Enable lightweight TPL SPI Flash support that supports just reading + data/images from flash. No support to write/erase flash. Enable + this if you have TPL size limitations and don't need full-fledged + SPI flash support. + config TPL_SPI_LOAD bool "Support loading from SPI flash" depends on TPL_SPI_FLASH_SUPPORT diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile index 20db1015d9..df04297671 100644 --- a/drivers/mtd/spi/Makefile +++ b/drivers/mtd/spi/Makefile @@ -8,7 +8,7 @@ spi-nor-y := sf_probe.o spi-nor-ids.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o -ifeq ($(CONFIG_SPL_SPI_FLASH_TINY),y) +ifeq ($(CONFIG_$(SPL_TPL_)SPI_FLASH_TINY),y) spi-nor-y += spi-nor-tiny.o else spi-nor-y += spi-nor-core.o