Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1030442pxb; Fri, 15 Apr 2022 18:57:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgQ6Cwfu46M3NliTJ6XgytOI+vDaDxeO38zWMf9ix2lGQFHmElfn6UT+d165qKNsW2MnBD X-Received: by 2002:a17:90a:ab81:b0:1ca:8a76:cdda with SMTP id n1-20020a17090aab8100b001ca8a76cddamr7100337pjq.26.1650074230429; Fri, 15 Apr 2022 18:57:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650074230; cv=none; d=google.com; s=arc-20160816; b=z6/M8ZheZGyTBTjDIP8deWYLBDt5s3pV3BD76wMOM8mTFMdFv8z/nRjpj56un7GKsO GWe4obl5K0pKO42FLWbGNRGXfFj2ya6M1B/s5tpA1UUS4/SPgYlmQQIvOzklc4LuZLg3 bqdXsWxUtUnYHoSLs07Z+z2if+SVGN9huzcVJwd5UK+HheKbZMYemlGZE25Lig91nCci Nt7Z5G/0QNyL1eaDL0UaArpq2tibHLiwnmhETk3MUAUv6/8E6uSRmfBQhVx/Whl0KyZU fZvIedD4IUZeqnNaDCUUg3QrXpM7ixJfp1FUDBJJ6hS9vUFQgaaphJP0QMSTJn5wL+2M /fdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=uf/NUgWHuhWSypo4uHHoAgWnaBAtZS72tioBfXir5rw=; b=WsFk/5Ba2Q7uoreQOI5b+wEjmWxXKpRzQz9nGynJ6xO0o0zUG61SYo84g4uV3YcDZX BRd5oZTIfp84KMRfKSm/EaMsVevtndkVxKLaNjaEmd3qd5Qyl8fXhoPyXTfjWoMAQJcC 3pmJhi7P/TwRGQjt2/0YzJIrKE8oy9e7XdYea5XnMyTsqXjHxLeIm4yGi6S1F1I1E/o7 2HZIvjkiaLgqBbb076Xx1SwcCHjXNALYDpAdGPQolmQvFKijGNXvBS4nnu8UtbG3H2wG TRo8r6uedmfXLdP3A4VI/0fdtA11fRk2RxGtYufsxqSUT6i4HYUBhklU0Ygor6LxfAtY x2fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=RH9+J969; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i7-20020a17090a974700b001cb68e59fd0si3003616pjw.88.2022.04.15.18.57.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:57:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=RH9+J969; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 47D40104281; Fri, 15 Apr 2022 18:17:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349563AbiDNOxO (ORCPT + 99 others); Thu, 14 Apr 2022 10:53:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345131AbiDNNpL (ORCPT ); Thu, 14 Apr 2022 09:45:11 -0400 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 502D8140DE; Thu, 14 Apr 2022 06:42:45 -0700 (PDT) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 047581BF20C; Thu, 14 Apr 2022 13:42:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1649943763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uf/NUgWHuhWSypo4uHHoAgWnaBAtZS72tioBfXir5rw=; b=RH9+J969PE/jWaLdsCV+Jg1ttNMgnWmL2DqDCmlGulbszBjD9NE52I2J8RVKtHvaLsECs9 S8j67gnG0CdrH/urV5Uw8cdGR4XfehozZgFSA6Eg7ukBmemeWcBtEsm45Q6wloI5KV7rbX Fy1xTIHQyDpWpZ7/AthMJAEHBuy4ptwTA4uoeVdplikQzQx5jG5FeLj+uPWcStSohLc28N KAAWjoFcxPN+HmjvfAAD+dE+5eo8GyyKzsL/4WqsfD4BjmhB6//KozDJPHWWWcoYawa3FI wwZPzGot1uDZ4YL894ldPzkehTWSGlL7VU3yYbmpYpXogF/aXiFowNMKUC6JKQ== Date: Thu, 14 Apr 2022 15:42:32 +0200 From: Herve Codina To: Geert Uytterhoeven Cc: Marek Vasut , Yoshihiro Shimoda , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Lorenzo Pieralisi , Krzysztof =?UTF-8?B?V2lsY3p5xYRza2k=?= , Rob Herring , linux-pci , Linux-Renesas , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , Sergey Shtylyov , Thomas Petazzoni , Clement Leger , Miquel Raynal Subject: Re: [PATCH v2 1/8] PCI: rcar-gen2: Add support for clocks Message-ID: <20220414154232.098a4451@bootlin.com> In-Reply-To: References: <20220414074011.500533-1-herve.codina@bootlin.com> <20220414074011.500533-2-herve.codina@bootlin.com> <20220414132534.35467781@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, On Thu, 14 Apr 2022 13:48:22 +0200 Geert Uytterhoeven wrote: > Hi Herv=C3=A9, >=20 > On Thu, Apr 14, 2022 at 1:29 PM Herve Codina w= rote: > > On Thu, 14 Apr 2022 10:45:54 +0200 > > Geert Uytterhoeven wrote: =20 > > > On Thu, Apr 14, 2022 at 9:40 AM Herve Codina wrote: =20 > > > > The PCI rcar-gen2 does not call any clk_prepare_enable(). =20 > > > > > > Correct, this driver manages the clocks indirectly through Runtime PM. > > > =20 > > > > This lead to an access failure when the driver tries to access > > > > the IP (at least on a RZ/N1D platform). =20 > > > > > > I expect adding > > > > > > power-domans =3D <&sysctrl>; > > > > > > to the pci_usb node makes this patch redundant. =20 > > > > Seems not enough. > > I tried what you suggest : > > - Added 'power-domains =3D <&systrl>;' to the pci_usb node > > - Added missing '#power-domain-cells =3D <0>;' to sysctrl node > > - Reverted my patch. > > > > The system crashed at boot: =20 >=20 > > [ 0.832958] Unhandled fault: external abort on non-linefetch (0x1008= ) at 0x90b5f848 =20 >=20 > That's indeed a typical symptom of accessing a module's registers > while the module's clock is disabled. >=20 > > I also added a trace printk in r9a06g032-clocks.c and > > r9a06g032_attach_dev() was never called. > > > > Did I miss to set something ? =20 >=20 > Do you have CONFIG_PM and CONFIG_PM_GENERIC_DOMAINS > enabled? > Apparently ARCH_RZN1 does not select these options yet. >=20 Thanks a lot for pointing this. I added select CONFIG_PM and CONFIG_PM_GENERIC_DOMAINS in ARCH_RZN1 and it works. I will remove my patch calling clk_bulk_prepare_enable() and add some new patches to enable power domains in the v3 series. Regards, Herv=C3=A9