Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1022470imm; Tue, 5 Jun 2018 08:01:17 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIMlYPczq7pyG8q6M9nKuny+2xP8KDAOoEw0bY4BMhFxv9vFECb4sLDjyJ6cZI1GHq/hlO/ X-Received: by 2002:a65:42c2:: with SMTP id l2-v6mr21036051pgp.237.1528210877066; Tue, 05 Jun 2018 08:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528210877; cv=none; d=google.com; s=arc-20160816; b=uac9MZCfJ6bCyrMiFSKrobrmIeHJ2pqcVYM6Db62DP9zbw3G4cfCqpVt3XtbXUG5Jj mGQg6JJ4MzSeES/HpFeGn3MURuEIUH/FW76mm8xzA6nF+Lz0CwX0Mfs6Nw0c801pLtr2 2XyUM0BEkv8H8Oq03IkKJNtTf/cH0Cl93NhdJcei5HvhNCjjpZkQ0ZNYlO+LuefAsB/R brxS8ez9sTsdsl2ZwKMB9oci9hOrVfBV4sLunnMLxMYmvYGH5ptOb/iW7pAkqPkzbtBg Xqr/OZBV/JOdLKlFzyd8yC3M3nw0qxLt7qi+14z/e1mR/yP8jIKu/imaBZEEzF0ygiNB pVxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=IOJ49uE8dTUxQZOjQBjIay0u0LQ8RsH1mY0kfsVdiN0=; b=OlGQdF3hz5GDPDp57XlbxODOjAbpynDkwNnxxQqmp85+fIsvdBZs7EBUVXh6N20o+E ECr17zaBpcyQQtG2lDmhJKlPN0ZHc8pLsCvl9PVGiliJz1Y3n1S+1UVHRl6hdQQjB+Hs Up7gNWGPOR2XFnkHAWRF8liU5q6YnOeipY3n6hD96HyxiepH1HB+Hhb5OTVWoTHBZMoR lLW86KJtUrULFiLGfyN0+WLXdo/Wn2XRnu5uoLhQ/sqNG+HbOKRtG5SKAasGanVv+s6T KaCm5Zn1MeioQbGd2sQKIcqmTFIlQPVTgbyWfmI6oFUL3bUj/j08uV4wHE/UzzqFJbX6 7F6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z15-v6si10446010pll.490.2018.06.05.08.01.02; Tue, 05 Jun 2018 08:01:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752598AbeFEPA0 (ORCPT + 99 others); Tue, 5 Jun 2018 11:00:26 -0400 Received: from mail.bootlin.com ([62.4.15.54]:49226 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752057AbeFEPAZ (ORCPT ); Tue, 5 Jun 2018 11:00:25 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id CDC7C2069C; Tue, 5 Jun 2018 17:00:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (AAubervilliers-681-1-125-111.w90-88.abo.wanadoo.fr [90.88.63.111]) by mail.bootlin.com (Postfix) with ESMTPSA id 5597B203EC; Tue, 5 Jun 2018 17:00:23 +0200 (CEST) Date: Tue, 5 Jun 2018 17:00:23 +0200 From: Boris Brezillon To: Frieder Schrempf Cc: linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org, dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, richard@nod.at, miquel.raynal@bootlin.com, broonie@kernel.org, david.wolfe@nxp.com, fabio.estevam@nxp.com, prabhakar.kushwaha@nxp.com, yogeshnarayan.gaur@nxp.com, han.xu@nxp.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/11] spi: Add a driver for the Freescale/NXP QuadSPI controller Message-ID: <20180605170023.24eeaaaa@bbrezillon> In-Reply-To: <1527686082-15142-4-git-send-email-frieder.schrempf@exceet.de> References: <1527686082-15142-1-git-send-email-frieder.schrempf@exceet.de> <1527686082-15142-4-git-send-email-frieder.schrempf@exceet.de> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 30 May 2018 15:14:32 +0200 Frieder Schrempf wrote: > + > +static void fsl_qspi_read_ahb(struct fsl_qspi *q, const struct spi_mem_op *op) > +{ > + static int seq; > + > + /* > + * We want to avoid needing to invalidate the cache by issueing > + * a reset to the AHB and Serial Flash domain, as this needs > + * time. So we change the address on each read to trigger an > + * actual read operation on the flash. The actual address for > + * the flash memory is set by programming the LUT. > + */ > + memcpy_fromio(op->data.buf.in, > + q->ahb_addr + > + (seq * q->devtype_data->ahb_buf_size), > + op->data.nbytes); > + > + seq = seq ? 0 : 1; We should get rid of this hack. Yogesh, Han, do you know if there's an easy way to invalidate the AHB buffer without resetting the IP? > +}