Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10465861imu; Thu, 6 Dec 2018 01:22:08 -0800 (PST) X-Google-Smtp-Source: AFSGD/VlmKvMD5rLwRvSQL9uOBSgXo0lrECYZjYg7u/uBrbqJHTDNZscI/uuCOmDJhaP69F9+776 X-Received: by 2002:a62:83ce:: with SMTP id h197mr27574217pfe.187.1544088128702; Thu, 06 Dec 2018 01:22:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544088128; cv=none; d=google.com; s=arc-20160816; b=LK9FBRUJxUBiZuMiCGREHGz+4lQQAG6aqIGrnbru+sd4riQU/kj7W0tCgxf7wWMdrD md7OiaWj4l1g8vrxSur2fTDvuKIODXJfPIehvCioCrgqcbrCbqBjDmcNJEgPq/SLFdhf wLz+BxMGZKT37zMMIH3XdqmfbCG4ZsQBAk0WidFwTV99Eq21choXe1tXBCJT48L24d6d GwFk4LSMqIKCgo9JIJIORviYfDFHIiULNaXUD4fhWV4SwEVGqRDZDuSHFfQv3WcTnYfJ UxD7WOjb2juWVv4iRX1GfY7fPrILeOIPUfDAXmAAZxmF8NtxsHh/cUfHlNEKV03DHIY7 6TtA== 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:from:references:cc:to:subject:dkim-signature; bh=saQamXVIK+Euaf/h7+XQjCq0HygCncinysq+4JhiIDs=; b=JWiMsDRYbVng34s2xl6ZNaI8p3q4BGuyCMtD6p22eqAgIQJdGpD8bkD+FY9+SEgQwy 0/tZiXpzFD/gMkpYOjmev9uDc68c+ffx/fWQ5StOdIG/Dpu5HxYlJa8oufGbFcgPiYjx JpR/59eFN1fLXK1I7tSJSAn+gcQByQDSvoLlQq4aunjgJSLwp4d6aye9k9wJY20Hov3k tFyJ3sOUguovzq0AWUZzHO1m6DYJyIEpzLlaokqBakLVeEQBWM0qeS9Q8aASVY9h3XgO j0RIOgCSedxunKeIeHXxOig8wD+cBZ1BHOvDBP50p4e1s4ybZ9N/mOObVbJ95ycr0EHo ldDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HYcEaQi4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11si25317778pln.78.2018.12.06.01.21.52; Thu, 06 Dec 2018 01:22:08 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=HYcEaQi4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729356AbeLFJTr (ORCPT + 99 others); Thu, 6 Dec 2018 04:19:47 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34960 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727763AbeLFJTr (ORCPT ); Thu, 6 Dec 2018 04:19:47 -0500 Received: by mail-wr1-f68.google.com with SMTP id 96so22498588wrb.2; Thu, 06 Dec 2018 01:19:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=saQamXVIK+Euaf/h7+XQjCq0HygCncinysq+4JhiIDs=; b=HYcEaQi4rnh7PLOcckPKeyv63h/wkBuHIkN/f4rZkEwQtQ0eGCmFnUiE8XaWRGWr44 V9c2AHW0VvfKNz0Aj7wIbkyJ66tMpmCiCIVc4on1PwYxfaoX1km5+OgpJyfNNUvRPILy oy2hkWKp6r5aqqkl6s0j2iJWpWw0iP9DNPgOwKeMfbw5lCnRSUElWUGNV/zr8mpPawxO 695sigGT3E/xFELy28A+gB0lgnyXxPP2fFbxr5uZGSJW4JYX692DEEILSveO7nrYtTAu pBiOIWgWDFkio9UlMQiBuQ7x5T/ldDXbeEmvQlgtU/Voo1Xl9lH6JeGp6Z28VstpamvM JrJg== 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:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=saQamXVIK+Euaf/h7+XQjCq0HygCncinysq+4JhiIDs=; b=KfEWctlazWfUmaLvAgqe7cUCxyHC5YIUSuhBOe62uDJccmC7NamdXQAoJMw39jWNow h8TV51ODmbGr9C0vb3cMMIgACctQW+3a70ThJio5Do6nhumqjvYV15sC1Asasvn97NyB C5dqzWI40eGEX70z8UR+4IRwVPV7pfRuAE/BYRGeHvg+Gco1z48Lu/dk/tycWPyzxHaI k00ZzPE/El95CNisNiyaHJ+O5T9Qm4vqBbJImLGtzuN7laV9DmqIe7AWYL17qRH0Cwq8 kLqRl8uToYrkqHsMaFyNrOguNE8sjq44rPyQdes/UJppwcaXwgV3AUkPAcg2C1s+Ai4+ YkfQ== X-Gm-Message-State: AA+aEWYa71i7Le3gkxvwDOZ1SulDNnqaoAvwZ7nyhuNR5PsmRljcOX/3 hb87HtJVBSKjrmT9syRs0HU= X-Received: by 2002:adf:ba8e:: with SMTP id p14mr23727443wrg.230.1544087985140; Thu, 06 Dec 2018 01:19:45 -0800 (PST) Received: from [192.168.1.4] (ip-86-49-110-70.net.upcbroadband.cz. [86.49.110.70]) by smtp.gmail.com with ESMTPSA id e16sm22036291wrn.72.2018.12.06.01.19.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Dec 2018 01:19:44 -0800 (PST) Subject: Re: [PATCH v2 1/2] spi: Add Renesas R-Car Gen3 RPC SPI controller driver To: masonccyang@mxic.com.tw Cc: Boris Brezillon , Mark Brown , Geert Uytterhoeven , Geert Uytterhoeven , Simon Horman , juliensu@mxic.com.tw, Linux Kernel Mailing List , Linux-Renesas , linux-spi , zhengxunli@mxic.com.tw References: <1543828720-18345-1-git-send-email-masonccyang@mxic.com.tw> <1543828720-18345-2-git-send-email-masonccyang@mxic.com.tw> <2c6c23fc-299a-f64d-c81f-4b4123f1577b@gmail.com> From: Marek Vasut Message-ID: Date: Thu, 6 Dec 2018 10:19:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/06/2018 10:17 AM, masonccyang@mxic.com.tw wrote: > Hi Marek, Hi, >> >> > + >> >> > + ? ? ? pm_runtime_enable(&pdev->dev); >> >> > + ? ? ? master->auto_runtime_pm = true; >> >> > + >> >> > + ? ? ? master->num_chipselect = 1; >> >> > + ? ? ? master->mem_ops = &rpc_spi_mem_ops; >> >> > + ? ? ? master->transfer_one_message = rpc_spi_transfer_one_message; >> >> >> >> Is there any reason you cannot use the standard >> >> spi_transfer_one_message, i.e. provide spi_controller.transfer_one() >> >> instead of spi_controller.transfer_one_message()? >> >> >> > >> > It seems there is a RPC HW restriction in CS# pin control. >> > Therefore, it can't send the 1'st spi-transfer for command and then >> > keeping CS# pin goes low for the 2'nd spi-transfer for address/data and >> > so on. >> >> Isn't register DRCR bit SSLN/SSLE exactly for this purpose ? >> > > DRCR is for RPC module works in external space read mode, using memcpy( ). > It is not for _spi_sync(). > > I only could use manual I/O mode by SMCR@bit-8 SSLKP and I found it has > some > restrictions in manual I/O mode to control CS# pin. What restrictions are those ? I am aware of some, maybe there is more. -- Best regards, Marek Vasut