From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF6A2C46460 for ; Mon, 20 May 2019 07:45:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 904A020815 for ; Mon, 20 May 2019 07:45:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730517AbfETHpC (ORCPT ); Mon, 20 May 2019 03:45:02 -0400 Received: from mail-vs1-f65.google.com ([209.85.217.65]:34920 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730013AbfETHpC (ORCPT ); Mon, 20 May 2019 03:45:02 -0400 Received: by mail-vs1-f65.google.com with SMTP id q13so8332382vso.2; Mon, 20 May 2019 00:45:01 -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=WNe5zD8EbypMGMCv2cvp7cUoDcbNDit9Pa0KbW5AHpM=; b=MQvx3HSmYRVgVSYgRhtnO9vLuxqgE0tZPweb/BOPq6VB/Mf+KekgVpCbUyOzGWupXo XyrcfO9cIKgZdOuZd2dS5jGC2/bGTKvSAzGQVyBy04NBU+ouuf30L7WjFEJdmxyettXW j5UU/sFupHZnmnkTBQAc0Ikfrcb6lbV9yu1g1dbdO/MAKmzLefqlSGrqEJR5+uG+II+W 5B+EhUXNjHyoMajVQZZdlYxGZNTKv7vTmk+SfU6l2tIw32Bnr/uGtHnhUSBc4dAHqQF0 wgC4nQwPBGDunW+sDvxeKh1kJdL2oFFB6eXq2zaEcghali++Mc354S0KW3R3X/6ymmCw m3/g== X-Gm-Message-State: APjAAAUijwEIic+i60MBKR57drBQWPKGdbQ/Ax9VVnQQ9o++7fbpJEhM 5fIqjSzlFO0tYzzKLBj3GXaRumH6L6+7fKGSEf8= X-Google-Smtp-Source: APXvYqx5S9gDhfCB9drN7+R0/W78Xu4IJRwCrFKipEDc/5MIaLVZ7/rRdRPe4nJ94/2ntK6T+lcUClyt+FEDm0HnqtA= X-Received: by 2002:a67:7c93:: with SMTP id x141mr25439751vsc.96.1558338301113; Mon, 20 May 2019 00:45:01 -0700 (PDT) MIME-Version: 1.0 References: <1556092536-17095-1-git-send-email-masonccyang@mxic.com.tw> <20190424212356.GA27103@bogus> <65853dc2-6f3c-1494-7e72-54877797cdd2@gmail.com> <20190507125730.GD29524@dell> <20190508061119.GB7627@dell> <44bc8f0a-cbdc-db4a-9a46-b8bae5cc37a2@cogentembedded.com> In-Reply-To: From: Geert Uytterhoeven Date: Mon, 20 May 2019 09:44:48 +0200 Message-ID: Subject: Re: [PATCH v12 3/3] dt-bindings: mfd: Document Renesas R-Car Gen3 RPC-IF MFD bindings To: Mason Yang Cc: Sergei Shtylyov , Lee Jones , Boris Brezillon , Mark Brown , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Geert Uytterhoeven , Simon Horman , juliensu@mxic.com.tw, Linux Kernel Mailing List , Linux-Renesas , linux-spi , Marek Vasut , Mark Rutland , Rob Herring , zhengxunli@mxic.com.tw, Miquel Raynal 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 Mon, May 20, 2019 at 9:24 AM wrote: > > >>> - clocks: should contain 1 entries for the module's clock > > >>> - clock-names: should contain "rpc" > > >> > > >> I suspect we'd need the RPC/RPCD2 clocks mentioned as well (not > sure > > > yet)... > > > > > > Need it ? > > > > You seem to call clk_get_rate() on the module clock, I doubt that's > > correct topologically... > > I think it's correct but just like Geert mentioned that there is no any > patch > in drivers/clk/renesas/r8a77995-cpg-mssr.c adding RPC-related clocks. > > > I patched dt-bindings/clock/r8a77995-cpg-mssr.h for some simple testing > > -#define R8A77995_CLK_RPC 29 > -#define R8A77995_CLK_RPCD2 30 > +#define R8A77995_CLK_RPC 31 > +#define R8A77995_CLK_RPCD2 32 That change doesn't make sense to me... > by clk_prepare_enable() & clk_disable_unprepare() with CPG_MOD 917 > on D3 draak board, it is working fine. ... and is not sufficient to allow the above two calls. Besides, making explicit clk_prepare_enable() calls bypasses Runtime PM and the automatic disabling of unused clocks, thus hiding bugs related to Runtime PM. Which is probably why your driver doesn't work 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Subject: Re: [PATCH v12 3/3] dt-bindings: mfd: Document Renesas R-Car Gen3 RPC-IF MFD bindings Date: Mon, 20 May 2019 09:44:48 +0200 Message-ID: References: <1556092536-17095-1-git-send-email-masonccyang@mxic.com.tw> <20190424212356.GA27103@bogus> <65853dc2-6f3c-1494-7e72-54877797cdd2@gmail.com> <20190507125730.GD29524@dell> <20190508061119.GB7627@dell> <44bc8f0a-cbdc-db4a-9a46-b8bae5cc37a2@cogentembedded.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Mason Yang Cc: Sergei Shtylyov , Lee Jones , Boris Brezillon , Mark Brown , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Geert Uytterhoeven , Simon Horman , juliensu@mxic.com.tw, Linux Kernel Mailing List , Linux-Renesas , linux-spi , Marek Vasut , Mark Rutland , Rob Herring , zhengxunli@mxic.com.tw, Miquel Raynal List-Id: devicetree@vger.kernel.org Hi Mason, On Mon, May 20, 2019 at 9:24 AM wrote: > > >>> - clocks: should contain 1 entries for the module's clock > > >>> - clock-names: should contain "rpc" > > >> > > >> I suspect we'd need the RPC/RPCD2 clocks mentioned as well (not > sure > > > yet)... > > > > > > Need it ? > > > > You seem to call clk_get_rate() on the module clock, I doubt that's > > correct topologically... > > I think it's correct but just like Geert mentioned that there is no any > patch > in drivers/clk/renesas/r8a77995-cpg-mssr.c adding RPC-related clocks. > > > I patched dt-bindings/clock/r8a77995-cpg-mssr.h for some simple testing > > -#define R8A77995_CLK_RPC 29 > -#define R8A77995_CLK_RPCD2 30 > +#define R8A77995_CLK_RPC 31 > +#define R8A77995_CLK_RPCD2 32 That change doesn't make sense to me... > by clk_prepare_enable() & clk_disable_unprepare() with CPG_MOD 917 > on D3 draak board, it is working fine. ... and is not sufficient to allow the above two calls. Besides, making explicit clk_prepare_enable() calls bypasses Runtime PM and the automatic disabling of unused clocks, thus hiding bugs related to Runtime PM. Which is probably why your driver doesn't work 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