From patchwork Tue Mar 21 13:51:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chowdhury X-Patchwork-Id: 13182801 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 251ABC6FD1D for ; Tue, 21 Mar 2023 13:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cP0nB5brwLAiyTTa8DfVpgX4ig0bbSheqscIOFycRJk=; b=u5NtPqnWdT1P0t RHzlT5V4aK1e68UjA2k9jSBN5Y908gCOMsPyNd1aFp65X2wKY7r104AsjZDv8qSLiWWHUqukrvRrC 7PQc3kz6D/EQISS8nXMNlOH8nV8gWoed8OtWMvsXfQORNq+Hj+VmEAa7LGh95OQWbenZEQ57sjSPY U+oByakANKuBNeXR2R7GOvOjMzRjGrMqWnNpNOPkCmg/aJ0yUSH3bCIJG3yZuC0s+bET/XTFqP5jH GI+0gxQwRUCTH1i2owE1gyd6xOMvWZIoWKzWyNXNamWZJ/mP9KN1GMbU9x5xaAcFFJHgNEFdEGmDJ 8NrNIu0LG0Gza45hiSKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pecQK-00Cbp5-1i; Tue, 21 Mar 2023 13:53:12 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pecQE-00Cbl1-2N for linux-arm-kernel@lists.infradead.org; Tue, 21 Mar 2023 13:53:08 +0000 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32LDK4tc014283; Tue, 21 Mar 2023 13:52:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=e9T7n9fbYXhZz/J9ZMJRMQ4mCsotySzlW80aRDHI0nc=; b=DKbdQ5oW/cZosU934ogxTlVADWMYaXASyPLYk3/ZHAEXJ4cnjdMqUzUKcXRigd0ffEjd Ri6eRFQIynN4TtYK86UK+DrM37VvIVFwjCyaoxCD+ke7778RiLVu8Mx+IGymd/AmFZTE 26nUyL80lhKWU2H6Qam9arAB3PSmU4qj1YsbBHYERJI30m6lOwXh9lmUdmbgCNM2hJ52 VjnD3WnmYldSRy2m4mGTGhAXNbe4VWwrR8aUKZoaslpWONHD+kZRXddV2Dq5CbCM4cE+ AtPIYYFoRa2dPUEwsEbxPFy8XvhPte5wuidKtraafv8XRzD9V7QjlVrD1OeBZ6b53ee4 jw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pfdc403hy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 13:52:59 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 32LDqwkh020309 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 13:52:58 GMT Received: from blr-ubuntu-525.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 21 Mar 2023 06:52:54 -0700 From: Souradeep Chowdhury To: Andy Gross , Konrad Dybcio , Krzysztof Kozlowski , Bjorn Andersson , Rob Herring CC: , , , , Sibi Sankar , Rajendra Nayak , Souradeep Chowdhury Subject: [PATCH V1 1/4] dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM Date: Tue, 21 Mar 2023 19:21:48 +0530 Message-ID: <1589f33deda07cb9f9e6c3c26bce6e02e53c168e.1679403696.git.quic_schowdhu@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 1T4j04oQO0fzXfMOLEYdcwmVwn3K3TS7 X-Proofpoint-ORIG-GUID: 1T4j04oQO0fzXfMOLEYdcwmVwn3K3TS7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-21_10,2023-03-21_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 mlxscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 suspectscore=0 priorityscore=1501 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303210108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230321_065306_899423_9D0674DA X-CRM114-Status: GOOD ( 14.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org All Qualcomm bootloaders log useful timestamp information related to bootloader stats in the IMEM region. Add the child node within IMEM for the boot stat region containing register address and compatible string. Signed-off-by: Souradeep Chowdhury --- .../devicetree/bindings/sram/qcom,imem.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml index 665c06e..c8c3890 100644 --- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml +++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml @@ -48,6 +48,26 @@ patternProperties: $ref: /schemas/remoteproc/qcom,pil-info.yaml# description: Peripheral image loader relocation region + "^boot-stat@[0-9a-f]+$": + type: object + description: + node for boot stat. + + properties: + compatible: + items: + - const: qcom,imem-boot_stats + + reg: + maxItems: 1 + description: + The base address of the register region in case of + imem boot stats. + + required: + - compatible + - reg + required: - compatible - reg From patchwork Tue Mar 21 13:51:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chowdhury X-Patchwork-Id: 13182800 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 71FC0C7619A for ; Tue, 21 Mar 2023 13:54:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oob+c5D89V+mGu0xxjziItuO97fdEnSWmzf538e+Gnk=; b=MEMa+Hz3TPAEVW igIUWwApJW/9gBBmhJZvomMQt/i9qOqCFZGuD2r1TRh5TMJldNQ0Ac6VkJ2evHQ4bKK0ArcXziBYw e3zhZQZ+obB8iZ1LleZYhr3uxhaOwqZTXq5sqFEY2aHoGpsWLr76eRe7QFz16siHVItAc7cA68u5b /knvMvP35wvvUq9DMYHPYWlI9SptycFXiZoxTW4pOZsySxixV6ZkhorfA92ArjMEBAU9GTHbtJtkL xVYvPwN7PsKKVfJqMF7wQs+I3TN1rNplehQsmYqkr83/ioz6WRYkxF3wkmdsUHbpt17yNNixNmmqX p69ammUQZA/C7KAPoeiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pecQL-00CbpV-2Z; Tue, 21 Mar 2023 13:53:13 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pecQF-00Cbmn-0J for linux-arm-kernel@lists.infradead.org; Tue, 21 Mar 2023 13:53:09 +0000 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32LDaxTg014539; Tue, 21 Mar 2023 13:53:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=0rmgemONNJfGZzVwQn3IfTQ2H6gFeJjA70ihHxeH6+o=; b=GSOdZsr/j1NYZtXdRIDVOiPIfKPLXdN0bUxex/RT0XaF7SvBqNvgAPgZFgr+Fon50YYe Gr23PPWts5+4CsEnjgEzXjnkBqMzRDBlOl0+RjSwhYHxsDTO1tmq0YEfCsYRKmsc2s/8 XXFzn8RQDJ590wv49MuTb1nM4eTohyp2FXbXM4MESius7k/OPZf64mU9tLHwhL5uEQiU 3bltUkn4bkXSYtGo6g6rTMtZ8YlZwBNViB4VuvNz5qwtLPQDkHzzTS4NRZwPusWG+r/P 6YfOMfKmD5XGGbZHAavpb70XJHXHcd2cnwd/BXBx5v6LYssXMnKOVEQtj7stbxzthY60 eA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pfdm4g1qk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 13:53:03 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 32LDr24g020370 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 13:53:02 GMT Received: from blr-ubuntu-525.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 21 Mar 2023 06:52:58 -0700 From: Souradeep Chowdhury To: Andy Gross , Konrad Dybcio , Krzysztof Kozlowski , Bjorn Andersson , Rob Herring CC: , , , , Sibi Sankar , Rajendra Nayak , Souradeep Chowdhury Subject: [PATCH V1 2/4] dt-bindings: soc: qcom,mpm-sleep-counter: Add the dtschema Date: Tue, 21 Mar 2023 19:21:49 +0530 Message-ID: <576e53a1d0ef218536da976102b4cc207436ec1d.1679403696.git.quic_schowdhu@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: RXt_LeJy-5HaMCYtNhCmjyrwFMGMZsGB X-Proofpoint-GUID: RXt_LeJy-5HaMCYtNhCmjyrwFMGMZsGB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-21_10,2023-03-21_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 phishscore=0 bulkscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303210108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230321_065307_250685_2E7BAB9C X-CRM114-Status: GOOD ( 18.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the device tree bindings for the module power manager sleep counter. Signed-off-by: Souradeep Chowdhury --- .../bindings/soc/qcom/qcom,mpm-sleep-counter.yaml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,mpm-sleep-counter.yaml diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,mpm-sleep-counter.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,mpm-sleep-counter.yaml new file mode 100644 index 0000000..f9f46b7 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,mpm-sleep-counter.yaml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/qcom/qcom,mpm-sleep-counter.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MPM Sleep Counter + +maintainers: + - Souradeep Chowdhury + +description: | + MPM(Module Power Manager) has a sleep counter which is used to track + various stages of the boot process in Qualcomm. + +properties: + compatible: + items: + - const: qcom,mpm2-sleep-counter + + reg: + items: + - description: MPM Sleep Counter Base + + clock-frequency: + description: Frequency for the sleep counter + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + mpm2-sleep-counter@c221000{ + compatible = "qcom,mpm2-sleep-counter"; + reg = <0xc221000 0x1000>; + clock-frequency = <32768>; + }; From patchwork Tue Mar 21 13:51:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chowdhury X-Patchwork-Id: 13182803 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8A42C7619A for ; Tue, 21 Mar 2023 13:54:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jMxG95pT8aNU8gJ0FGMv9C1ddGbfqAIUaEPd5oN9oPM=; b=Q2IoZKcRfaHaWN qbd74pRhHJ3SyEsKDlhOGetMcsyXwVZ+DhbNkRjVKf6V9fMvifrCftz1g95VapySZ42/tEYK2gsRv +Gi+efKcunyh422ekQAFvqqVufLZR5KNsoYxA+m5qGZALe5h+GEvnJL5JEgEZ0ioRN3nEUYbXWb7K 8ILiYVZJe1m2jf3/pAFwJcwRaLNUlTRxBBHB0ZDimVI3HormBSXQUhKkx7ppwNZjv3EmmuyLVQEej Bsw8xaE+ToVY6Py8bxhi5Gx9OwB2Rv3/W7SvkROrhZ5OwY2OWStc2K9fmJlSfFYL0MgWmPi66TZa0 LHcA8RIEEITjKB1e/YIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pecQa-00CbwY-37; Tue, 21 Mar 2023 13:53:28 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pecQJ-00CboV-1V for linux-arm-kernel@lists.infradead.org; Tue, 21 Mar 2023 13:53:21 +0000 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32L5VOWo005702; Tue, 21 Mar 2023 13:53:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=U8UOMbDwFI06IsZqUd4WADb+CIUPSSIb2pfTfxi6t7s=; b=ccB9TttkRBJ2VjwW02fDNlTKclqp1bwK5agdnoOvUjf2oKTF0q7Se82aLZv7+4g00M+D AH1StuGS/OOZlFV8e4KFzEMd/kdSimGBwioKMYlEim9DxJAE3UgVkmztUfcheldOiouI lNAZ3PenwT44z5BiWE6hzpOlF57T0+vVmDW4sJI3t0LOmp8TehuetpiSte5rdC0MOrg8 OHTlAj4B8fKmGSMZ1iSW+0/YuDZuXBq3JyEJFEJWYcOB4bCBbOPmeCYTH1O3B85z4bRa u0/3GlYBUpbtSko+SLC6YuZyse6B6tX6f6L3qEpnRhDbLkoCH4QI9RTuhiYDE+njT6Mt QQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pesyy355k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 13:53:07 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 32LDr6OH015433 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 13:53:06 GMT Received: from blr-ubuntu-525.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 21 Mar 2023 06:53:02 -0700 From: Souradeep Chowdhury To: Andy Gross , Konrad Dybcio , Krzysztof Kozlowski , Bjorn Andersson , Rob Herring CC: , , , , Sibi Sankar , Rajendra Nayak , Souradeep Chowdhury Subject: [PATCH V1 3/4] soc: qcom: boot_stat: Add Driver Support for Boot Stats Date: Tue, 21 Mar 2023 19:21:50 +0530 Message-ID: <3f385562845ae26d519940ca8098fde89282991b.1679403696.git.quic_schowdhu@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: b_e5YTNIaUz7fmHAg2i6iLeB3DbKnGvS X-Proofpoint-ORIG-GUID: b_e5YTNIaUz7fmHAg2i6iLeB3DbKnGvS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-21_10,2023-03-21_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 spamscore=0 malwarescore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303210108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230321_065311_632338_88BA43CF X-CRM114-Status: GOOD ( 30.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org All of Qualcomm's proprietary Android boot-loaders capture boot time stats, like the time when the bootloader started execution and at what point the bootloader handed over control to the kernel etc. in the IMEM region. This information is captured in a specific format by this driver by mapping a structure to the IMEM memory region and then accessing the members of the structure to print the information. This information is useful in verifying if the existing boot KPIs have regressed or not. A sample log in SM8450(waipio) device is as follows:- KPI: Pre ABL Time = 3s KPI: ABL Time = 14s KPI: Kernel MPM timestamp = 890206 The Module Power Manager(MPM) sleep counter starts ticking at the PBL stage and the timestamp generated by the sleep counter is logged by the Qualcomm proprietary bootloader(ABL) at two points-> First when it starts execution which is logged here as "Pre ABL Time" and the second when it is about to load the kernel logged as "ABL Time". Both are logged in the unit of seconds. The current kernel timestamp is printed by the boot_stats driver as well. Signed-off-by: Souradeep Chowdhury --- drivers/soc/qcom/Kconfig | 7 +++ drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/boot_stats.c | 108 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 drivers/soc/qcom/boot_stats.c -- 2.7.4 diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index d11bda2..2cfdbb7 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -79,6 +79,13 @@ config QCOM_DCC driver provides interface to configure DCC block and read back captured data from DCC's internal SRAM. +config QCOM_BOOTSTAT + tristate "Qualcomm Technologies, Boot Stat driver" + depends on ARCH_QCOM || COMPILE_TEST + help + This option enables driver for boot stats. Boot stat driver prints + the kernel bootloader information by accessing the imem region. + config QCOM_KRYO_L2_ACCESSORS bool depends on ARCH_QCOM && ARM64 || COMPILE_TEST diff --git a/drivers/soc/qcom/Makefile b/drivers/soc/qcom/Makefile index 3b92c6c..e9b1e52 100644 --- a/drivers/soc/qcom/Makefile +++ b/drivers/soc/qcom/Makefile @@ -5,6 +5,7 @@ obj-$(CONFIG_QCOM_GENI_SE) += qcom-geni-se.o obj-$(CONFIG_QCOM_COMMAND_DB) += cmd-db.o obj-$(CONFIG_QCOM_CPR) += cpr.o obj-$(CONFIG_QCOM_DCC) += dcc.o +obj-$(CONFIG_QCOM_BOOTSTAT) += boot_stats.o obj-$(CONFIG_QCOM_GSBI) += qcom_gsbi.o obj-$(CONFIG_QCOM_MDT_LOADER) += mdt_loader.o obj-$(CONFIG_QCOM_OCMEM) += ocmem.o diff --git a/drivers/soc/qcom/boot_stats.c b/drivers/soc/qcom/boot_stats.c new file mode 100644 index 0000000..59b5ab6 --- /dev/null +++ b/drivers/soc/qcom/boot_stats.c @@ -0,0 +1,108 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2013-2019, 2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +/** + * struct boot_stats - timestamp information related to boot stats + * @bootloader_start: Time for the starting point of the abl bootloader + * @bootloader_end: Time when the kernel starts loading from abl bootloader + */ +struct boot_stats { + u32 bootloader_start; + u32 bootloader_end; +} __packed; + +static struct boot_stats __iomem *boot_stats; +static void __iomem *mpm_counter_base; +static u32 mpm_counter_freq; + +static int mpm_parse_dt(void) +{ + struct device_node *np_imem, *np_mpm2; + + np_imem = of_find_compatible_node(NULL, NULL, + "qcom,imem-boot_stats"); + if (!np_imem) { + pr_err("can't find qcom,imem node\n"); + return -ENODEV; + } + boot_stats = of_iomap(np_imem, 0); + if (!boot_stats) { + pr_err("boot_stats: Can't map imem\n"); + goto err1; + } + + np_mpm2 = of_find_compatible_node(NULL, NULL, + "qcom,mpm2-sleep-counter"); + if (!np_mpm2) { + pr_err("mpm_counter: can't find DT node\n"); + goto err2; + } + + if (of_property_read_u32(np_mpm2, "clock-frequency", &mpm_counter_freq)) + goto err2; + + if (of_get_address(np_mpm2, 0, NULL, NULL)) { + mpm_counter_base = of_iomap(np_mpm2, 0); + if (!mpm_counter_base) { + pr_err("mpm_counter: can't map counter base\n"); + goto err2; + } + } else { + goto err2; + } + + return 0; + +err2: + of_node_put(np_mpm2); +err1: + of_node_put(np_imem); + return -ENODEV; +} + +static void print_boot_stats(void) +{ + u32 pre_abl_time = readl_relaxed(&boot_stats->bootloader_start) / mpm_counter_freq; + u32 abl_time = readl_relaxed(&boot_stats->bootloader_end) / mpm_counter_freq; + + pr_info("KPI: Pre ABL Time = %us\n", pre_abl_time); + pr_info("KPI: ABL Time = %us\n", abl_time); + pr_info("KPI: Kernel MPM timestamp = %u\n", readl_relaxed(mpm_counter_base)); +} + +static int __init boot_stats_init(void) +{ + int ret; + + ret = mpm_parse_dt(); + if (ret < 0) + return -ENODEV; + + print_boot_stats(); + + iounmap(boot_stats); + iounmap(mpm_counter_base); + + return 0; +} +module_init(boot_stats_init); + +static void __exit boot_stats_exit(void) +{ +} +module_exit(boot_stats_exit) + +MODULE_DESCRIPTION("Qualcomm Technologies Inc. Boot Stat driver"); +MODULE_LICENSE("GPL"); From patchwork Tue Mar 21 13:51:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souradeep Chowdhury X-Patchwork-Id: 13182802 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 19B28C74A5B for ; Tue, 21 Mar 2023 13:54:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=i2s3e4LW00M8vFTwyotExYCIO9X4WMpcBfzs+nbHUEk=; b=13lyzpTVgFbE9b Pm0zcT6HpnyP1JqhQF0/+QRPai5b6jYCOt7mF7MKpyMGyceak8AmufxN/Dqd4OFDjmNj0qPhERy44 70JLAs6jYH+oE1Ggl2fBMo7x6/dLg70uIS5QCYCQP+CstaOPt1Ldn1XxgnXrRN6L8yy8B0/VlanTN WWmCzQwJyD4x8w9U/AFDlxK+9J1Ynq1WU6LgnTPy5q/KBrbVIum+5rpuT2kFD51azVre3EuQKFEx5 99LWJ5SYQ9fI2Dux4cI93M/zcscIMjGUx0DoaL2K1wzXe3C7wbd5vf9HZV1EwFH/Sjw6qcbS8xpyM 1W/2Tp/roZhUqURRsGIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pecQZ-00CbvS-2E; Tue, 21 Mar 2023 13:53:27 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pecQM-00Cbpt-2R for linux-arm-kernel@lists.infradead.org; Tue, 21 Mar 2023 13:53:20 +0000 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32LDafnB014293; Tue, 21 Mar 2023 13:53:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=GlbQ6R7BvqzcBCmdNU07/9LL8nz61k8DP3MPvKU1WtM=; b=JsYzteUgebJm6FcRLGKpNiuat2rOarSZA9IMwOypnuHBlvO59tcvFIuF1RnZeG8OUk9t xoN0ZcZjq/dRtygSmknuH918JpLoJ/rjTtc7D8SuPwbs3F1m8m6ZM0HpYHFEt/QK1d5C PwG3Da2DL4CPeD30X2TYRMrS5h8KXoC9ASyEBklEIX5NMyFM402eSrxkpXStB3rn/6YJ zqU1BUx8M6jHX66/g1wR5vtIqSAytyTjPOPp7iVLE/4XQYJWUCBcRFSfY1znqNpd1qU/ lMSpBEX+F6rBiQ9ImS43YEyETle/wfnGJ7RtZgFCYBh2lnTMv8pUeLSIoQK4jfDNpZx0 bA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pfdm4g1qs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 13:53:11 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 32LDrA8E002493 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 13:53:10 GMT Received: from blr-ubuntu-525.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 21 Mar 2023 06:53:06 -0700 From: Souradeep Chowdhury To: Andy Gross , Konrad Dybcio , Krzysztof Kozlowski , Bjorn Andersson , Rob Herring CC: , , , , Sibi Sankar , Rajendra Nayak , Souradeep Chowdhury Subject: [PATCH V1 4/4] MAINTAINERS: Add the entry for boot_stats driver support Date: Tue, 21 Mar 2023 19:21:51 +0530 Message-ID: <40cc0359245bd1e29c6c95a12ffb96fd32d63142.1679403696.git.quic_schowdhu@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: uKz3rmpAgc_s3uWjgh1ylVZNptF6Wy0p X-Proofpoint-GUID: uKz3rmpAgc_s3uWjgh1ylVZNptF6Wy0p X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-21_10,2023-03-21_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 phishscore=0 bulkscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303210108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230321_065314_937487_AC7A1EB2 X-CRM114-Status: GOOD ( 15.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the entries for all the files added as a part of driver support for boot stats. Signed-off-by: Souradeep Chowdhury --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f2c3d47..6a55577 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17071,6 +17071,13 @@ L: netdev@vger.kernel.org S: Supported F: drivers/net/ipa/ +QCOM BOOT_STATS DRIVER +M: Souradeep Chowdhury +L: linux-arm-msm@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/soc/qcom/qcom,mpm-sleep-counter.yaml +F: drivers/soc/qcom/boot_stats.c + QEMU MACHINE EMULATOR AND VIRTUALIZER SUPPORT M: Gabriel Somlo M: "Michael S. Tsirkin"