From patchwork Wed Feb 17 08:27:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 583969 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 129CF140271 for ; Wed, 17 Feb 2016 19:28:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 10C94A7531; Wed, 17 Feb 2016 09:28:09 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NT-Gex1XrScC; Wed, 17 Feb 2016 09:28:08 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 819FDA748A; Wed, 17 Feb 2016 09:28:08 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 99E87A748A for ; Wed, 17 Feb 2016 09:28:04 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id REnuHrjKKadW for ; Wed, 17 Feb 2016 09:28:04 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by theia.denx.de (Postfix) with ESMTPS id 1A88EA745C for ; Wed, 17 Feb 2016 09:28:01 +0100 (CET) Received: by mail-pa0-f54.google.com with SMTP id fl4so7531771pad.0 for ; Wed, 17 Feb 2016 00:28:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NCC2JyGmbjf9BSJ1JUnGFPNImsAJECm+NgPZdSFZPnU=; b=Db/vtgb9sj94t0heAJjkNsDuLxq9A82liXy1LxAqCquQI/IzKqYsc2P43SzplboJB7 G3bnNGi/Cs32NVkcqCCZLacJwBlREMWf87FDAyckuLD1FTl0ey2YIMO+eRnbynnTNrdA qw4swxsBUwLnaMmv0BoI3kVmd9eBrguXmrIOS379jGe1U+GzXQA7d30D+RVoyEUHGjP8 T5GR2dQgk6WHXMcwDAestV5xb8wpjZy9mw9vm8eYx8t/kmLQcQl2+z21hwo0OYJeDNjM ubKZxXGO+ZNW34rO+yRrqp4BaE3QhUml4k3lw4K3Yyr+eSww4CLfsAk2lpHJPqAGDITd RYQg== X-Gm-Message-State: AG10YORTi5xzKA1D8KnDfRL59hloE+GN15167ZtHejUI+lY+yXh9KRvwWSbtUsU85asXwA== X-Received: by 10.67.1.129 with SMTP id bg1mr326501pad.63.1455697680097; Wed, 17 Feb 2016 00:28:00 -0800 (PST) Received: from Jubuntu.amcc.com ([182.73.239.130]) by smtp.gmail.com with ESMTPSA id c24sm611998pfj.41.2016.02.17.00.27.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Feb 2016 00:27:58 -0800 (PST) From: Jagan Teki To: u-boot@lists.denx.de Date: Wed, 17 Feb 2016 13:57:44 +0530 Message-Id: <1455697664-31042-1-git-send-email-jteki@openedev.com> X-Mailer: git-send-email 1.9.1 Cc: Jagan Teki Subject: [U-Boot] [PATCH v7 77/77] x86: Drop using spi_flash_dm_ops X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" spi_flash_erase_dm spi_flash_write_dm These spi_flash_dm_ops never no longer available on new spi-nor changes, so use spi_flash_erase/write ops with mtd uclass changes. Cc: Simon Glass Cc: Bin Meng Signed-off-by: Jagan Teki --- Changes for v7: - newly added patch This patch is on top of spi-nor core changes, will send this again with the series. arch/x86/lib/mrccache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c index 8c08c14..dca3d84 100644 --- a/arch/x86/lib/mrccache.c +++ b/arch/x86/lib/mrccache.c @@ -109,6 +109,7 @@ static struct mrc_data_container *find_next_mrc_cache(struct mrc_region *entry, int mrccache_update(struct udevice *sf, struct mrc_region *entry, struct mrc_data_container *cur) { + struct mtd_info *mtd = dev_get_uclass_priv(sf); struct mrc_data_container *cache; ulong offset; ulong base_addr; @@ -139,7 +140,7 @@ int mrccache_update(struct udevice *sf, struct mrc_region *entry, debug("Erasing the MRC cache region of %x bytes at %x\n", entry->length, entry->offset); - ret = spi_flash_erase_dm(sf, entry->offset, entry->length); + ret = spi_flash_erase(mtd, entry->offset, entry->length); if (ret) { debug("Failed to erase flash region\n"); return ret; @@ -150,8 +151,7 @@ int mrccache_update(struct udevice *sf, struct mrc_region *entry, /* Write the data out */ offset = (ulong)cache - base_addr + entry->offset; debug("Write MRC cache update to flash at %lx\n", offset); - ret = spi_flash_write_dm(sf, offset, cur->data_size + sizeof(*cur), - cur); + ret = spi_flash_write(mtd, offset, cur->data_size + sizeof(*cur), cur); if (ret) { debug("Failed to write to SPI flash\n"); return ret;