From patchwork Wed Apr 17 07:48:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10904727 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 53B1A17E6 for ; Wed, 17 Apr 2019 07:48:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43E3B289BD for ; Wed, 17 Apr 2019 07:48:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37E6928A0F; Wed, 17 Apr 2019 07:48:38 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D49D289F2 for ; Wed, 17 Apr 2019 07:48:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731210AbfDQHsg (ORCPT ); Wed, 17 Apr 2019 03:48:36 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:40659 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731207AbfDQHsg (ORCPT ); Wed, 17 Apr 2019 03:48:36 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190417074834euoutp0290f7f4b9d6b81f6acdc2a1ded5792de7~WM3iTv1zJ0425304253euoutp02M for ; Wed, 17 Apr 2019 07:48:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190417074834euoutp0290f7f4b9d6b81f6acdc2a1ded5792de7~WM3iTv1zJ0425304253euoutp02M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1555487314; bh=yp22Q9om9PbOtWP1WnUp98117gd7aHO0YbNpzJ3oCTw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XHKA/AVMKZWp04j9JgUh0E15KMPX06YdJ8yQDF5cuwyZ7X8UNlC8TWJzs1PuQfoiP wJPqPdbtxG1KOgWGuAEPIHfRd5KzVFaydpfptqlnahOwigzuAO3wQ5Sl9lR9XsMYJC dpb2aSiAEx1eIbC3y8668IzvaGgqTbZC+O105DyQ= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190417074833eucas1p19073b60a499c4e3e92e108a64c4e3ecb~WM3hYl0uZ0763207632eucas1p1c; Wed, 17 Apr 2019 07:48:33 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 91.38.04325.05AD6BC5; Wed, 17 Apr 2019 08:48:32 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190417074832eucas1p26eca3ed8bf754787b4860206ba542e1c~WM3gn3rYZ2287122871eucas1p2w; Wed, 17 Apr 2019 07:48:32 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190417074832eusmtrp2dcc74a19340d1328c0374ff56d691613~WM3gYVYAu2697726977eusmtrp2-; Wed, 17 Apr 2019 07:48:32 +0000 (GMT) X-AuditID: cbfec7f5-b8fff700000010e5-48-5cb6da508a43 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 12.57.04140.05AD6BC5; Wed, 17 Apr 2019 08:48:32 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190417074831eusmtip195768e1c2a506250e3df672170210f7b~WM3fu4ECU0059200592eusmtip1r; Wed, 17 Apr 2019 07:48:31 +0000 (GMT) From: Lukasz Luba To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: b.zolnierkie@samsung.com, krzk@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, cw00.choi@samsung.com, kyungmin.park@samsung.com, m.szyprowski@samsung.com, s.nawrocki@samsung.com, myungjoo.ham@samsung.com, kgene@kernel.org, l.luba@partner.samsung.com Subject: [PATCH 1/3] include: dt-bindings: add Performance Monitoring Unit for Exynos Date: Wed, 17 Apr 2019 09:48:06 +0200 Message-Id: <1555487288-4777-2-git-send-email-l.luba@partner.samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555487288-4777-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VSeUhTcRzvt7e3Pa3ZcxP94RUMjOxQo4NXmaiIrcKQ6DQ7Znuo6abtqWWa F5oHHqVhas1lKa4xteaaplNTR0KiU4y8SKURptmI1MAOzcdb9N/n9znhyw9D+PWoMxYtSyDl MnGskGPL1r9ZMe0KndCH+zSX+BIvKppQYnRpFiWUxkGUKDF/QQiT6TmXGMha4BITGa6E1vwe JUbaHnGIxSIjICpMnSyiwfiBS9SNDrOIyUwVh8jpMHKJ3oVc1B8Xaao1QKRV53NEzbXpom6L gSUq1qmBaFHrHsoJs/WVkLHRSaTc2++KbdRgtgqJb7G7aX5Xh2SAtY0FwAaD+F5YPDfBLQC2 GB9XAdhdXglogY8vAVizJmOERQDHHs6i/xKGkULACPUAKi2VKPNYT2QOFa53YRgH94Kt6ut0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WMAygZFvASPDKkaR 1NLi3PTcYiO94sTc4tK8dL3k/NxNjMC42Hbs55YdjF3vgg8xCnAwKvHwrvi5NUaINbGsuDL3 EKMEB7OSCK9jypYYId6UxMqq1KL8+KLSnNTiQ4ymQEdNZJYSTc4HxmxeSbyhqaG5haWhubG5 sZmFkjjveYPKKCGB9MSS1OzU1ILUIpg+Jg5OqQZGybasyENm4of0wj8fyfwjEnn8CE93+JP6 M3EZYhyPHtvWCR72f/PlF6NOaAt7PuvfbRk3/Iy7p5c1XvUz5e61l7yb+ardy7CypFhw0V7+ me0e0qkMGdHPF85Rqvzx+2mPXqSsqbDYzLBVCzl4Vy10OiNX6JtYc08t9ZpoWsHp5sD7CmtT NJVYijMSDbWYi4oTAY8tmYyhAgAA X-CMS-MailID: 20190417074832eucas1p26eca3ed8bf754787b4860206ba542e1c X-Msg-Generator: CA X-RootMTR: 20190417074832eucas1p26eca3ed8bf754787b4860206ba542e1c X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190417074832eucas1p26eca3ed8bf754787b4860206ba542e1c References: <1555487288-4777-1-git-send-email-l.luba@partner.samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch add support of a new feature which can be used in DT: Performance Monitoring Unit with defined event data type. In this patch the event data types are defined for Exynos PPMU. The patch also updates the MAINTAINERS file accordingly. Signed-off-by: Lukasz Luba --- MAINTAINERS | 5 +++++ include/dt-bindings/pmu/exynos_ppmu.h | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 include/dt-bindings/pmu/exynos_ppmu.h diff --git a/MAINTAINERS b/MAINTAINERS index 3671fde..f4aac78 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12376,6 +12376,11 @@ L: linux-scsi@vger.kernel.org S: Supported F: drivers/scsi/pm8001/ +PMU EXYNOS DT BINDINGS +M: Lukasz Luba +S: Maintained +F: include/dt-bindings/pmu/exynos_ppmu.h + PNP SUPPORT M: "Rafael J. Wysocki" S: Maintained diff --git a/include/dt-bindings/pmu/exynos_ppmu.h b/include/dt-bindings/pmu/exynos_ppmu.h new file mode 100644 index 0000000..a6971eb --- /dev/null +++ b/include/dt-bindings/pmu/exynos_ppmu.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Samsung Exynos PPMU event types for counting in regs + * + * Copyright (c) 2019, Samsung + * Author: Lukasz Luba + */ + +#ifndef __DT_BINDINGS_PMU_EXYNOS_PPMU_H +#define __DT_BINDINGS_PMU_EXYNOS_PPMU_H + + +#define PPMU_RO_BUSY_CYCLE_CNT 0x0 +#define PPMU_WO_BUSY_CYCLE_CNT 0x1 +#define PPMU_RW_BUSY_CYCLE_CNT 0x2 +#define PPMU_RO_REQUEST_CNT 0x3 +#define PPMU_WO_REQUEST_CNT 0x4 +#define PPMU_RO_DATA_CNT 0x5 +#define PPMU_WO_DATA_CNT 0x6 +#define PPMU_RO_LATENCY 0x12 +#define PPMU_WO_LATENCY 0x16 +#define PPMU_V2_EVT3_RW_DATA_CNT 0x22 + +#endif From patchwork Wed Apr 17 07:48:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10904735 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 B253017E0 for ; Wed, 17 Apr 2019 07:48:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DFB628723 for ; Wed, 17 Apr 2019 07:48:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 916B228A0F; Wed, 17 Apr 2019 07:48:49 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23EE628723 for ; Wed, 17 Apr 2019 07:48:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731208AbfDQHss (ORCPT ); Wed, 17 Apr 2019 03:48:48 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:53892 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731139AbfDQHsg (ORCPT ); Wed, 17 Apr 2019 03:48:36 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190417074835euoutp010fdac3260431002413948217074f2175~WM3jqaif-3238332383euoutp011 for ; Wed, 17 Apr 2019 07:48:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190417074835euoutp010fdac3260431002413948217074f2175~WM3jqaif-3238332383euoutp011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1555487315; bh=ErJOmCzTuD7nzlZeYXUh/Pn43TEfgPouP54oeuht6kc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F8B0g407Z6/RhLHNjduJ+aQ1gYLH/QdJyHayDNxUNHPznxCRb6P1/KhFkP3fuMhcm 7FE3wWyLaJj2L0FBXT6ip7NhWj5sGNzjXZ7U3XJzns3Cn9mDKpFJ5/ZiKqKlk9MKNG EFoyLZc9no9zhKEhk4mlBhBUFQXCS1fvVf0/9GxA= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190417074834eucas1p27bf9296a2524bab2d6cdaed24fc3a668~WM3i2ryFk0857108571eucas1p2e; Wed, 17 Apr 2019 07:48:34 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 63.38.04325.25AD6BC5; Wed, 17 Apr 2019 08:48:34 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190417074834eucas1p1faa327cb6394d899a8e107ba61f28fda~WM3iGh7vM1306513065eucas1p10; Wed, 17 Apr 2019 07:48:34 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190417074833eusmtrp2b01ec003d9f34a32ffdca4e5710d17b7~WM3h24Ret2697626976eusmtrp2F; Wed, 17 Apr 2019 07:48:33 +0000 (GMT) X-AuditID: cbfec7f5-b75ff700000010e5-4d-5cb6da52eac8 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id B3.57.04140.15AD6BC5; Wed, 17 Apr 2019 08:48:33 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190417074833eusmtip176aa797b4ed4d95001a5bfe996041b06~WM3hOnzjZ3091330913eusmtip1f; Wed, 17 Apr 2019 07:48:33 +0000 (GMT) From: Lukasz Luba To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: b.zolnierkie@samsung.com, krzk@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, cw00.choi@samsung.com, kyungmin.park@samsung.com, m.szyprowski@samsung.com, s.nawrocki@samsung.com, myungjoo.ham@samsung.com, kgene@kernel.org, l.luba@partner.samsung.com Subject: [PATCH 2/3] drivers: devfreq: events: extend events by type of counted data Date: Wed, 17 Apr 2019 09:48:07 +0200 Message-Id: <1555487288-4777-3-git-send-email-l.luba@partner.samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555487288-4777-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSe0iTYRTGe79v32Wj1du0PGnMHAmVpUUFL1SSVLCCQgr6w+yy9Eslb+1T u1IWmSmZ5bqY6KZmKcuylpmJCptXjFxWZprGwC5UdlMrZKk5v1X//c5znnOew8vL0yoz483H xCcJ+nhdrIZVyKqaR+yLt/RUhS/5Nu5H7uZWMKRr+D1DTI3tDMnu/0QTu/0ORx6fHOBIT+oc Yul/wZBnNfksGcpqRCTXXk+RW419HLne1UGRVyfKWJJW18iRhoF0Zg3WlhvLkdZizmC190qO a61faintuUoz0g5Z1KFsmGJVpBAbkyLog4J3K6ILTxVyiTb/g8XD+XQquqDORHIe8HIwNZmo TKTgVbgMQX73D5lUDCOw5DtYqRhCkJPVz/wdsY5coF2swqUIbtat/zcxntE9sYvnWRwI1eb9 Lo8nvobgZ0OYy0PjDAq+GGpZV8MDb4PbrQWUi2XYHzqfvptkJd4AZT/P01KYGrrbMyZZjjeC 0dE2eSvgGg5ar9bJJNM6SKvoQhJ7wMeWSk7iOTD+0ERJLEJqVpHbcxT6swvcnpXQ0NLBuI6m 8QKoqAmS5BD49f0B7ZIBT4OXn2e4ZHoCc6quuGUlnDmtktzzofLsE3fQLCgtv+xeroW2M+84 6XkKELzJzaTOI9+8/2GFCJmRl5AsxkUJ4rJ44UCgqIsTk+OjAiMS4ixo4gc9Gmv5UY3qf++x IcwjzVRl2cj9cBWjSxEPxdkQ8LTGUxkSWRmuUkbqDh0W9Am79MmxgmhDPrxM46U8MsWxXYWj dEnCPkFIFPR/uxQv905Fc3eoAwY7E52a0cFjON2285Yf3Ch6b425GrBXeB1ILpXkvbqfvcJ3 9npDevHo9/oQeBvQFznfPyIzYfVlx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107ba61f28fda X-Msg-Generator: CA X-RootMTR: 20190417074834eucas1p1faa327cb6394d899a8e107ba61f28fda X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190417074834eucas1p1faa327cb6394d899a8e107ba61f28fda References: <1555487288-4777-1-git-send-email-l.luba@partner.samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds posibility to choose what type of data should be counted by the PPMU counter. Now the type comes from DT where the event has been defined. When there is no 'event-data-type' the default value is used, which is 'read data in bytes'. It is needed when you want to know not only read+write data bytes but i.e. only write data in byte, or number of read requests, etc. Signed-off-by: Lukasz Luba --- drivers/devfreq/event/exynos-ppmu.c | 38 +++++++++++++++++++++++++------------ include/linux/devfreq-event.h | 6 ++++++ 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c index c61de0b..e5f81a5 100644 --- a/drivers/devfreq/event/exynos-ppmu.c +++ b/drivers/devfreq/event/exynos-ppmu.c @@ -140,6 +140,7 @@ static int exynos_ppmu_set_event(struct devfreq_event_dev *edev) int id = exynos_ppmu_find_ppmu_id(edev); int ret; u32 pmnc, cntens; + u32 evt_sel = edev->desc->data_type; if (id < 0) return id; @@ -154,9 +155,12 @@ static int exynos_ppmu_set_event(struct devfreq_event_dev *edev) if (ret < 0) return ret; - /* Set the event of Read/Write data count */ - ret = regmap_write(info->regmap, PPMU_BEVTxSEL(id), - PPMU_RO_DATA_CNT | PPMU_WO_DATA_CNT); + /* Check if the data type has been defined in DT, use default if not */ + if (evt_sel == UINT_MAX) + evt_sel = PPMU_RO_DATA_CNT | PPMU_WO_DATA_CNT; + + /* Set the event of Read or Write or both (RDWR) data count */ + ret = regmap_write(info->regmap, PPMU_BEVTxSEL(id), evt_sel); if (ret < 0) return ret; @@ -357,6 +361,7 @@ static int exynos_ppmu_v2_set_event(struct devfreq_event_dev *edev) unsigned int pmnc, cntens; int id = exynos_ppmu_find_ppmu_id(edev); int ret; + u32 evt_sel = edev->desc->data_type; /* Enable all counters */ ret = regmap_read(info->regmap, PPMU_V2_CNTENS, &cntens); @@ -368,24 +373,28 @@ static int exynos_ppmu_v2_set_event(struct devfreq_event_dev *edev) if (ret < 0) return ret; - /* Set the event of Read/Write data count */ + + /* Set the event of proper data type counting. + * Check if the data type has been defined in DT, + * use default if not. + */ switch (id) { case PPMU_PMNCNT0: case PPMU_PMNCNT1: case PPMU_PMNCNT2: - ret = regmap_write(info->regmap, PPMU_V2_CH_EVx_TYPE(id), - PPMU_V2_RO_DATA_CNT | PPMU_V2_WO_DATA_CNT); - if (ret < 0) - return ret; + if (evt_sel == UINT_MAX) + evt_sel = PPMU_V2_RO_DATA_CNT | PPMU_V2_WO_DATA_CNT; break; case PPMU_PMNCNT3: - ret = regmap_write(info->regmap, PPMU_V2_CH_EVx_TYPE(id), - PPMU_V2_EVT3_RW_DATA_CNT); - if (ret < 0) - return ret; + if (evt_sel == UINT_MAX) + evt_sel = PPMU_V2_EVT3_RW_DATA_CNT; break; } + ret = regmap_write(info->regmap, PPMU_V2_CH_EVx_TYPE(id), evt_sel); + if (ret < 0) + return ret; + /* Reset cycle counter/performance counter and enable PPMU */ ret = regmap_read(info->regmap, PPMU_V2_PMNC, &pmnc); if (ret < 0) @@ -508,6 +517,7 @@ static int of_get_devfreq_events(struct device_node *np, struct device *dev = info->dev; struct device_node *events_np, *node; int i, j, count; + int ret; events_np = of_get_child_by_name(np, "events"); if (!events_np) { @@ -544,6 +554,10 @@ static int of_get_devfreq_events(struct device_node *np, desc[j].driver_data = info; of_property_read_string(node, "event-name", &desc[j].name); + ret = of_property_read_u32(node, "event-data-type", + &desc[j].data_type); + if (!ret) + desc[i].data_type = UINT_MAX; j++; } diff --git a/include/linux/devfreq-event.h b/include/linux/devfreq-event.h index 4db00b0..cc160b1 100644 --- a/include/linux/devfreq-event.h +++ b/include/linux/devfreq-event.h @@ -81,14 +81,20 @@ struct devfreq_event_ops { * struct devfreq_event_desc - the descriptor of devfreq-event device * * @name : the name of devfreq-event device. + * @data_type : the data type which is going to be counted in the register. * @driver_data : the private data for devfreq-event driver. * @ops : the operation to control devfreq-event device. * * Each devfreq-event device is described with a this structure. * This structure contains the various data for devfreq-event device. + * The data_type describes what is going to be counted in the register. + * It might choose to count e.g. read requests, write data in bytes, etc. + * The full supported list of types is present in specyfic header in: + * include/dt-bindings/pmu/. */ struct devfreq_event_desc { const char *name; + u32 data_type; void *driver_data; const struct devfreq_event_ops *ops; From patchwork Wed Apr 17 07:48:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Luba X-Patchwork-Id: 10904731 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 7B3A917E6 for ; Wed, 17 Apr 2019 07:48:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B36F289BD for ; Wed, 17 Apr 2019 07:48:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F325289F7; Wed, 17 Apr 2019 07:48:46 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE924289BD for ; Wed, 17 Apr 2019 07:48:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731171AbfDQHsj (ORCPT ); Wed, 17 Apr 2019 03:48:39 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:40695 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731228AbfDQHsj (ORCPT ); Wed, 17 Apr 2019 03:48:39 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190417074837euoutp0297887a116b3c821ece198b0cefebfec4~WM3lSg0Jc0434204342euoutp02- for ; Wed, 17 Apr 2019 07:48:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190417074837euoutp0297887a116b3c821ece198b0cefebfec4~WM3lSg0Jc0434204342euoutp02- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1555487317; bh=DYDvjBZVL6sxzkf5UpTzzrSynrTk6h2kigPuEB7raUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FJ3gOqAcU8bcdCbkL06wHOIkeFLjmZ/ikF/CoUi8LsnT0A0uwu1AIn9afVB96SMrm JMJB8dNdgxA5v+FRT+kWSSg+WUetMb+PrEvi32tn8z0KxT1aJiVj9prMmDWX79u2U/ T3JY9WxeXwFSX7WD/cV8l5jvlK+rRhJROGjdEu+E= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190417074836eucas1p187361f4b6d6a961c8464cf6e05e8f13e~WM3kjIWYZ0763207632eucas1p1h; Wed, 17 Apr 2019 07:48:36 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 5A.C8.04298.45AD6BC5; Wed, 17 Apr 2019 08:48:36 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190417074835eucas1p19319bedd176d55e10b272881b7c68919~WM3jbKOoy0044400444eucas1p1E; Wed, 17 Apr 2019 07:48:35 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190417074835eusmtrp2fe677ab59dfdb696b0d58c58ff1d9e3d~WM3jLFMyO2697626976eusmtrp2K; Wed, 17 Apr 2019 07:48:35 +0000 (GMT) X-AuditID: cbfec7f2-f13ff700000010ca-6a-5cb6da54505f Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 60.69.04146.35AD6BC5; Wed, 17 Apr 2019 08:48:35 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190417074834eusmtip16c1ff37602f19f9e71ff0754d669177a~WM3ihm0t13147631476eusmtip1v; Wed, 17 Apr 2019 07:48:34 +0000 (GMT) From: Lukasz Luba To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: b.zolnierkie@samsung.com, krzk@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, cw00.choi@samsung.com, kyungmin.park@samsung.com, m.szyprowski@samsung.com, s.nawrocki@samsung.com, myungjoo.ham@samsung.com, kgene@kernel.org, l.luba@partner.samsung.com Subject: [PATCH 3/3] Documentation: devicetree: add PPMU events description Date: Wed, 17 Apr 2019 09:48:08 +0200 Message-Id: <1555487288-4777-4-git-send-email-l.luba@partner.samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555487288-4777-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VSfSyUcRzvd8899zzo9DiW3xDbNVtqkantt2WNlu3oj6wXM2k6eUJxdI+X 0LjIa4kQt8odvaDD1HVJJhUnS3mLiNiMhuWl5VwxG3l6rvXfZ5/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Fgzbw2jx6ZVnWwem5fUexx8t4fJo2/LKkaPz5vkAtii 9GyK8ktLUhUy8otLbJWiDS2M9AwtLfSMTCz1DI3NY62MTJX07WxSUnMyy1KL9O0S9DJ+7HnN WDCFu2L6wkXsDYybOLsYOTkkBEwk5m2ax9jFyMUhJLCUUeLC2h3MEAkxiUn7trND2MISf651 sUEUfWKUOHLoMVARBwebgJ7EjlWFIHERgeWMEsdWvWUGcZgFpjNJ3Hl3hQWkW1jAW2LSjCZW EJtFQFWifepVdpBmXgFPifn/wyAWyEncPNcJtphTwEti3oNTTCC2EFDJ1gMLWCYw8i1gZFjF KJJaWpybnltsqFecmFtcmpeul5yfu4kRGBXbjv3cvIPx0sbgQ4wCHIxKPLwrfm6NEWJNLCuu zD3EKMHBrCTC65iyJUaINyWxsiq1KD++qDQntfgQoynQTROZpUST84ERm1cSb2hqaG5haWhu bG5sZqEkznveoDJKSCA9sSQ1OzW1ILUIpo+Jg1OqgVG8+9Ph3YEVCYbxX3kia0KlXhgG/5tg 5bhQml2svsRj//mlt6V/KrD+jku/x36cYX23yYtDqyannJ9SXTbh84N1V02KzTtE35wM9fk9 Q9rbbcvmbC3R/FvhK/Sy3NZtuMt5N9eNjVlMN2A26yz9vjPyGboXixU5FnGWBFRna8w3vfVf v9+xU4mlOCPRUIu5qDgRACZuz/ygAgAA X-CMS-MailID: 20190417074835eucas1p19319bedd176d55e10b272881b7c68919 X-Msg-Generator: CA X-RootMTR: 20190417074835eucas1p19319bedd176d55e10b272881b7c68919 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190417074835eucas1p19319bedd176d55e10b272881b7c68919 References: <1555487288-4777-1-git-send-email-l.luba@partner.samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Extend the documenation by events description with new 'event-data-type' field. Add example how the event might be defined in DT. Signed-off-by: Lukasz Luba --- .../devicetree/bindings/devfreq/event/exynos-ppmu.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/devfreq/event/exynos-ppmu.txt b/Documentation/devicetree/bindings/devfreq/event/exynos-ppmu.txt index 3e36c1d..47feb5f 100644 --- a/Documentation/devicetree/bindings/devfreq/event/exynos-ppmu.txt +++ b/Documentation/devicetree/bindings/devfreq/event/exynos-ppmu.txt @@ -145,3 +145,21 @@ Example3 : PPMUv2 nodes in exynos5433.dtsi are listed below. reg = <0x104d0000 0x2000>; status = "disabled"; }; + +The 'event' type specified in the PPMU node defines 'event-name' +which also contains 'id' number and optionally 'event-data-type'. + +Example: + + events { + ppmu_leftbus_0: ppmu-event0-leftbus { + event-name = "ppmu-event0-leftbus"; + event-data-type = ; + }; + }; + +The 'event-data-type' defines the type of data which shell be counted +by the counter. You can check include/dt-bindings/pmu/exynos_ppmu.h for +all possible type, i.e. count read requests, count write data in bytes, +etc. This field is optional and when it is missing, the driver code will +use default data type.