Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3276896yba; Tue, 23 Apr 2019 00:30:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQDjyiozJ5t23Ycuf2U29kMzdH7g2p3PrRrbugdiGG4odBfrDZCZYpv+mvhOaKB0FD7W27 X-Received: by 2002:a17:902:a7:: with SMTP id a36mr24505293pla.111.1556004622217; Tue, 23 Apr 2019 00:30:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556004622; cv=none; d=google.com; s=arc-20160816; b=esPPW/tO2G5W4xTz3BdYnJfKUKZ0AB5c7XJIFNslQa8NKY2tj67gV2CMhDdg04h1XZ 2zReNFqCzDbqLbgD7N3T7d2ozeoS/uzQf7D1p+XB5xUAxCNj8lEZ/oLwzF0jl/SsEVf+ 3ZK8dRdESSIndstmi93BDjYmkKHajWCfCvncMgQTusrFa98N4IVKwXtcg9VjMqzivui3 FCe+Tudptu9dcyUdUVi+v60OZalOiZr/MJVdlT5Zz2o+Zx0DSEVbJFkxmJP8E0OOhQ41 M+1RyfAq+zU/8mJt4MxHqU5vlYjbUs6Ut4SiPxq9mINKXfBGNYZ5d4RwRyHwr73OODvX Gywg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=+MefNm+pecE/AsJnyB5Qfp/OpdWSmhI3wPLaKD4Ekwo=; b=A6rInl4FusM/VxfjXs7z3WIYpWqjpW/uVa+sw9+IYTthBTG3sNjhWB6fKpMD5SSdjp 9e4byRcFWGqmVLn5abJMIgPLXUFBtYhLFM6ycOUCsEvMu11n5bhYGj6LBAUUQXQ/dBlV 7IhnSlIiqpYbTTWByVB/Ov1hu5cubexH6kKIcPJ2GlvA6IyySblg0zBp/E6CfApKTxZZ aveBcCtxIR3mKxUyBYimGHxzNSgBULV59AR4mfm6zfwP7aEWLNG0hO4mKQVW95gXhJv2 Nj4qvOnngR2LYgHDPca9o33l9yIh5yCSj7Rglj9SgxHl8b15jAbwWd4FTySu7x+VO1YR 2FAA== 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 c20si15104957pls.53.2019.04.23.00.30.06; Tue, 23 Apr 2019 00:30:22 -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 S1726364AbfDWH3P (ORCPT + 99 others); Tue, 23 Apr 2019 03:29:15 -0400 Received: from mail-vs1-f67.google.com ([209.85.217.67]:36224 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725935AbfDWH3P (ORCPT ); Tue, 23 Apr 2019 03:29:15 -0400 Received: by mail-vs1-f67.google.com with SMTP id n4so7689448vsm.3; Tue, 23 Apr 2019 00:29:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+MefNm+pecE/AsJnyB5Qfp/OpdWSmhI3wPLaKD4Ekwo=; b=rjXmiRn/RN8kjLnyRDDrbcE3DYkMQNa2IjjjK8MhlMR5hsujnNoEbBqAUbIauulvP4 DT0HFMVq46je3TsstecsyIVPE5GoakLQCNLMW9HgPE3S6wIzBEAcc0LCKCSFptk8jlAU 4xRIq9ojxWYGOZFw63BWM0e8VZ2UNBqq5tMCGb2atR7niLDXsJEKS8NeYNQn0619dKBs JUyS1AFTe6TPy2P2CI1UZqi9Y244gHimEIx3CkfjsBf/DXhWk7i5iNueA86pGtA3q8WF DlvirmRmBnpgHmia8gsvOcryBKOsXb/w94iEQRaEMP5bHAU+fzaxXp2qAVAJZJSToHa1 0Yqg== X-Gm-Message-State: APjAAAU6rVmsh+G1ZCuamrGwFa47Qa4KFT2s7ZksMsxGAtWqPhJikuNF k6diioAkZ5k1dNFnoNPNlmfvHrDNbPkW5wnsvsM= X-Received: by 2002:a67:8e03:: with SMTP id q3mr1952785vsd.152.1556004553822; Tue, 23 Apr 2019 00:29:13 -0700 (PDT) MIME-Version: 1.0 References: <1553847606-18122-1-git-send-email-masonccyang@mxic.com.tw> <1553847606-18122-3-git-send-email-masonccyang@mxic.com.tw> <1e2bf23d-db39-0d1d-0bcc-6d9cd2935a82@cogentembedded.com> <3d334751-8fd4-7db1-9deb-e6c94936df13@cogentembedded.com> <3971c669-9095-9d18-d029-37f9663a54b2@cogentembedded.com> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 23 Apr 2019 09:29:02 +0200 Message-ID: Subject: Re: [PATCH v9 2/3] spi: Add Renesas R-Car Gen3 RPC-IF SPI controller driver To: Mason Yang Cc: Sergei Shtylyov , Boris Brezillon , Mark Brown , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Geert Uytterhoeven , Simon Horman , juliensu@mxic.com.tw, Lee Jones , Linux Kernel Mailing List , Linux-Renesas , linux-spi , Marek Vasut , Mark Rutland , Rob Herring , zhengxunli@mxic.com.tw Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mason, On Fri, Apr 19, 2019 at 7:39 AM wrote: > > Re: [PATCH v9 2/3] spi: Add Renesas R-Car Gen3 RPC-IF SPI controller driver > > On 04/18/2019 05:51 AM, masonccyang@mxic.com.tw wrote: > > >> Still hangs for me. After I patches spi-mem.c and the driver to > > >> call RPM for the MFD, it started working again. Perhaps, that clock > > >> is still enabled on your target. What does the following print (for > > >> the RPC clocks)? > > >> > > >> $ mount none -t debugfs /sys/kernel/debug/ > > >> $ cat /sys/kernel/debug/clk/clk_summary > > >> > > > > > > root@draak:/# cat /sys/kernel/debug/clk/clk_summary > > > enable prepare protect duty > > > clock count count count > > rate accuracy phase cycle > > > > > --------------------------------------------------------------------------------------------- > > > audio_clkout1 0 0 0 11289600 0 0 50000 > > > x19_clk 0 0 0 24576000 0 0 50000 > > > dclkin-0 0 0 0 0 0 0 50000 > > > scif 1 1 0 0 0 0 50000 > > > audio_clkb 0 0 0 22579200 0 0 50000 > > > msiof-ref-clock 0 0 0 66666666 0 0 50000 > > > extal 2 3 0 48000000 0 0 50000 > > > r 0 2 0 31250 0 0 50000 > > > rpc-if 0 1 0 31250 0 0 50000 > > > > This looks wrong, the RPC-IF module clock should have RPC or > > RPCD2 (where ae they?) > > as a source, not RLCK... > > I check the Ch8 CPG of R-Car datasheet, figure 8.1f(R-Car D3), > the RPC/RPCD2 is derived from PLL1 -> PLL1CK > > I didn't patch it and it should be exposed afrer the .sdsrc > > .main 2 2 48000000 0 0 > .pll3 0 0 928000000 0 0 > .pll1 4 4 1600000000 0 0 > lv1 0 0 1600000000 0 0 > lv0 1 1 1600000000 0 0 > lvds 1 1 1600000000 0 0 > cl 0 0 33333333 0 0 > zx 0 0 533333333 0 0 > zt 0 0 400000000 0 0 > ztr 0 0 266666666 0 0 > .sdsrc 1 1 800000000 0 0 > sd0 1 1 200000000 0 0 > emmc0 > ---> here ! Upstream drivers/clk/renesas/r8a77995-cpg-mssr.c does not have the "rpc-if" clock, and we have not yet seen the patch to add it that you must be using to make your driver work. If the clock is defined wrongly, that might explain why your driver is working for you, but not for Sergei. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds