Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3277900ima; Tue, 23 Oct 2018 03:23:49 -0700 (PDT) X-Google-Smtp-Source: AJdET5cPxLpns6XJybWtPKX/lXGYPC7TdUtNPXiSa7GZMaxM1m86ow/YAyKbXGC1N3t/HD9jbEst X-Received: by 2002:a17:902:1744:: with SMTP id i62-v6mr763413pli.250.1540290229018; Tue, 23 Oct 2018 03:23:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540290228; cv=none; d=google.com; s=arc-20160816; b=DfHkqixU+JKLuTTOBO8p/H7K7LmadhURCJEbqQHgQvkmLKD8gCmUmXYgYGuase34hL vo4FOtqjjON/xBpWEwvrRrRvRsDn2PtST26KvBgnXCCBT3nX8+aULJGrWmE91juMqXgk wPVmzOcGhRmol/Ea7gsITVkw5U+wT/u47i7k/EyE8WEgQS6b3vhz3Ua9ZwP11KD3hK7G jJ25VhdgUJZyCQlCwptCnw/HLPPtYOo8vPWbHdGw7xpwXeg9HpKHpgTXaq+sXIZz7XbM 1KkTdzBKlJucqiHS2NhiLXvOV/O7VkaoRC9I5OE0IrnpVKry7Y94nKAGgE8LkqdPN2/o 91uQ== 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; bh=WTFqQsgOn7hO/LNVVEgya74hhy2xtIttlnc0i4xLrgE=; b=Bys/6VkW6xvXNjeptvsL74gRgOSvioxACG8covzLDRSEFv4rmgFTk54RetBVUL07uw 9J9S7EuFn1g9t40AuMbjuAImxTOX7VnAlQKoMJi87lGlmVYpp5wEp1fdo79yxNIAI0eC nQ8nflyZWrq18SQ7HvoExjrrSGUgTenQVb1caImluYHJq+k92UWY0BIkVnWOOo/VyXVA +YjL+nv6C9Q00/Q3YrpIa3iKkFXdcdd/8JTvY1An5x6lknEv5rN/Akt6OnFTSDhvCs9m 8UX5WMF+xR6Lh5Ki5bCVhJ6xvG+yI7yUwhYwT3h4C5oSMCXLoNsjNzbEF/xtK6sxWqEt 06Gg== 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 h1-v6si868157pgs.493.2018.10.23.03.23.33; Tue, 23 Oct 2018 03:23:48 -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 S1728727AbeJWSLm (ORCPT + 99 others); Tue, 23 Oct 2018 14:11:42 -0400 Received: from mail.bootlin.com ([62.4.15.54]:42969 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726277AbeJWSLm (ORCPT ); Tue, 23 Oct 2018 14:11:42 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 3B7F6208BE; Tue, 23 Oct 2018 11:49:01 +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, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (aaubervilliers-681-1-25-52.w90-88.abo.wanadoo.fr [90.88.145.52]) by mail.bootlin.com (Postfix) with ESMTPSA id CA04120701; Tue, 23 Oct 2018 11:49:00 +0200 (CEST) Date: Tue, 23 Oct 2018 11:49:00 +0200 From: Boris Brezillon To: Yogesh Narayan Gaur Cc: "linux-mtd@lists.infradead.org" , "broonie@kernel.org" , "marek.vasut@gmail.com" , "vigneshr@ti.com" , "linux-spi@vger.kernel.org" , "devicetree@vger.kernel.org" , "robh@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "computersforpeace@gmail.com" , "frieder.schrempf@exceet.de" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3 2/7] spi: spi-mem: add support for octo mode I/O data transfer Message-ID: <20181023114900.2ff4cbfc@bbrezillon> In-Reply-To: <1540287311-1572-3-git-send-email-yogeshnarayan.gaur@nxp.com> References: <1540287311-1572-1-git-send-email-yogeshnarayan.gaur@nxp.com> <1540287311-1572-3-git-send-email-yogeshnarayan.gaur@nxp.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; 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 Tue, 23 Oct 2018 09:37:13 +0000 Yogesh Narayan Gaur wrote: > Add support for octo mode I/O data transfer in spi-mem framework. > > Signed-off-by: Yogesh Gaur Reviewed-by: Boris Brezillon > --- > Changes for v3: > - Modified string 'octal' with 'octo'. > Changes for v2: > - Patch added in v2 version. > > drivers/spi/spi-mem.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c > index c6bdea7..2379efc 100644 > --- a/drivers/spi/spi-mem.c > +++ b/drivers/spi/spi-mem.c > @@ -12,7 +12,7 @@ > > #include "internals.h" > > -#define SPI_MEM_MAX_BUSWIDTH 4 > +#define SPI_MEM_MAX_BUSWIDTH 8 > > /** > * spi_controller_dma_map_mem_op_data() - DMA-map the buffer attached to a > @@ -121,6 +121,13 @@ static int spi_check_buswidth_req(struct spi_mem *mem, u8 buswidth, bool tx) > > break; > > + case 8: > + if ((tx && (mode & SPI_TX_OCTO)) || > + (!tx && (mode & SPI_RX_OCTO))) > + return 0; > + > + break; > + > default: > break; > }