Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp5308451imm; Tue, 26 Jun 2018 09:06:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLp0urd9TImNeb4Q4CLvAFFJQeQuc7P5tEg9KdogLPtO/7mX430Goiwud8FyeboBtVOOzen X-Received: by 2002:a63:5014:: with SMTP id e20-v6mr1912625pgb.133.1530029160913; Tue, 26 Jun 2018 09:06:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530029160; cv=none; d=google.com; s=arc-20160816; b=vmBnknkPnljr+LIswdPepaB+ZKZJKyCaPXflN3QViRbGlyCfeyxQyUCo9H3aAJaVT8 tHAg7MBUMO+rfHSc/vtByIfchTf+N74aJtQWtGRepTklyGF0Aj72KuBQuXYjrsyYhpvg EybsfS1QeDvvY64diI3wXa0fqcnaSydgIwODTAHZcPWhYp2Yx59rnzuSIFdJxemTrlVB XwySy9r0LmLzBS+pIwgGQenOzcn/WTIT2ECK2cyw8nKuDumsuqecKY1jYbLxi5cz6aZI BweioWyl6qmURyG081k1BGpR0mk9lDkCh9A/hmNNP7uyu0Czs8RAORO+vQb3ZdJ7mMQG CPug== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:subject:from:arc-authentication-results; bh=9PF5kMadP321yXeVONs7HPo2AJRuYlmmMsEWyMbs8VE=; b=UUEu0x6gRqE3Ehj8Imbs5VnNinUtpNvhdRIUIo/QJEwXr8Rg582rZ4YhhdtKz+YLAK N+1hHhckOOO62f865SYVZX3WHw1w+W9UKnB3kk4i5dlLRKYmn2WtpbRTkST8gpNO2kTx Wd7CMJTmtPMEHaC/vAn5Noxs7/iqmS9/Gbk9sG5if4LTQ3gzNPNy62n5IWmhypq+84Uh Kpu07tup0Vnev4EDCJjrxeb/AuzVYo/Yodpkt2sMZ48ArTM61Jf88JxT6ajQlJI+3Rqu U2AaZwPN4+ndziByb7NMeNsKXrhQ9DOffFrRFiC1jV9nH08fQ1E6zjQAPdnycBsXYAuL QetA== 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 83-v6si1473514pgg.663.2018.06.26.09.05.46; Tue, 26 Jun 2018 09:06:00 -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 S935193AbeFZOoe (ORCPT + 99 others); Tue, 26 Jun 2018 10:44:34 -0400 Received: from esa1.microchip.iphmx.com ([68.232.147.91]:34813 "EHLO esa1.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934936AbeFZOoc (ORCPT ); Tue, 26 Jun 2018 10:44:32 -0400 X-IronPort-AV: E=Sophos;i="5.51,274,1526367600"; d="scan'208";a="16369667" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES128-SHA; 26 Jun 2018 07:44:31 -0700 Received: from localhost.localdomain (10.10.76.4) by CHN-SV-EXCH01.mchp-main.com (10.10.76.37) with Microsoft SMTP Server id 14.3.352.0; Tue, 26 Jun 2018 07:44:30 -0700 From: Tudor Ambarus Subject: Re: [RFC PATCH 1/2] spi: Add QuadSPI driver for Atmel SAMA5D2 To: Boris Brezillon , Piotr Bugalski CC: Mark Brown , , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , , , , , Rob Herring , Mark Rutland , Nicolas Ferre , Alexandre Belloni , Cyrille Pitchen , Piotr Bugalski References: <20180618162124.21749-1-bugalski.piotr@gmail.com> <20180618162124.21749-2-bugalski.piotr@gmail.com> <20180621233321.0f25f572@bbrezillon> <20180622093905.62a3b936@bbrezillon> Message-ID: <455adb76-530a-1fd5-303c-cfa158ad7870@microchip.com> Date: Tue, 26 Jun 2018 17:44:26 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20180622093905.62a3b936@bbrezillon> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Piotr, General things to consider for the limitation in performance: - is the serial flash memory operating in Quad SPI? - QSCLK should be as high as possible - transfer delays - I checked them, they have default values, we should be good. - use DMA, as you suggested On 06/22/2018 10:39 AM, Boris Brezillon wrote: > [...] > >>>> +/* >>>> + * Atmel SAMA5D2 QuadSPI driver. >>>> + * >>>> + * Copyright (C) 2018 Cryptera A/S >>> >>> A non-negligible portion of this code has been copied from the existing >>> driver. Please keep the existing copyright (you can still add Cryptera's >>> one). >>> >> >> Technically this driver were written from scratch, with spi-fsl-qspi >> as example of new interface. Hence the name and code structure. >> But it's the same peripheral as Atmel's driver uses so code looks >> similar. I can unify the code to make comparsion even simpler and >> then update copyright. > > Hm, ok. Some constructs really looked like they were copied > from the old driver, hence my comment. I'll let Nicolas give his > opinion on this aspect. This driver will be a conversion of the legacy one to the spi-mem interface. I would keep the legacy copyright and add Cryptera's below, as Boris suggested. [...] >>>> +#define QSPI_SR_CMD_COMPLETED (QSPI_SR_INSTRE | QSPI_SR_CSR) >>> >>> Do you really to wait for both INSTRE and CSR to consider the command >>> as complete? >>> >> >> This part were really copied from Atmel driver. I wasn't sure so I >> used tested solution. > > Okay. I guess that's a question for Cyrille and/or Tudor then. We have to wait for both INSTRE and CSR. Best, ta