Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3532606img; Mon, 25 Mar 2019 12:13:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEMemwNyrt82CqOarruwyDeVIr3Ansf/amvvOMSURIjrc5s+3h7+UpwRcWQSHvlpWfQ6ZS X-Received: by 2002:a63:e402:: with SMTP id a2mr15954484pgi.268.1553541182997; Mon, 25 Mar 2019 12:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553541182; cv=none; d=google.com; s=arc-20160816; b=pAO4tjGnq5nnTzVFsOZLImr17oaRjxyiSx3MRTHJ05gNXEd5S9jwbMuBDIxO9BlyXm pasl4A3uSmNdzdw/vjM2B/IMHNhhoJnwv0+Iti66s4ZCSHmKgx9PjPcxXcPXUJ4+/coo HHAVzYMa2U8ub5WODUGVr+ra6mL3Zd7LyIMfL/P0jVOMjaUkQDwpbQwr5G01BwANe/NO iOF2Mvx432p3+Z8190i2GGfmfwh7YjGQjjC4CNkRB8hCw7yP+qVC93Lg+IRM8MQhbBO8 QBqD+fY/pTnKx4QxUer3AGUYqH1sIpe0EwU/vMtj0NjnjikMFdVhPrIv7DqH2hz0iTQy 6f6A== 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:organization:from:references:cc:to:subject :dkim-signature; bh=nxeN+I2Sn1SQmMtA5hqUZfutWoWefVTjxJdbXNva3OE=; b=tSris/ShJ3buUKJWTexsvBLUTvbHsATGS2pW/SDAOu+kaQOB/DBr3PSTxxJPkoExNg e9jvWkIoCCTQZPr2MKX861si0yKE+SsJuwCiahMQRkWpP4CnetiXb749e12xM9zibyks lfTWCHN6MV8z1JyKM6fnR7TuRtNtLN6xQtFH/b9oMTRstcU6ffpZZ26KjgAsQHJsOn8b FlWj9LXgqBxiGay/VQMIVHVux/w3YtYEXBYBJg0m3924TUyYfJtild7+rCdSiUrOkjnQ 20kcRpL1cZTeeFJZfYoStsFW0Cc7mkcx9qMafqxwSTK0Uj7m0XY4YodhKfA860nf0kdy ztCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=PJ0j7D3I; 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 1si15487193plw.242.2019.03.25.12.12.47; Mon, 25 Mar 2019 12:13:02 -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; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=PJ0j7D3I; 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 S1729749AbfCYTMO (ORCPT + 99 others); Mon, 25 Mar 2019 15:12:14 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45774 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729552AbfCYTMO (ORCPT ); Mon, 25 Mar 2019 15:12:14 -0400 Received: by mail-lf1-f66.google.com with SMTP id 5so6824679lft.12 for ; Mon, 25 Mar 2019 12:12:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nxeN+I2Sn1SQmMtA5hqUZfutWoWefVTjxJdbXNva3OE=; b=PJ0j7D3IJUdSdydPjcL9OYtBRN7cuROwz4geph+U5FEqwskK5sGVGKGGepmTdMkUNi PDirk/z0slq55/eCXOe9bb+0j//BuMcIPqOaM4cd5rrETvq1tDIDy9+/rhxMMHOIRa8P uBMgJT3luUsZ+cM2tAloOCqyMgo/XGDeG1eczVO2cbUdk8d9o8yvJD5wX/OCSz3rlIKu 4tieTAOsD7QOYkw9WAKzCPcPdtgEheZyuvShqQWLq7OYJ89dx/PtotSiveihQf2WwoqZ s8yXnw98e9VtsG+VXXNwydKZaSTHuVp28imhmhLaRdoei89cnVtrMviZfIfy1F5q6n5h pTbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=nxeN+I2Sn1SQmMtA5hqUZfutWoWefVTjxJdbXNva3OE=; b=WxdGbPHowPywDNGgacTUXttezdjpuM92us5kXCwYaEDojrCG+LWxckYV9O8ne9/1yY skBMyNNDA1+XwxT2J5dLbj+yhjqJ3i2ddtuH/+IDePZeqS8YTw4CaheXiWUS6Mrbg3pX +YxMF9WTVMCv/uy/ZSm6/RwwtDVRE607tQVF53Grve9DvpCPhOcrPOHrw2CNYH4G/0jS gb+HpDsdoGmHR4qZpCR4th0MV5l3istqPG1ttLwB/wFa1u0XJcJfk6LQVlSw2oKIXacE y8LSjbyaanIdnpTIyT0w6lCfiJtVibzZkoJAsy6idF7ewCqBmMbQUTfSbQJgb3C4KNmU LlCA== X-Gm-Message-State: APjAAAXgiqfHqXgtgWrSrTadlkqPLCZeRKAf14YlDjtXeyHZ6UtHP1nN KRiM2uYf4rmaBMAweYLz/2iIOg== X-Received: by 2002:a19:4283:: with SMTP id p125mr13421842lfa.3.1553541132291; Mon, 25 Mar 2019 12:12:12 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.83.129]) by smtp.gmail.com with ESMTPSA id t81sm3467841lff.21.2019.03.25.12.12.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Mar 2019 12:12:11 -0700 (PDT) Subject: Re: [PATCH v8 1/2] spi: Add Renesas R-Car Gen3 RPC-IF SPI controller driver To: masonccyang@mxic.com.tw Cc: bbrezillon@kernel.org, broonie@kernel.org, Geert Uytterhoeven , Simon Horman , juliensu@mxic.com.tw, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-spi@vger.kernel.org, marek.vasut@gmail.com, zhengxunli@mxic.com.tw References: <1548658158-5460-1-git-send-email-masonccyang@mxic.com.tw> <1548658158-5460-2-git-send-email-masonccyang@mxic.com.tw> <75c4642b-536e-f596-158d-387a63a5f6c5@cogentembedded.com> From: Sergei Shtylyov Organization: Cogent Embedded Message-ID: <2fa6af66-de08-be37-7cdf-ccbf1e50ceb0@cogentembedded.com> Date: Mon, 25 Mar 2019 22:12:10 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-MW Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On 03/25/2019 11:28 AM, masonccyang@mxic.com.tw wrote: >> > +static void rpc_spi_mem_set_prep_op_cfg(struct spi_device *spi, >> > + const struct spi_mem_op *op, >> > + u64 *offs, size_t *len) >> > +{ >> > + struct rpc_spi *rpc = spi_controller_get_devdata(spi->controller); >> >> > + if (op->dummy.nbytes) { >> > + rpc->smenr |= RPC_SMENR_DME; >> > + rpc->dummy = RPC_SMDMCR_DMCYC(op->dummy.nbytes); >> >> SMDMCR.DMCYC is in bits -- you forgot to multiply by 8. > > ? > > It's dummy cycles setting, i.e,. 0 is 1 cycle dummy and Yeah, I should've written "cycles", sorry about that. > max is 0x13 for 20 cycle dummy, depends on transfer bit size setting = 1, 4 or 8. > right ? Probably... [...] MBR, Sergei