From patchwork Fri Apr 12 16:01:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Willy Wolff X-Patchwork-Id: 10898643 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E084A922 for ; Fri, 12 Apr 2019 16:02:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB07528EBD for ; Fri, 12 Apr 2019 16:02:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AEC2B28EC6; Fri, 12 Apr 2019 16:02:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EFDAB28EBD for ; Fri, 12 Apr 2019 16:02:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=isXPlZbQif8+IpsQhdBhaiKOJnzNQK85ytYEIj3VulI=; b=bdm9KkmhCDmXnH 3Ta/mIs88dCGkntLyuB1J1a/+KNHAEOusmdamNP5FMkUCxWDbBCtJNVPZBQfAg5hGZr44eK/VEDsP KRWnveMWkT+iF2LBcVJPb3+AktA6L8bTUqv09uQsQdaE57DGuZV0TqEIcZB+lBFytpkyZCF6Syw3z Z7uE50Mt5PVm3XOJy7KISSAOAdy4cB9GQqIkiyu2FZqvWBKL1zgTKrllQL8M9aL2+DTCAvqePJnsc x39Mmhh7yaop4Ut0KhgmQyIULp6EMSm0wIwzhkBq104Ie+fq1+6gXoezphrNBqCZMfD46/kVtBbNy gPb+Svol2f4OeCGfDxkg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEycr-0007du-ES; Fri, 12 Apr 2019 16:02:01 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEycn-0007dV-Ui for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2019 16:01:59 +0000 Received: by mail-wm1-x344.google.com with SMTP id w15so11639110wmc.3 for ; Fri, 12 Apr 2019 09:01:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=hzDTtEH6j7d7QGWta1h02BQu/5flGAz2BaklLVXWjnU=; b=KKTQFvc+iIKQMbFKw5zF+6Tp2ztad7JcoNC0e0CsFVVOXxYGPg0Cq8ZSoylHDr2LBJ Uql1ido8EPjd/5OUePzBeItUJKJfvDMi0o70vr/bZGHJVjHhTkcBHBgKQK8Gy8f/lPaM OmVe08sqK/u0OAB1NcM1uw6VqND5obbg1gz5pdAJN5ELQXCXoCtzW2BUXTbjRY7mDq/h ckbpz4oAQFMuWVFmYU6dUzjdxjz+MMFAB9CDl1xTEDT7r0UnjoM3s6+bfnuxI6ngmiWR Ax1oA8QqT8voDW3EFvUz14cKRv8HbbOoxsM+9WS1lggXH4CoRRhQJMGtw5pKJQS1ZEKN hD3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=hzDTtEH6j7d7QGWta1h02BQu/5flGAz2BaklLVXWjnU=; b=qxSCAI2CP/+M2wuKMRVETmoZY8gdb/tYiTKiKuj2/qsjkOciWaidMIzy5yNFe3AFBV Udb+Js3X3V/dffyz1abgXDMfcrd4IIWICH9DEVR1gU2YuQ5jSIKeKicsLOdC/GWJFayp J/e3v3hcApzsO6q7vL+TAFQbntzRv71DqWEdaEXBK/CxDluqv2t1wXlPott5bXRV0sMw uuCrUYdsvlQUSQYELf6/4SuynukXcvWwnIABL8d//LsTb71BpWpksicAkj6/CLMfJllt G4P2GYPPnHR0KgMth7O2p+WNTgp/8ZwHDiirMsFMYjDONoKhROpahfsjPFDhQnfmUYPb x+uw== X-Gm-Message-State: APjAAAVdVvkNdDUTwqJeWhQnHfnWNyKmyVQ1u6HmPr2N18r79HYgJW61 DjzggOaURMydgGk/dR+nyMY= X-Google-Smtp-Source: APXvYqzyLxHScy7/GPW+R4acGgzbKFwtOnXYAIJONlU4pueQ1UK3phnanLk9/O8Q7VNjizymEpH5rQ== X-Received: by 2002:a1c:1d81:: with SMTP id d123mr12218162wmd.59.1555084915897; Fri, 12 Apr 2019 09:01:55 -0700 (PDT) Received: from macpro-scc.lancs.ac.uk (inc028000049.lancs.ac.uk. [148.88.224.78]) by smtp.gmail.com with ESMTPSA id 11sm8719849wmk.17.2019.04.12.09.01.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Apr 2019 09:01:55 -0700 (PDT) Date: Fri, 12 Apr 2019 17:01:54 +0100 From: Willy Wolff To: Rob Herring , Mark Rutland , Kukjin Kim , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi Subject: about cci400 pmu Message-ID: <20190412160153.edbbe7mrwm7xsewa@macpro-scc.lancs.ac.uk> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190412_090158_017984_A40F1F79 X-CRM114-Status: GOOD ( 12.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, I'm trying to add pmu support for CCI400 on an Odroid-XU3/4. Following https://www.kernel.org/doc/Documentation/devicetree/bindings/arm/cci.txt, and other dtsi, I end up with this patch: Saddly, I got: [ 5.375913] ARM-CCI PMU 10d20000.cci:pmu@9000: invalid resource [ 5.389595] ARM-CCI PMU: probe of 10d20000.cci:pmu@9000 failed with error -12 By pluging some printk here and there in arm-cci.c in init and probe functions, all return 0. I assume that the driver initialisation is succesful. I trace a bit more in really_probe function, however, I can't find the real cause of this error. $ dmesg | grep cci [ 0.070299] drivers/bus/arm-cci.c:569:cci_init() [ 0.071484] drivers/bus/arm-cci.c:580:cci_init() cci_init_status = 0 [ 0.071610] drivers/bus/arm-cci.c:595:cci_probed() cci_init_status = 0 [ 0.113575] drivers/bus/arm-cci.c:569:cci_init() [ 0.113684] drivers/bus/arm-cci.c:572:cci_init() cci_init_status = 0 [ 0.770287] drivers/bus/arm-cci.c:94:cci_platform_init() 0 [ 0.811655] drivers/base/dd.c:516:really_probe() ARM-CCI 10d20000.cci try probe drv = c1058908, drv->probe = c0593498, dev = e8b2f010 [ 0.811788] drivers/bus/arm-cci.c:72:cci_platform_probe() [ 0.811866] drivers/bus/arm-cci.c:569:cci_init() [ 0.811937] drivers/bus/arm-cci.c:572:cci_init() cci_init_status = 0 [ 0.812023] drivers/bus/arm-cci.c:595:cci_probed() cci_init_status = 0 [ 0.814718] drivers/bus/arm-cci.c:79:cci_platform_probe() 0 [ 6.738502] drivers/base/dd.c:516:really_probe() ARM-CCI PMU 10d20000.cci:pmu@9000 try probe drv = c10859f4, drv->probe = c0593498, dev = e8b2fc10 [ 6.747909] ARM-CCI PMU 10d20000.cci:pmu@9000: invalid resource [ 6.753711] drivers/base/dd.c:522:really_probe() ARM-CCI PMU 10d20000.cci:pmu@9000 fail probe [ 6.762416] drivers/base/dd.c:561:really_probe() ARM-CCI PMU 10d20000.cci:pmu@9000 probe_failed [ 6.770940] ARM-CCI PMU: probe of 10d20000.cci:pmu@9000 failed with error -12 I don't know if the provided values for dtsi is correct either. I would be very happy to have some help to make these pmu working. Many thanks in advance. Best Regards, Willy diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index f4e8c5823bc2..8432f01fb463 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi @@ -170,6 +170,16 @@ interface-type = "ace"; reg = <0x5000 0x1000>; }; + + pmu@9000 { + compatible = "arm,cci-400-pmu,r0"; + reg = <0x9000 0x5000>; + interrupts = <0 105 4>, + <0 101 4>, + <0 102 4>, + <0 103 4>, + <0 104 4>; + }; }; clock: clock-controller@10010000 {