Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp957233img; Fri, 22 Mar 2019 12:15:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHlRuRyd2DQx6H9cK593kyDwGG2Xz5Wr0ol6Fs9Y3TLBU0rsUUHUEY+RzW6e8LpQPd2/FS X-Received: by 2002:a17:902:f20e:: with SMTP id gn14mr11112853plb.334.1553282132624; Fri, 22 Mar 2019 12:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553282132; cv=none; d=google.com; s=arc-20160816; b=fXFSQ/0ctcvw5tPn6Hf4D5NZND5/QMZNeCVGBgwUb308k7UCgAAxCdp+9pAtOF3zvm Mq83InnFUfU6mBmL5u01Kq2XBl4f/tZC7AmQ+PgF4w+qtpKZEfqTm+UTwDjW/EF6vqbr 8aFB092KgE8jGjW2DrTbWFNpCA6fLOoj1DvaixmudMJwlcyAm9udPbj3ySfAODap14eq 4FlHY/WBKI1qG11zo/lDrGt7C0wuLNVJFABVr6CtQyK3P+bSIDQGUrC7ZeNyiADI2kbQ MYuRkh+JWAPPrf+jth8icm27Nrvokty/jL/sXQkj9orK5bHJQsehgqWzOuOHED/8/wRi WYmQ== 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=hlNmTqE/DDz2Igp//Zff4mtIGRB67dc75NmSK2tdWkU=; b=HSVALwF+8x2l02kh7trHrwWqxVLGSs/0jTldrSF+393wV5G93w/ybA1B4BsWg+ICQD Vk31aIv3+o6MXxL6ZV8JNEpGPWIzt9Cp460F0EbeHX2qJFBxEnPi+xv4uuFKh19lQa/k 1yzh1+hrA53HUwLO1tjNtJZY3f+NVp1EVzEet7onkpvldDgXFDlcHqmI2nlf/HL8HbJF G3BzG36L+9G83Z0hgydP1d82BmylshuPioCnc5o1BMiHG6Pw7B62ka0NHB3pqESMsKLj Sphg/sc8+UVKP/98TJDQ9Y2MjwNk1v0Nb2Xn0vri6KpFiLp20WaNwIwWaUA37rHvUZbi vgZQ== 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 d7si7042457pgq.367.2019.03.22.12.15.08; Fri, 22 Mar 2019 12:15:32 -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 S1728136AbfCVTOe (ORCPT + 99 others); Fri, 22 Mar 2019 15:14:34 -0400 Received: from mail-ua1-f68.google.com ([209.85.222.68]:44645 "EHLO mail-ua1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727566AbfCVTOd (ORCPT ); Fri, 22 Mar 2019 15:14:33 -0400 Received: by mail-ua1-f68.google.com with SMTP id r21so1093378uan.11; Fri, 22 Mar 2019 12:14:32 -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=hlNmTqE/DDz2Igp//Zff4mtIGRB67dc75NmSK2tdWkU=; b=oR5ka3qgJwjLjRmcMcCzKcuuAj2BbzpX+dHPqWMZHEWgwwX4IUDQNveDuSWRfLXegR fBIaZbIRpYNWReMqCjk+GzsbFvHGzX3MQUuzEuwZn5erJKZSy2RXvQu926/V+0zO2E02 ouNgCUY8iO4E92WBAWBRq7eJJ4cNSQHYXfck11PZU5GN9XMyqyELGyBBnc7DmqWINXNU VQM9g7dZnJs8ihSu7zEuFxDNeMiqpSm5Tbea/srDH5krOwS4aMltrra3qMH5q+dbv/sX q8RdwYoUQdVvVkYEw8JwGo9I5ZLYaVBp3yyjwgdOwdazOrmbBY+nr0Et9Rll9gIZBxc9 5qAA== X-Gm-Message-State: APjAAAUf5g7n/3URrKIOnuYxEaxqJiM2pjR07mAjJIufzn8DIVU1I4fC FcnEPbVf0vgIqI4qmqWE61xCmKsR3/T9cB31mGE= X-Received: by 2002:ab0:6419:: with SMTP id x25mr2073034uao.86.1553282071917; Fri, 22 Mar 2019 12:14:31 -0700 (PDT) MIME-Version: 1.0 References: <1553271070-7509-1-git-send-email-gareth.williams.jx@renesas.com> In-Reply-To: <1553271070-7509-1-git-send-email-gareth.williams.jx@renesas.com> From: Geert Uytterhoeven Date: Fri, 22 Mar 2019 20:14:20 +0100 Message-ID: Subject: Re: [PATCH] PCI: rcar-gen2: Ensure the mandatory clock is enabled To: Gareth Williams , Phil Edworthy Cc: Lorenzo Pieralisi , Bjorn Helgaas , linux-pci , Linux-Renesas , Linux Kernel Mailing List 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 Gareth, Phil, Thanks for your patch! On Fri, Mar 22, 2019 at 5:11 PM Gareth Williams wrote: > From: Phil Edworthy > > All SoC devices that use this driver have a module stop clock associated > with it that we must ensure is enabled. All SoCs enabled this clock > by default, so I guess no one noticed that the driver didn't enable it. This is not really correct: the module clock has always been controlled through the clock domain the device is part of, either through the "power-domains" property in DT, or through the legacy clock domain before that, combined with Runtime PM (see also commit fb178d8b2fab3f2a ("PCI: rcar: Add runtime PM support")). Furthermore adding explicit clock management (with a mandatory clock) makes it harder to use the device with virtualization and VFIO, and to reuse the driver on other SoCs where no module clock may be present. Using Runtime PM allows to abstract the presence of the module clock, or whatever power saving feature that may be present (e.g. a power area), which is an integration feature, and not a feature of the actual device. So I don't think this change is needed or wanted. NAKed-by: Geert Uytterhoeven > Note: This change was tested on RZN1 and R-Car M2 hardware. NULL is > passed to devm_clk_get for backwards compatibility reasons with R-Car gen2 > devices which do not name the clock. > > DTS files for Renesas devices that use this driver have been checked to > ensure they specify a clock and do not name that clock. I understand RZ/N1 has the same PCI controller, and you're trying to add support for it? I think the solution there is to add clock domain support to drivers/clk/renesas/r9a06g032-clocks.c. 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