Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp852464ybg; Wed, 10 Jun 2020 15:49:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxP9buxEJksjH9fgZ0Tmkws+tyy/fdnazyRI4KreJwTS+SAO8krhF1I5wFyLPtAHSCQgApc X-Received: by 2002:a50:9d83:: with SMTP id w3mr4356710ede.95.1591829371488; Wed, 10 Jun 2020 15:49:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591829371; cv=none; d=google.com; s=arc-20160816; b=Iu55dcn4HmgJQJwFwfdLpGm30sWHVCko07B2WIh/3xm1e8L8jv7fji0cORNR/E+SiI GdCOKDSmNfJEaRWnEal1ncHE1ZRH3LaTYaprHbGYaB7TzE6cJIom6i6xS5Q77GaqyY7G NRoBHMq2eTp0L5kkmgrHiQg8EfTUWi6XmFEwzg0qKPKXtESBPoa8KivbXWQGsUt5KyPb feGDPSvhXG/qSObIffYr0Yv+1ojFmvKdMAESpPA4BUdgHBBh9I523BVMHwB9U88VS5LS ldElNlxFEH1XDVNvupttrMqN4WT2TC11kc1+kp25u9LH4n15eZXQk/meyKdc74aXV6tU kjmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=H71MExYm/CGiyWc/B8p0G3A3RqB8QbYwFWDgAbb3BjM=; b=zH9P0cdOnE+QTp8hvAMVmPP/4J3PSB/VGnDgaxHmgOhQ/lhtbsy7Frm0Fnf4CblN4I O7tpMtzwHIdVZDhuEdgxjviJALt5ZNolWQXTzClZ4AGqyczfw6cnKbZ0YdyrXmLJUu9T tGwzuLy7deJ8jHC0qypbjazudz9DmvJO+F6Z3QmcGzKXC8kHvP3lv5gFOzYL6Y77zP5W 26UGfI9eSoh9LRBOx5h7X3/P3f2Trr8T3Uv6eMEPQpZhSq01fO9jvEA/hu8vkaQwY31p 4Sk9xvrABeVT4KdTMzllAgm1lm20KdFHwZGEByMtEg55YrBV9ZRxyzcw5R4jpkIcEg2n pQhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=H+S9mH+I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dx2si884520ejb.170.2020.06.10.15.49.08; Wed, 10 Jun 2020 15:49:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=H+S9mH+I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726608AbgFJWrJ (ORCPT + 99 others); Wed, 10 Jun 2020 18:47:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726301AbgFJWrI (ORCPT ); Wed, 10 Jun 2020 18:47:08 -0400 Received: from mail-qt1-x849.google.com (mail-qt1-x849.google.com [IPv6:2607:f8b0:4864:20::849]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D34A7C03E96B for ; Wed, 10 Jun 2020 15:47:06 -0700 (PDT) Received: by mail-qt1-x849.google.com with SMTP id y25so3230720qtb.6 for ; Wed, 10 Jun 2020 15:47:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=H71MExYm/CGiyWc/B8p0G3A3RqB8QbYwFWDgAbb3BjM=; b=H+S9mH+IiwxAwIQTSovuAEu2EFLyte/T9t8Mco9jzx/THTvUBD5wHEtcNNustYp43W DSCiCYS6v4m7JHRJfIZxXH7KN7DLgQDTC7B8xDTZtkXral/lxUJISHBSRb+VwVqwXFlP WrAssSVfB2Vj+KnFewuA4m02kp+KuEhmWThgB5O25FmeLxTOhRmUXi343gSefNH6/VnI lEa9gW/ptqBD336Eh08d2R6P2UzriNj+oHjp3Jvy41xOLoTQVPr6qmarB4wrmH5C1EVw r3J3n8+JBAwu1TVkokVBXsfyrDnii+NpaRCsUDlj2a86BHTmfaDngC0oD/cTLxsOVo6B TqtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=H71MExYm/CGiyWc/B8p0G3A3RqB8QbYwFWDgAbb3BjM=; b=JEXCZVuJ4pVdb5Toll/v0sPJ1CUyVdUO0qXdQTCxxaPxEKwlZ1mY20fnxwvzk3Yzl6 SOiIkPXBFXo9Vz23kHwGTCYTez+7ZCdKj1jS8AUbv75QSCNP9sFi5S3JGXDcSbtEH/9R WqRf7/YDMp6kCJ9mQlvBMRzBYqeyaWBX6wnYnGmyk/rsIwBNo3jjfL6Mw9pBqbXwJf/c /ED0/UoTswUGOjnaRq7U9bKRRzJa0mcDX36SSmnQRwuCwzN3ST4uDlzz+8leT8etG/rO q1nCD3pqhBtAlw5v1KwY9lRIPYC6i6IqoXuJuVIUXZCVssD6MThkOuXzYh9BaOYb/VFQ HX/A== X-Gm-Message-State: AOAM532FfGMl0baVYpfp8UDd1rmcrkk5wK6jMjtRk7gB48naIFaBfrJG pyW2Y7rtkPBhmqnI4DL/0RsVyv0SM4Nwv5BX3g== X-Received: by 2002:a05:6214:10cb:: with SMTP id r11mr5342385qvs.203.1591829225669; Wed, 10 Jun 2020 15:47:05 -0700 (PDT) Date: Wed, 10 Jun 2020 22:46:49 +0000 Message-Id: <20200610224652.64336-1-luisalberto@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.27.0.278.ge193c7cf3a9-goog Subject: [PATCH] mtd: revert "spi-nor: intel: provide a range for poll_timout" From: Luis Alberto Herrera To: tudor.ambarus@microchip.com Cc: Luis Alberto Herrera , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Mika Westerberg , Jethro Beekman , Boris Brezillon , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This change reverts aba3a882a178: "mtd: spi-nor: intel: provide a range for poll_timout". That change introduces a performance regression when reading sequentially from flash. Logging calls to intel_spi_read without this change we get: Start MTD read [ 20.045527] intel_spi_read(from=1800000, len=400000) [ 20.045527] intel_spi_read(from=1800000, len=400000) [ 282.199274] intel_spi_read(from=1c00000, len=400000) [ 282.199274] intel_spi_read(from=1c00000, len=400000) [ 544.351528] intel_spi_read(from=2000000, len=400000) [ 544.351528] intel_spi_read(from=2000000, len=400000) End MTD read With this change: Start MTD read [ 21.942922] intel_spi_read(from=1c00000, len=400000) [ 21.942922] intel_spi_read(from=1c00000, len=400000) [ 23.784058] intel_spi_read(from=2000000, len=400000) [ 23.784058] intel_spi_read(from=2000000, len=400000) [ 25.625006] intel_spi_read(from=2400000, len=400000) [ 25.625006] intel_spi_read(from=2400000, len=400000) End MTD read Signed-off-by: Luis Alberto Herrera --- drivers/mtd/spi-nor/controllers/intel-spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/spi-nor/controllers/intel-spi.c b/drivers/mtd/spi-nor/controllers/intel-spi.c index 61d2a0ad2131..2b89361a0d3a 100644 --- a/drivers/mtd/spi-nor/controllers/intel-spi.c +++ b/drivers/mtd/spi-nor/controllers/intel-spi.c @@ -292,7 +292,7 @@ static int intel_spi_wait_hw_busy(struct intel_spi *ispi) u32 val; return readl_poll_timeout(ispi->base + HSFSTS_CTL, val, - !(val & HSFSTS_CTL_SCIP), 40, + !(val & HSFSTS_CTL_SCIP), 0, INTEL_SPI_TIMEOUT * 1000); } @@ -301,7 +301,7 @@ static int intel_spi_wait_sw_busy(struct intel_spi *ispi) u32 val; return readl_poll_timeout(ispi->sregs + SSFSTS_CTL, val, - !(val & SSFSTS_CTL_SCIP), 40, + !(val & SSFSTS_CTL_SCIP), 0, INTEL_SPI_TIMEOUT * 1000); } -- 2.27.0.278.ge193c7cf3a9-goog