From patchwork Wed Jun 1 09:41:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 578374 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9A60C433EF for ; Wed, 1 Jun 2022 09:40:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350373AbiFAJk0 (ORCPT ); Wed, 1 Jun 2022 05:40:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349789AbiFAJkX (ORCPT ); Wed, 1 Jun 2022 05:40:23 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2053.outbound.protection.outlook.com [40.107.20.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7B7E49913; Wed, 1 Jun 2022 02:40:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YXwZ/QtxeqYNNiWc05a/3quKNvhOELZqUzHh++7NA2VHKcegTTekLVO/NM3b9aArAOyE1tSS1Q3a3k8fwH2HQ/0454ACbb/z0Tr+0NdrBYpbBYx03RUnIxO0qkfZeDosWSuB4MludDfZzBdPpAcXrMBeqIuRZK67PUktE+3ZbUhUSVQpNnAgo8MgyUF2/m/BLDokQJjV1n6UAvpih7y5Kvw8758khQtsHwjSrHZj1QpKe/pQGCXglYvRPN9TqJosktAmp/KqHu9b9lZp4/5Il+CIAkNjm7GPKXrYPG1nGOYgPyUeGpsLuC3UoG6CA94gJXAkGN3rMuRgpp12a06sxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RAiHltzt9iPXWs7va5jg1kDM5JO/U1I2D5o0n0klu5k=; b=XGmt/wP1XwgQVqVldtdAoBmOhaMjqKcsgLZ0Y2FanAut2JHcP/FZcTvyg7+gmq9KBNwIe9Kp/zZ7mGuUWhYBJlzkEGo92ITvXZ5ra33IYNb55rvGvWv8UAG2wAXsA/MDbt3KBC554L5XUBelYCenneVJg8tObzgevmsBkoJt+KJFzSpI3YrfAq8GUjLCZ3OX280epUi3Eit07h6LylAzlH83xKcVYQnDA/+wDciwyF8ibIyOnpSiBtGKx8TDSpLo1LBnJhHCOg/Dxj6fVH750uDoaF+OPglpQ9EdeWyk5MkMoFD4OLmiJJPgadyNfJM4b4VQagWD2KpX3ZOj4GkH4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RAiHltzt9iPXWs7va5jg1kDM5JO/U1I2D5o0n0klu5k=; b=IQcxPMJ4J7wPjLzZx4lymh46jIxk61fHzJkldYYD7AhssdK3q+Csmb9BJggUfFxlwWsziCbMRXvEeuoV0pV7ZKa0+okc9DRvsBog6/BW9O/dZpWwM78Dvw/gEM/1dCJrYgQXTYDQKbt3ExW3kdru2h0U//f13/fUoWa2koplXyA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AM0PR04MB6498.eurprd04.prod.outlook.com (2603:10a6:208:16d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Wed, 1 Jun 2022 09:40:19 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5%9]) with mapi id 15.20.5293.019; Wed, 1 Jun 2022 09:40:19 +0000 From: "Peng Fan (OSS)" To: djakov@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, abel.vesa@nxp.com, abailon@baylibre.com, l.stach@pengutronix.de, laurent.pinchart@ideasonboard.com, marex@denx.de, paul.elder@ideasonboard.com, Markus.Niebel@ew.tq-group.com, aford173@gmail.com Cc: kernel@pengutronix.de, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, Peng Fan Subject: [PATCH 1/8] dt-bindings: interconnect: imx8m: Add bindings for imx8mp noc Date: Wed, 1 Jun 2022 17:41:49 +0800 Message-Id: <20220601094156.3388454-2-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220601094156.3388454-1-peng.fan@oss.nxp.com> References: <20220601094156.3388454-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0078.apcprd02.prod.outlook.com (2603:1096:4:90::18) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4e9079ca-7ea0-4364-36fb-08da43b2bdc4 X-MS-TrafficTypeDiagnostic: AM0PR04MB6498:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mS/BFILwofD2GWIJTlU25RbbGxOAyKHMMXgBzQ/7U2G77/62/sEdv/Rhu03FyQWKUTaQ7of4MWAoC+cgKvlwXrJImJXMxizzp59/qeYgI4ar7ExhpkdRdgPrhNdjx9SvclDOWpbs329LW83G3RgH8sGx5d/9cPaGVCxi7IfLjTlPLJKRjzKNNHmX5JvgNLiC/kitLuhclEb4Y7wSjcxGu5e3IdkG4mKM9SOo4J3s6VhRsFhoCTWA+izHlbdT03jukH963qL246bKpM5iq/5USwnUotR6G1eaugMUkjFyTUXr+lq7nrTlWCJ9Arm0QoXPWVLp/IU4JTqvJpnWZl182mKyy3+opcorjMtocc8GzjGUG9qZUx0xQ1/XnhNJnet8WCiAGgO1YVMDOc7R3fHnDhHyh7NfHUg8cKRJimKUDxcmK65qEVxEYHkE7DGmMn65C+ac7hdIK72U1hV+sKa7bd77Um94RLExXEuXjE3mtqEiaAsLURHY8kPjPMSP2wz+R7yM0iUa9UN8oojlNZEXtMl3IhN69KROhhniQv3gl33e8kvJrxkCS9nA2QcR366Kxm3At7tCRlcxbswRTNW1/z03zAbzGGcYun2z2b4l1vRcJ3G1iuB/rZZ88QS52MYkPaL669wlPXJtRTi/DbZn6aJHnhtM8XHGVtjz/SqKBUamnlvXHmHt3SFWAVmXlqzPUiDxhPwAB8ADmg1rr2DTUGpc40JVheTnPVfM1S+2/6vEwHxuvNK4Eq9IaSVHWjX9 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9417.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(921005)(52116002)(4744005)(2906002)(6506007)(508600001)(316002)(6666004)(6486002)(1076003)(7416002)(86362001)(26005)(2616005)(8936002)(4326008)(66946007)(66476007)(5660300002)(66556008)(38100700002)(38350700002)(186003)(8676002)(6512007)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SD9sbDCTS4M84InYAoaSFJOojywvEdH/jsF67st0yV/QVf9EBPmVyiJ6dlzr7yEHMhzZ/0slDH2po0ke27ghskqQzRmgGfh7sZVicZMB6jl6IwGi++oqLTjif4LBZo1UWSbBGwlO/0HItk4WZjyZLDbKBdwueDPzUVWoxRkeha6gOGzrPwyxPRLh3fli0lMVpNQ/6sBT70sKFcEzs5jWQG5SieJgNRORN1XJLv3nxwecn1LwAlXkQUOcm6sJXbt/z3IC1rIcZ+eLgjgfxdbYE2ix4mBIdJcmpirmae+RLzelNagF5hf8ffAqtF0+1eI0yRrPGcDg/Y28kiEEEcduTGRxcmVSL+v8jxb0y5Z5yDD6TEgyqtJ7cSxpx0CtyDdNR6YCRdLvhkppAwJNwM5Gk7MumzUr1VIe3eB0h8XQNSYhSpEk88wcqaF+BLS87DX3+hIwqWH+fw+7gUCrvmjxg7LLM12irj22vy5kO/uF1Ysd95JTTPAVtxu9aGCZeoH8cxzJyxXcXTFCBbezptSvNLl36gE63fwp1bz3wYGH6TG6G1MQyNxQxUokMyH0gcwD0jkynBm+HYPM1+SGv4MSW5yPbjU7Ub+zzFl9VLjTZtNX/NMDd5caFsne1AFEhAUIqCMBO6Z9qnSTuEiVsFnhpU7UK0VGywlanZdPWxa+g2UGUdfYJ8EarFnBuegIUGtUiXyypQg0Jo2/DcmkM6GLnF20SOXLVDg1dI8V4HVyORt7JZckuqmR642yKSvzZUgtPCVeRyulSYTLXzQMh9YCSQuBbxZek8Ozw/9GQpqleQJz7xyhiQMSZIb91gyuUxH9FtQGWxvtAYUB3KhiHTKLG3kG6BwfFIDKsvltS+L4iFOkHFIolwph3QDrOY1BRrRK4sVqkJOaoDRL2XyXNPfWRw2BX5NAhD+n1vWExzaMDvMBF+/gtZ9/K14KTW7OwwSC88IBh2l7U7jQ1Audyj5PyYeAWSOSAVZwqv0Zt6BCxYYl/P6cRnzMqjm5mPTedIEDofuUFCGepnajXF8VqNDQnmNB0deRXRuKYazwKKh4zHATR8lOjil/DnXieAt7gu8K3nBm+Dne3A3oXHRFM1MLNq3dwbhQ4fzoC7AnuKSE3XZAWpwFGwessWFJXdW4dxJgDDpuRIrRLkj0F4KHwAF/kBx2hg4cst8Fz5ZBUQB30ibKjAkWI3He3BaK/xqiEO2ltrRTlCXQTxpJWR+v6DtXTPlSducLidoF2kakZifXmAtFg8dpSBsGwyLO0itgeAG3AAySlSiC5O5PytOudBTTZLXwWZyz9rCuWKGcJFELIfn/8SU2qNQzUrX/7yoDJWZVcmRNbmX5ZDTRRS0pnm50AS5QxzCzCGTThVlAqTJCKJDJS88sEHzva9zpj5wZOLg47DoaQHqg35zAYwfSpmGSXhwl9YKUoG4yKDqvyurbWo0SgQAMf9MfmBiP3/iB/M7vUY6yAHEJc3O2iJgeQiYZ/Fyb+hQMPyzLJ+J0+qa+oXRbgx5/y0mct5j8CsBDvSAVvPqIcyy15aAAzv2ppLn9EJs7ISSNi+HdYfv+NCkpy3qS440pqkHT+nv7/b9EPtEJaVqoeuvuGYuT89AQ4m16Wqkm8Z7rG9NBffL+HvYs8LNEes2Mx8IsJSBdK1lwuzGyh0HdoMYKKId6COzwYvDxttmhOWVRji3vUpyZE8hn5pkAAzaeR/O/uuG9GeqGMS4iFxX+rr10sWfzlJ+WIWIFGQ== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4e9079ca-7ea0-4364-36fb-08da43b2bdc4 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2022 09:40:19.6932 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ULneV28Oa1YRzDJR0XvDemkIsfJlLoijZWt4u9XryseJJ8DCjVMuXKsatrdY0MT7AJHPUVnz7C+1Eo+jiCr7LQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6498 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan i.MX8MP features same NoC/NIC as i.MX8MM/N/Q, and use two compatible strings. Signed-off-by: Peng Fan --- .../devicetree/bindings/interconnect/fsl,imx8m-noc.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/interconnect/fsl,imx8m-noc.yaml b/Documentation/devicetree/bindings/interconnect/fsl,imx8m-noc.yaml index b8204ed22dd5..0923cd28d6c6 100644 --- a/Documentation/devicetree/bindings/interconnect/fsl,imx8m-noc.yaml +++ b/Documentation/devicetree/bindings/interconnect/fsl,imx8m-noc.yaml @@ -26,16 +26,22 @@ properties: oneOf: - items: - enum: + - fsl,imx8mp-nic - fsl,imx8mn-nic - fsl,imx8mm-nic - fsl,imx8mq-nic - const: fsl,imx8m-nic - items: - enum: + - fsl,imx8mp-noc - fsl,imx8mn-noc - fsl,imx8mm-noc - fsl,imx8mq-noc - const: fsl,imx8m-noc + - items: + - const: fsl,imx8mp-noc + - const: fsl,imx8m-noc + - const: syscon - const: fsl,imx8m-nic reg: From patchwork Wed Jun 1 09:41:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 578029 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB433C433FE for ; Wed, 1 Jun 2022 09:40:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351186AbiFAJks (ORCPT ); Wed, 1 Jun 2022 05:40:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351173AbiFAJkg (ORCPT ); Wed, 1 Jun 2022 05:40:36 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2048.outbound.protection.outlook.com [40.107.20.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EA414AE26; Wed, 1 Jun 2022 02:40:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OyaKKQZ6qp2gtl8imdPkPp69jKNklYQq6CJzSYcaa63HfAqpXJXtfsinlJ+ZmolwagfbYxpegkiBN3z4mmBhAhzYF5q3CiCcajOHnTilyARMhTuetyhFrMI2uyHqrZbkEipWANa/8C4hLzI9j8Sm/MhhpkI3eu/LBGGCEWjIauAdkEnzvHEZsF5jByO6HKGb6T/wi2Dg1bhEWhc9W0RLOhoht5UbetjAtSWnIs0By5Ps+oaDEk3hxmg10jj3WTSJKcWzgZVudXCActj5J3OttrYWM7o058bnFI/2E0IV6rOGjC8bjtta1BfmjmGAQMT5ryLJYLT3ziYAOayb5rPJeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oMN6I0fkhcwqz4bfTqnYdUPG1Gt0c+m9PEnhVtENL9E=; b=PBE5mDQM4eFhjOf09xgBeIHdstbnaR7Ve1uSb5YW+Gn3b9L0icePFPQuhNrSbJK/DQqql+pE3+qNmmpkDXjx1P7ik0n1mNeKwH/Aobo3FPGx3SXsVwrm41jnSu2inxH+l14srkXbleOAPImETFH1ak2US3YOFPdf8LytIQ3RNZScKHOqmYJZpiR6N6I/LBUhQBfxUMfeaKUgObADeSZwukFdE/1z4YAf3F+TMSb0rdF7DtIXnQG+uQPz8WBzRFfqfY3QXdGs0ZAvHQzStux8KKvNcbftUqdilCi41pJ8wKiZ+Bqt1PS8hugnSfpAf+Bbt/GgnaH+vOFZvVslCmnA4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oMN6I0fkhcwqz4bfTqnYdUPG1Gt0c+m9PEnhVtENL9E=; b=H0IaDrLxC5XxZYBvGYSMxQfa4rPcfzEPsXi0YwvVNiPhLyVxdTsJgdcXykf0xKBEfbYwa7iYC4+4JC4urSi2RLp2jp3yxj4L2v9LgJq6/ioQup1YffmUscQNhKxViV1c6Md4QFzQm49ApC+ypJPU3X591gFzEWclFKteGwmDgAQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AM0PR04MB6498.eurprd04.prod.outlook.com (2603:10a6:208:16d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Wed, 1 Jun 2022 09:40:25 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5%9]) with mapi id 15.20.5293.019; Wed, 1 Jun 2022 09:40:25 +0000 From: "Peng Fan (OSS)" To: djakov@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, abel.vesa@nxp.com, abailon@baylibre.com, l.stach@pengutronix.de, laurent.pinchart@ideasonboard.com, marex@denx.de, paul.elder@ideasonboard.com, Markus.Niebel@ew.tq-group.com, aford173@gmail.com Cc: kernel@pengutronix.de, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, Peng Fan Subject: [PATCH 2/8] interconnect: add device managed bulk API Date: Wed, 1 Jun 2022 17:41:50 +0800 Message-Id: <20220601094156.3388454-3-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220601094156.3388454-1-peng.fan@oss.nxp.com> References: <20220601094156.3388454-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0078.apcprd02.prod.outlook.com (2603:1096:4:90::18) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bce703fa-a9d0-467e-1ba4-08da43b2c176 X-MS-TrafficTypeDiagnostic: AM0PR04MB6498:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ru63DSCij+aNRn3ejPWR/+riKEVlT8uA5kbVoDp49TYseug+kKHNVqasRt5nK1Y+ZZCVli+es4L24n73t75q9e7+nFaN9cTVejm8I0WczwWEkohk66qJqdnGFWIKEF2Aar+NEHGg3v81oV3UxzzFsZrix38inAc9HSh7avAzVlCcpt49aISoxZVE2RTdS6E71r+SvUx5EcZ3WV7Br/Khn9Pi48Pd0hTCJVeFVq+ISwCCySCodn1n+tx40ScO1ehkgmtSljXyz/YmxrkqdmvNpQ+2qJ+FYKc3g6bXKI+OntAmSJaaTWJ9e/+qBuxTatNcWTgtjGiG9jJrtXbYPG8o9ipIpYrWse0b/ov8eOeDD4KsiP2zTX4V22P4nTK9HbPPIntJzWrHIH+tkE1besnhWcyn0TVJWaWJ02cuQhq5QvLVgGLAd05tRclHUqYQn/Jv578s210kKDzi5cHVvK3a6hoEkc4dg7fh7X2IUyAdGVe1x1wqVSkNUdj9YtdU2AGKkeRS0wjwMxsprquKJv8rZqpadDDx/sdF/O3ibLJJ00cUbyhPvo1GyUobDljNHzNhKnvbNE9cMoaizYh4VuAUwFd8N+4jWZSEJCh/Jtda1qwsjQHfaubgIlniOOpm+cS55U7M2Uq9+wrtd238wQAxMoCJgLqB2dz8VvRhmx9um4n2SbHrpR30MSuZ1zwf7opzsVdG5BPposOWpkoA/Ry6OM3Yqwd8D8q6TKtE/D+tLuE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9417.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(921005)(52116002)(2906002)(6506007)(508600001)(316002)(6666004)(6486002)(1076003)(7416002)(86362001)(26005)(2616005)(8936002)(4326008)(66946007)(66476007)(5660300002)(66556008)(38100700002)(38350700002)(186003)(8676002)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 71L4zzyhThahqsTBvaZ3anw1nrrVGL9pBE9dzz+zD0Ku/ht+5rdiXFwQvNfXQ+5K2yXP4sUqrqTaKHp9eucCyG0GX0yKUSCP6Teu4ygFQINrYquhOgf07j2v+ZGt7AxZ+dLetHwwY+Z2mlRM6NVeMQgnyy2e8WkpYDGfW8t1TijRj1zOiI68b2cUad0JVFUVmwaWDUVMPgiLot+eQZiFeFsZwmkKrP9csZttR+JWZ6g716ACwmB6UkaKSCERfe9hRPnVmj9ver9Sr0aIcErgVzMTKCsLTnoVEeeXgrZt+6fO63gv80SwvFk2KGyZjuTiGK061TQlgqtBlCSFyz+kyU56ynMLLCEGKZgtvFZck02lpSbEfrWCPZAhIj+ZrCWx9gLF8BM8VdCdv0Fw5IK/HVv0zrH0tpiyVZFzufpGL+mirjihlbPwDFMIjpDztC0Ht/DJ9UZeqT3WY67ARlV4VPjdoghVSfkMQOMzb5hpQzg0bONPcmdOtDYgAJzH9z7jKZnivhpRaiTVy3ZsBpC9UZafSgeeQa6RIdi0/LXKWKi1vME2Zag4qOjfg5K1OhljkCv4KfGHUZ4iC3FDoOb7e8YDD4ePsh8GKvGlwqdz1KWDXXfT9kw2esZSbiufHuL2ZqJflj2e6TKKfan+H986q4uYvRjj1cbymOzPj9XZH0yehptYMEZzvLPYEKX0tcoejzoydrs129X7kQoZPuisP6cwI2yeovPrwZ/HWtYlpzEUMqeCmY89Mu1uY6rK5MlT2C0lY3aX29W15ZJo6Ug5VGMoo+APXtaDAxpXC7td7Jgr6qe7jiQ3S74UihNv8qbsPeLJ3eudU9QuMkVWIkRwpLgpnZbnHHHiEgFX/thP2q4HlkeYthXm+RWnHzd2VVlhRh3uMGfOe9QGtl6sb2lBR8zM+mF62GIJ20r2f6jlYnqqGYBCmi24kpiQRylxVRLBqPtXxuGRjuOUf6dSJ/0PL8x+SmP5bTrU1N0EgvOKQyOYK6eBbVhpoHKNtsS5RDWyNI1NxcosD2haSWuPDVRUC7YYlEhfwMk6wnwiyTyg2nz08K1RFgsuymsRC6KsGNXFdJc0AzLSNoKRPrInhBwRbUZmq1ltS1MQeJ3Mc4IsyapbEz7sQJ+afve3re/TL7rNNvtGY3KGk/hhwe3g+8tkT9KTtiWB99Yc5rlLZHLo/YVdeOO0tFPPMIzZmBEQPA+w5W4hoU4ZwR7mHs1Z1S6gBSVBVVOIfZxK4My7hRp19JH+b0cUeHKTMb9peQSf0W0qdhc1cKmCJV9j8uDmp1NqWuqlGL0tc5sfwnIKBCfRxVTtn3PrCuU5rm1Ll34Ztr2Bwx0+pajMbmwrED9NpqAhPZaP0apYWti8p9aMF6/4zMPLf9PgSVXDgNXr+m7DKRnJzuVymEZoJrnZTi3FPNaqAgGzvqP64uUhBfRovx2BfBAYT5pffQtKQ6PHm0yhx60Bqn45iRBWtwr51+TisqOCgCml6S20qsxUkpgcow6FpV6vDkJMLy4Tu8mFWIsNAOGhxmfVevjSqF18tKe/hqgCIVxB+PgUlVFuXKUJZqF3FdX7jsaVarmSY/j6Go85numevI2eN1Nz1fsvCDAhFbgtuIVBUn4PpcLXq3SicvQQQ3/D5BbHW7yQMq81YtCrSnr0aoVDzl1AVM6kLpFLAQI55IbVy/3ke9J6bi89jzFG+zTRJm5Sm6UQ9RCtx6Sc4WCScQOwGKxVv40egUMyqqJJFQ== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bce703fa-a9d0-467e-1ba4-08da43b2c176 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2022 09:40:25.8291 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: G3GFBVZafQMPc2wOs+Y6y1QH3Xxcq+RtaLscr3VRMpzPDM6kbNawI0nSlIs9gVsl4XpeRTQfJetyRkDOuPyVuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6498 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan Add device managed bulk API to simplify driver. Signed-off-by: Peng Fan Reported-by: kernel test robot Reported-by: kernel test robot Reported-by: kernel test robot --- drivers/interconnect/bulk.c | 34 ++++++++++++++++++++++++++++++++++ include/linux/interconnect.h | 6 ++++++ 2 files changed, 40 insertions(+) diff --git a/drivers/interconnect/bulk.c b/drivers/interconnect/bulk.c index 448cc536aa79..4918844bfe0d 100644 --- a/drivers/interconnect/bulk.c +++ b/drivers/interconnect/bulk.c @@ -115,3 +115,37 @@ void icc_bulk_disable(int num_paths, const struct icc_bulk_data *paths) icc_disable(paths[num_paths].path); } EXPORT_SYMBOL_GPL(icc_bulk_disable); + +struct icc_bulk_devres { + struct icc_bulk_data *paths; + int num_paths; +}; + +static void devm_icc_bulk_release(struct device *dev, void *res) +{ + struct icc_bulk_devres *devres = res; + + icc_bulk_put(devres->num_paths, devres->paths); +} + +int devm_of_icc_bulk_get(struct device *dev, int num_paths, struct icc_bulk_data *paths) +{ + struct icc_bulk_devres *devres; + int ret; + + devres = devres_alloc(devm_icc_bulk_release, sizeof(*devres), GFP_KERNEL); + if (!devres) + return -ENOMEM; + + ret = of_icc_bulk_get(dev, num_paths, paths); + if (!ret) { + devres->paths = paths; + devres->num_paths = num_paths; + devres_add(dev, devres); + } else { + devres_free(devres); + } + + return ret; +} +EXPORT_SYMBOL_GPL(devm_of_icc_bulk_get); diff --git a/include/linux/interconnect.h b/include/linux/interconnect.h index f685777b875e..1a5fdf049edd 100644 --- a/include/linux/interconnect.h +++ b/include/linux/interconnect.h @@ -44,6 +44,7 @@ struct icc_path *icc_get(struct device *dev, const int src_id, const int dst_id); struct icc_path *of_icc_get(struct device *dev, const char *name); struct icc_path *devm_of_icc_get(struct device *dev, const char *name); +int devm_of_icc_bulk_get(struct device *dev, int num_paths, struct icc_bulk_data *paths); struct icc_path *of_icc_get_by_index(struct device *dev, int idx); void icc_put(struct icc_path *path); int icc_enable(struct icc_path *path); @@ -116,6 +117,11 @@ static inline int of_icc_bulk_get(struct device *dev, int num_paths, struct icc_ return 0; } +int devm_of_icc_bulk_get(struct device *dev, int num_paths, struct icc_bulk_data *paths) +{ + return 0; +} + static inline void icc_bulk_put(int num_paths, struct icc_bulk_data *paths) { } From patchwork Wed Jun 1 09:41:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 578372 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3515C433F5 for ; Wed, 1 Jun 2022 09:41:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350353AbiFAJlC (ORCPT ); Wed, 1 Jun 2022 05:41:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351184AbiFAJkm (ORCPT ); Wed, 1 Jun 2022 05:40:42 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2080.outbound.protection.outlook.com [40.107.20.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CABCF5C875; Wed, 1 Jun 2022 02:40:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gQYj69wcpbUpZ6kpFPoTJqZ2Y+bNWcRAB3W50ZHw0PfZix4wEDEwxB4TJqBoeb+6ajkNKcmZ7Z6h4QXL0v2snGnlGbhKT5Nla1CHOSEOWR09Eh6FnqqFGTobhyYFUb7im8MNNLxggpy8Li8ExqAvXpNLVMEvXRBrznj+sUiUbu7n9cdObz0UnGhy+QloVteufuRU/6Rc95lN8vnb9qFEYITAg9O/7UAqPE01tnXlPfKQ36ksZSNOdlY4uh+P1ldbZ5GfugVFQna4iRU/xNgdIvxxB9F8/5AwtUuDlfE0/UrVPPaJ2fdEcSyi3By40xAstt7v0AfxCGMlWKe+X8tO3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2q72xNWvfqSkewLvGIXJPVQuhc71UEbJZKfgVlzPvqk=; b=j3pFdk07fGS9Ka/xupPZcvhSKEzOOwXUULlBy8G5boMjF6XXNTf0cTTzLXOgdKduaR2rzJ9yxtTzayXN1RdRIwaHNpxdrICMlLr0mIbEkxLuEi3OWY+fU1kRnlVrtiR+ipST7EjJv0jBOgI+Qk365MOHBqBuzq7x385xM0P+InaMUuqNF8N5fHXfJV3BoNQAB43/sM353LNrUbILz5vUWTxOqE6KQCsAsUkLShatTto77cgdv2kWvuocq/x9b+thcMqz0Bxupp0GOFTsbsAs5C9980guw5iCk8RG7LvhB/IbXzCrh7JzU3qyFaHMCcBWU5SqyKXQiTQNIr01KfF4eA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2q72xNWvfqSkewLvGIXJPVQuhc71UEbJZKfgVlzPvqk=; b=TF6QATUZ2bYIbwA2NkROs2Yu1WvrW1BypTAJHMOhzt/O24SJGn28ITwFFgPWVe8A48Dq6zLdy2i7jNbxc4OCr72NbZrzIzXr6BF0iQ4CKp1ewBc1MUJ3vUcepZc191hPytvMi/ezt6Ync43vWt+mi505rjaC0Yxdjx1GE/ecF6E= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AM0PR04MB6498.eurprd04.prod.outlook.com (2603:10a6:208:16d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Wed, 1 Jun 2022 09:40:32 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5%9]) with mapi id 15.20.5293.019; Wed, 1 Jun 2022 09:40:32 +0000 From: "Peng Fan (OSS)" To: djakov@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, abel.vesa@nxp.com, abailon@baylibre.com, l.stach@pengutronix.de, laurent.pinchart@ideasonboard.com, marex@denx.de, paul.elder@ideasonboard.com, Markus.Niebel@ew.tq-group.com, aford173@gmail.com Cc: kernel@pengutronix.de, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, Peng Fan Subject: [PATCH 3/8] interconnect: imx: fix max_node_id Date: Wed, 1 Jun 2022 17:41:51 +0800 Message-Id: <20220601094156.3388454-4-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220601094156.3388454-1-peng.fan@oss.nxp.com> References: <20220601094156.3388454-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0078.apcprd02.prod.outlook.com (2603:1096:4:90::18) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f6fe2b46-854c-4751-c5b6-08da43b2c515 X-MS-TrafficTypeDiagnostic: AM0PR04MB6498:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u8zd1aBTlP+27XokPCBPMcZnAgS3wXbazs4J53N1Xr6x/Uv5DD3a+Kj+EmeKJ9OHK+naMT5peToz5lpum8hkB1JObUUYESlYU5wGyPtiuo957pNT8lUm5/X0BDJR0nJ+yfamuXUNGsmeFK2UdfKcFhxInBJjooilH61MR4UOAXFIkGpIS3C66KCRa0XzdgxnwaNew5SrbsNY2/sxisuhWivcQ5H2Yg0XehVYjmCIubGe6T2mWtIiQi/q18Cso7UU5eTw+JLObhMKFiUcA3mj5aLfwfbR5HXn9mbT9R6A8tmxGB8wkQXRGxSS+/fJnsB2Al+5KowxDN30DYXKwURdPUhdeUvQsNg+ukhkZgNPiYAqsRxe8qA1oASz+FzlqA6qGoe8o1w5Kd1PhGREITE9OGptiIm7+UlYpXT7X45TsH4cjvYwAB0MhlT4aCwnpU1+mfqbrol00WfWeCHMLzFmpMkEQ/GN0Y+Kw5J8G21/06sl6THgPrGPNx6mqEfBxAAqntG4U52zff2N80sZG6c/cip/BQV44ssF+bf0OnyFQ0i5E15ZbWNIIqlf85idfMmgLk4G2gG87ZbS49qmbSW8AvSqA//hxOtT6F2O7y4vkMIrm7L5BdDDiKFQJKlQkW7ofLb7YoDfdIOie9siGQMYsppD67SfRcocF2Y19cgNmYUv8X+Xrmx3LsYpdVVYHJjdxT4SBIMS2IDV7E4cND1kSSY+vbHUe0brj4+W4yxkYjg= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9417.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(921005)(52116002)(4744005)(2906002)(6506007)(508600001)(316002)(6666004)(6486002)(1076003)(7416002)(86362001)(26005)(2616005)(8936002)(4326008)(66946007)(66476007)(5660300002)(66556008)(38100700002)(38350700002)(186003)(83380400001)(8676002)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: imv1StNNY4nNdSQBBLSUHqcHUrbqgmtQiE5ycZGmGpbrzoO60qLvHzRH9L5VrXeyn9nV4s+zbp86FwdBwUTIGMrsXlDd5mpkBzLakiBvytS42fhhUoUF/DjGNhVTpRcyVri/2gIJZ6AWERArYs/UJcpPwShsg/h2DdRznPqIezHuj7EYGuiIBJTftVscO5EMXvDCfjG0aXDQX96YGn4OjuB5Ty0jqRVdiF+mVWuZu7KAUbbthrPcPx08mEnUNh44dLILUpRvRHOrdzPPES53k+0pr/ENvZMPAMP44VWC7KU417mzau0P6BHDkHbWZAixQotfkY3Fc1DiwzF4cWpxb+tkNmC109++3GIpW1ePauIg6X65vgXL2S9IfK6Dc3tdolv8jxbSiAzV05/Gj9izsKj3acqC3BkhVUtJjfvr+SJjK7VRnXxzBw3w7pmtC5SCJnHMhnj/GaZXqEJtJvInkukkbyRHpP4slCXgJG4FlV4ieRwA21DvsQbNNkUaTaoYAUEi04lESoSKITDQycbRssc5GA4e7rQjnZIqMdw1bkZiI/HLZSkgWxbWIV70tipRMl0tvG0wtU0YLjIiMvlqHh6htGzE0xkPg/735HLvchigEKLiJAj6H0Ccy7tD/l3kGFA12ZxtC3rNQ2sRRfMBZygl8EhIfKPv64h+1cZtSojink1t+j9OPX2ojP409ETl112JW414WJGYViCgXYJX0KmfgJq3pq/0Ee5DNoc9ZSA3QeSASLKZFkmVMunfUenqgoma98ExTLVj9IMjf0ttarUrFKQHvdv4wOAntj9zr73PAbC2IqtvmdopOFVI2IZ9faIb73TguzX9hqGOnyWMP363stBradKJ7N40Uz0aKPdcn39//N446GquxS056ThujqvJkX7dz4pXifxXN09NBuoshCyZ2kC5a5KPNkuPmo0d1daONMyxhW2ZA6R6fOz1RIoDpFkxxCDaEsNuI9jWumFz3bOutZPTnEuBPn//txrG6RKI2FpxEAZ0x3JzhRvxSG3Zn7aYvuTq5Xs17v1Bnu0RpRhQ17R9QJTgqABToeunWXofaVfa4CnC9v/yUcSC2dbijj2AFVykotYHo2XfVgwa8e2+cK7JCzJc3wm6sbaYJLi5JXBuGmiALzAgJGLAyP3/MvFPA+raAiRr03y9yE54jpHvI6Ye5YYE2Wba+0cqulHpGDlDa9UWCpPJIHqSoWEbveH2Wy9n0oB+e0oakWed8bikROWDqLFic166KqaDspfuRLMGbA8GaPtv7x/ygzIrpF96ik6H15CWM0Mt/Gxi6x+S+0u5XwI6+uKcg2dnhU2XQAJfTzY0jaUUeEwFmBpel0T6EVXs+dPYxlu8m1/e5QrYt4iwshjkF8/W9YPlL3LjmIs64vS/6zcfJgE75OxuncCjpskK51RGkKyctkWo+A6yutSTA15PcXQnVZVNFncq+VDR3+LPulCZfWifdx6m7m4G5/OZm28VtxhoSdvUFkxeKxTNMMAJBoAAeU/Icj2L2FvCpaefDy/eYpRF5OnfK2LDqHx7QrDsFBL9lT/DVUpXg9pUp9Jg5wXuNjHNRNC5GZp5RcuhdGMWrwF1umLLtYh2e7gmOdkz9HlBUTyIBI7L3369TURUNmJAqJJwzVJ1FmGkxLCURyAE8xJhrKwrfqNV4UIwPXWUXrZjEkIYqPZn3dK0o9VxinTtv892YGaUe1Ml+k6ZssODus9wI0a7hJxgQb5i1F4Eikq1xw== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6fe2b46-854c-4751-c5b6-08da43b2c515 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2022 09:40:31.9561 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uRvM3eMuKvMWYVtMbgigG+y+cwy0atV4owHDLVBLh6yCHwlnkqTfxRWeYlUFN6WfxP/7gqMKvM9k0ua3c5/QrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6498 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan max_node_id not equal to the ARRAY_SIZE of node array, need increase 1, otherwise xlate will fail for the last entry. Fixes: f0d8048525d7d("interconnect: Add imx core driver") Signed-off-by: Peng Fan Reviewed-by: Laurent Pinchart --- drivers/interconnect/imx/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c index 249ca25d1d55..3c074933ed0c 100644 --- a/drivers/interconnect/imx/imx.c +++ b/drivers/interconnect/imx/imx.c @@ -238,7 +238,7 @@ int imx_icc_register(struct platform_device *pdev, int ret; /* icc_onecell_data is indexed by node_id, unlike nodes param */ - max_node_id = get_max_node_id(nodes, nodes_count); + max_node_id = get_max_node_id(nodes, nodes_count) + 1; data = devm_kzalloc(dev, struct_size(data, nodes, max_node_id), GFP_KERNEL); if (!data) From patchwork Wed Jun 1 09:41:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 578373 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEE5FC433EF for ; Wed, 1 Jun 2022 09:41:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351168AbiFAJk4 (ORCPT ); Wed, 1 Jun 2022 05:40:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351205AbiFAJkv (ORCPT ); Wed, 1 Jun 2022 05:40:51 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2066.outbound.protection.outlook.com [40.107.20.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC0CD57B05; Wed, 1 Jun 2022 02:40:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G4tDCTysRtwHf5b3b/iyehUN9D9GB8k6kUKU90dGMnJmS315YlsXM9gNzLpsXxkimUHBFIR3PAwrwwo2umtlHnFjzh3Qk/B21wkjeTiV8PIMuvsXK4dZNBlU/61h7wc0Q9fNjmOPYT3rA7ayO22pTE4Yt+eMGox/FWqKdX4fM5IR+55BPfhebM0Z8GwR9TuqX0ta0MWmkQvin5+SwZG6BDmGNP3NEt5MRCixkyBVb3Q0JLVBGz6oPES/l3VI8RzpSg9pO7AOv3BT7fEZOHuXNEOaMWvo8H+1nhU9g2KifB3PN2gBl6KK5pEZVUvch3ifDwo06WCqfBJ7eG99fXq5bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NEJQ3hiVlRkt2TrPMM7HRS3Smn5aBzLoiF12ew86Dp8=; b=YLsMdJSkkvFwUXf+b5VSk+1QnWW4YwpeM5aWhKNrLKxn2gr6wLjCG+Gh75YjxPVui/J4zXlijMGQYMkhF0p8PZLK7ULY8HdMUyUanIbW2yLD6ukF4rlzD7VcPNsY1JSRg6ppyF8g+Z/PrESE5M7+rcqV8OJVTOntN+aKRhL+T2yAPOX9zxKiA0v+o/M3jCTk2N53fPKv43WLLg3IYgAiWl0vl/pkbC1nlV5ly2TIDtfU/O65TWiJQ9dLgbmZSaL8cZbmpoLKIooNn318/uNw6mRYclJarujN1mvxYOxuG9YBREXAx8Xj7fXDXObw1f9UIdEr9RPp3rdZ1hCNApQLeg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NEJQ3hiVlRkt2TrPMM7HRS3Smn5aBzLoiF12ew86Dp8=; b=OoZuj4Fb4/KhlCKhCHEsJFbsuC2CQeyhhg/noQtwKrZkjx0C8HFS63GPkEXVuwTnDGucEWEvgeY7Eq1TYgM6eHpfchJ6Vrv2R/uYdQNa4oe7a5ARU72ehORW5Sc/wXRuO36sKyb1v5mFrfEnks4qg4Avdp2/JM/qSvc0A5O7jQ8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AM0PR04MB6498.eurprd04.prod.outlook.com (2603:10a6:208:16d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Wed, 1 Jun 2022 09:40:38 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5%9]) with mapi id 15.20.5293.019; Wed, 1 Jun 2022 09:40:38 +0000 From: "Peng Fan (OSS)" To: djakov@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, abel.vesa@nxp.com, abailon@baylibre.com, l.stach@pengutronix.de, laurent.pinchart@ideasonboard.com, marex@denx.de, paul.elder@ideasonboard.com, Markus.Niebel@ew.tq-group.com, aford173@gmail.com Cc: kernel@pengutronix.de, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, Peng Fan Subject: [PATCH 4/8] interconnect: imx: set src node Date: Wed, 1 Jun 2022 17:41:52 +0800 Message-Id: <20220601094156.3388454-5-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220601094156.3388454-1-peng.fan@oss.nxp.com> References: <20220601094156.3388454-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0078.apcprd02.prod.outlook.com (2603:1096:4:90::18) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 29946437-943b-4d33-b4aa-08da43b2c8f3 X-MS-TrafficTypeDiagnostic: AM0PR04MB6498:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BOguCAD8hk4+rYCapKO31/fv64mDPDs2oFA43x7x3untpNUlZ2As7DaBsAAuO+bHBujeKR0++BgbdNIetRXTnV6nRvPVwdVi2swRALm0ygrFC+aavmnuov8e84vF189Tu2OZRiCh4ZV+jNJhcwtosBcHzAV9zs16ACU1TD7vVAZ+V86k43oRRWQpkhRfGPH8gEMeDPG0/1me4A1WJ2MIJEI5nbhUpBP/WNrnLpR+qbZFmhExtu3FbrPxlYjoBwBYlz8TACiUc9cfd+Q15s2IivWkEl8fs+95SrQbsn9pPex6NFnXfINc0t0asArT/bmUwjsHvrBUZ9grVlgREsBJUSJWKsOEga1ZjnE+xZtnlQoHyktFyCnlwsdLEJuuRMbrs8dhoJpFrIfSu1W5MFPLrJW1MPhiuPwEsxg6tFoq5oPHEXGDccX6CVqFMMxTFwiuunN/CRsTa1ae77/b/CZ6MB0HvumVXZA3B9AUYOy+EwXY12kMSL+03dD1dheSUjnFgQ4JtwuOmCmTwBI4IJBPKZg+nXAAB1t6oMO4E9Qtsyd69yqFLlcALSFpz/wMcu9sY7QlfWhvbYA5C/khO1Ccf09/FsrDc8316Rfqc0vzX1MTKPI7bXE1fyxsZdsX15P/pqfzWT/Vo9nYnd2AsGMVLT5vnbFEQ5mGitRooxkjA13cNfq1vVrWEqCAhgqVDYztyxy4whlF1vKeteZfITuPafsLqqghsfTOd5lc2BDkexA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9417.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(2616005)(1076003)(7416002)(86362001)(26005)(186003)(38100700002)(38350700002)(6512007)(8676002)(8936002)(4326008)(66556008)(5660300002)(66946007)(66476007)(921005)(52116002)(6666004)(316002)(6486002)(2906002)(4744005)(508600001)(6506007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: v40XVjZwlcIeaLUjXGO7R7gfQYX0IBJJiYCtwCKKI1b8nuYyOzUfBhcFqyezh0Gk/YlRQc1Dmq5naiUJejWtxfHHBq9VfvqyCunyfYutpesfHoRj9cMfqcfhA7Q0J4lVdZctCdMAxuUU07i5AgNOFUMtwO2aLLuoGZGwzg8OeA/aTdT+Xe3k1I/2oppkvvVIkU8DdyiOgXxb4SPP+RHqFekdcY0daVJFiVclEEx0RBfqgd6/yR4SoYNfj2eXZa0gz6SCU7SyovdK5rCozMnNNHKdHXTG9PM6h7GVNd/UNtVP3g9sDfkwVolmrn5Gj1ZU7Jh8zia5l3FioW6Px1wQAmxuYHgW1wuLhuKmarEipEIytoma7W7ogCirznV3+/SXzdxxqstjCpEKFGjYWfK34ho5gNdWGaNJcN7smIUzgRVTUd/NiKcfRgIPpB9rh+H+6GpXZwtk3GHEqs4W7RfV4/GXg5/FAOBgKVoRmgiLuPw5fIVrhw2lDbIYOFN3ovibKqJWTEGj9BPGMHS7ckbjv8RZHGTac3W6EDyWvRZNbv9rDOPSu6lm75EQUUukyg/M6eOM0cDWlSyyZsXV7CRdXpIspmwL9zpS7UJPMvvPL8xaw/Nxdmm+68GouQC6n2H3U6JQCPl54jRqkUzRHRGi0fpDs7bBensJP4Qs4OvgO2mb3VGPEZDzbUcoFMAYAVDUbFq9V9JSJPAC3eVnl6lhphX8Qzz98ATguxQ4ujYCqdOp12k7bVfoRsEmPYYUm/CoOe8BcqN312PkAm9b7/LmENepN2WRKUMed54vV2NNDQLNGIq6ttE0kchhCUJw9M4u+63o4jneaOZn/uZF9ackCsdO+PBQ+8/Sq/PyaUYt+Kvs3VFEfDznAnvx2FKzZ4vD7IIdMWZHPZA0CE2/p5x+B671f09SbcgHHVjZckTuxjFk2bwWkoQoQ+gDleDrVBI2A3Nu5aDIJDRgi3e0vmrMAevnE2ft2YjiXxUDu1bR/3EWBWAPXySrDex/WwtNxEoTmObltDWwKl346hPQQ33uIOK2AIPyh0Qk/ckg61Hfr1rNC39UzxvvqZYLfG8RtFWyH+fyeqAUcHIK7tOku7VMRzJCDv7ZFUevcbGwjlO5NftdbZfxkTrad+6rPS8SIgPKtiZPEk66hqz5C0sGEJd4YAPfqWd7TX0bWR4TIgt068TOFRySbZ2xvNOKJdf25rRMeE6fqfOeNLHvkjI4dDSwxF4MtLakzKIgaFp1KArxissVsEHF93wJHWXEZujbaYNae0Acd5E0683lA7rZth/j1wBHw5cppwQ6wC7chp1hVDPrhXHk0jTq0c0fZBewgLVYnSBqBDo6j7UBvTifjMdMSEsrI/ep/CaEBPEP9vztiD+EXn87VyzlEBCstWH4bkwF8rUT6A9R96LfjLxnFFpHEsnofhE7DIUNprKOxfwlK9Dki+XBGnPgtoXI52OI0hnOQy8L11SnwsifPexUTzdLL5d5qWjslEJWb18UkDiddlbQfNkxXujFAdO4WcU5mZQDvNpb1PJwK47dnvQI6YpG2ovjRJ4jRaYnD7QePhf6Bwe28l44yLT7C9Gf4p9wxKxMp+u12Tpop11/Iw6EmZwAsYit7pxiizS26FaAaAX0uPDO3OgePKqkrsVIoJgU6+c2PtIDVeq4C9q2PN8bnp2cCPK7v384glb8NUAJWW9dm7DqWFNKmU0iR7zRrmOm+UwYBBdLRpvBMByBGs/fWt83BQ== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29946437-943b-4d33-b4aa-08da43b2c8f3 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2022 09:40:38.4125 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OTj8HkUCORVwJIfbL6GX3IxIMFqyOo9JQUy9EJsTnlgkWRXrX12ZNXh9Iug0auRvrU/gbLZz3K2ho7XndkZmrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6498 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan When set QoS for a icc path, only set dst icc node is not enough, also need to set src icc node. Signed-off-by: Peng Fan --- drivers/interconnect/imx/imx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c index 3c074933ed0c..1ba906822b7e 100644 --- a/drivers/interconnect/imx/imx.c +++ b/drivers/interconnect/imx/imx.c @@ -61,6 +61,12 @@ static int imx_icc_node_set(struct icc_node *node) static int imx_icc_set(struct icc_node *src, struct icc_node *dst) { + int ret; + + ret = imx_icc_node_set(src); + if (ret) + return ret; + return imx_icc_node_set(dst); } From patchwork Wed Jun 1 09:41:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 578028 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30603C4332F for ; Wed, 1 Jun 2022 09:41:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346920AbiFAJk5 (ORCPT ); Wed, 1 Jun 2022 05:40:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351239AbiFAJkw (ORCPT ); Wed, 1 Jun 2022 05:40:52 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2066.outbound.protection.outlook.com [40.107.20.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 989DB5F27A; Wed, 1 Jun 2022 02:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UwrNYEKlxzpWCeyqNkWneLUF9x/ZhsKKVrpZ4ghzB5/OIfk7y+Gvw2Pbw82V3cA+HSjYh+DSx4Z8nES7tVei071kSzia8w8pq/6PyDjmCgFHXpw3GNknKuA3g2pNSqit8565c4DU/Nw627rLUnh/WmJhnpunA/GgF30vG+o7V/9370oyvHbFFRy6OopHyjEF6RBeH3Lwfjhj2+0k4UdS0SXLUo7EdrXSSCcm+90Gk4+jupD7oEJiPYCGxKifUBtsASmsAIScnqRPfOB+XRi88DhnM9XXqgMslmDiUf/g1feKAwAc2fk+ISEEo6tDOYkLq/R4QKuuHe1YmebvbNVwUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6AvRAFscH+weMPoKrvYVn+rh4jCHsUAc0e68jwJ5m1M=; b=UZVs5P0avJ/AjChuUWg2BOEsBqD1XyixIoz9gu0kiy+LCKDF8p+AdkXbP/+/uGS58Gdodmv31tCs+pXXVW3nOwWBBIp4kbiEwQ+be2wvJBr1kS7Dm7MtjLxxv1LJfMnj+TqYMDdX0E1OlQEvkcpiOkzhurrRlbOxnB7WXElnXUyQqZoSyyEvrzLxBkTp6g4g22FTuJuBYnyAnrHOTphJoDo2e5vETWUqhiRZt0bxlg0SrRshOBuvA7asgeI4F82myx/NpxSHlX9uwviSssWGYiHm5ovqcTPyyoc9r0sb9czyGfZJTiFMup42fciHSSLr2L499wZPzq0zNzeS3JXOJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6AvRAFscH+weMPoKrvYVn+rh4jCHsUAc0e68jwJ5m1M=; b=TzSzkYQX6Dp9BlabNTKpGxVKjK34s7Kez7+Wr/gQ2zj3dkTQ90WPjzFGsOamnZtJ4tAJ75hIYz0va9DV2lov/VArADeHsWdcl6135X9nxzFmSRv9c7uoy6Cy4f92QlKnT8eXPsMxKmpyrgyGZV3dsbi4ugsRAHlS2u4MQLNOkZQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AM0PR04MB6498.eurprd04.prod.outlook.com (2603:10a6:208:16d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Wed, 1 Jun 2022 09:40:44 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5%9]) with mapi id 15.20.5293.019; Wed, 1 Jun 2022 09:40:44 +0000 From: "Peng Fan (OSS)" To: djakov@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, abel.vesa@nxp.com, abailon@baylibre.com, l.stach@pengutronix.de, laurent.pinchart@ideasonboard.com, marex@denx.de, paul.elder@ideasonboard.com, Markus.Niebel@ew.tq-group.com, aford173@gmail.com Cc: kernel@pengutronix.de, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, Peng Fan Subject: [PATCH 5/8] interconnect: imx: introduce imx_icc_provider Date: Wed, 1 Jun 2022 17:41:53 +0800 Message-Id: <20220601094156.3388454-6-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220601094156.3388454-1-peng.fan@oss.nxp.com> References: <20220601094156.3388454-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0078.apcprd02.prod.outlook.com (2603:1096:4:90::18) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 90afbc5b-3cea-4b61-58bf-08da43b2cc97 X-MS-TrafficTypeDiagnostic: AM0PR04MB6498:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ChOBhrL/UCwnMxqVFn+GHlH9x9yx2C45W/7fki2ZXjZXKBkjBQCyhAvnmvpJjhgvzfoo/jh0ACvHf3ynqgyzAt10SlC318J0sI/Lm6rYqh4gU+MijRteU26bI90czV/ZDTQmj9nR8PIGYH7Ym77U6R7yxWX62P6HdB+DBSljAfHqpSu3EDkI+bF8Zb8jO/JSojBTsAys4k9HbtaRj4c/jxRHsz81W+jtNJ8TTeNQaAkawEkgZUg7K1SOaLSXwBLt7H/hOkNsl7GfdrZG11xq0H06PtCqFudLm+yRAl3UpLKJt50dYd175NzK9dE4lprF71DpPZGpMHdvei/yW2vpsNQMrUVJcRtkwo9/eSV0CFgNCbSoIlEuYLzSVtgkNzb5RHeJtNB4f8WcoXwW0i/SSVKLxMmteZWTy4O0Ep7/XiM2lRDMrjk7lYj4FI0dTCJVwn5DUhG6tp0FYY3g3XU0B8vi03RcD0i+JRX4cKZxYYV+0KI8xx0GZBxuR1cPk0/139vU5IL7p8zQ2E/Llgm20QByMzcqVzURiDzmoVa9T1X8dK6xy2D6ZUIv6yR5CqZnzz8j7KmTWu2uZJfyeNRHrLrrrhKIv5WdCqVGDS3cqN1T9af9Sl1Vwba3GnJ1aFytWBpyCwlg+AHCpN8oOrLceHfjjJCsMKlp882GnSsTgc1jmZpWCgFXCV0ZVBSRkjPavMMa+q/sEiOTaqw1hU8mAT8yeA0wfHnFO2EhrUrHjN4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9417.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(2616005)(1076003)(7416002)(86362001)(26005)(186003)(38100700002)(38350700002)(6512007)(8676002)(83380400001)(8936002)(4326008)(66556008)(5660300002)(66946007)(66476007)(921005)(52116002)(6666004)(316002)(6486002)(2906002)(508600001)(6506007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wcglEW+mzdF1Fr26gLxrEJP1GXYFYqPI/BtfKRFJ7mFinaE7p0kJcp4nv1WvPIh4YywMAI+EmNUHrSoWlXnpKSgHYG5k34KMbhTGU5vTwR5e71r+cThPhyqzvlnRnELt0tXgANprwFs+bFhqgXihv3VKZF3ljfXeVde6TEHMCxXdeNl9VDEDBdM8mhHGT5Q0EsRViojLmJHgZoq3iQ3YRUryBBICAg5uYv1XsAO9VSrb6JTOhIw524pjgW42QqUZWndAouGJ4Qi08HSDKyly2lfwcijKGujxsiDctN7cjmfxVtiBEQDWiQSYFFEqRAHVwvRowlBUdXM8lxTAQsVLvokCU12XqRSVRyKWPpP5Tmw1dVMCc+ug6HGoj75rStjrFhL1hHhM37IYLfdGoXOvLTHHJqbUBzet6LszRJnjiT/AlOi3w9sNvY7HB1RGxn0IuLEW9iZmII6c2za1L55LzUsf8gPH8wltahw+HSF04tdW7s1lD9nzm428yYzbg7O5Vi9e466j4uWrILR69RqVLmB00knV0MK465q7nsYIssdj5/tPtTAyHdUq3y97ZAYJ/xLTAv7gRrTNbDReLmtMnKxFYLiyuvQX3rNZL1OBtD+ucB+ir+Fz6BJl0GHyCfNz3eRDRXYwLiQnI7RGGl0mDmEAdbvRH6P9YH1BjSfooKs4YZz/AS2Jwv2Fz+HDMlXxsv/qh5SA/IkH8RRgffDgwjdx1hBNzXSTA6HbOC1W/8/ExcEZsI/pG5E0eNVoyTqTl+5Ap+uOUqeKBR2MoIun4FwcRuPPXS2qjTtYYV76hsvou7XRlRCNZgVQFU6N4P6Xak7KXEdbnlAD6MjX97dgyXC5I6s1DDou2WZvLDMNyetvxEZ4UwPMIoE+z7yF1aVUyO9scoA77FJBhR0yP39L/VMEsq/pcRXRg1OSUH96rn568DUGfqRmFVtb9aull6SGNRNzAZ/XEZ+Xr1eOtM31fRJKheMADIBtcXkwbDyK6iH1gtbm89gpWGZLbH+TGuzzlIgiDoJ18xHsdOYCmk4KJLIyGucXZ6mCH4s1bday/VI+jqAX1UEHS20VVDNGc8ucINh6/qaGSBp9NoeXJU3OJCtrGPuv+PzVKMH5owmDswfOLC6zADjom5JVmbLO/xf/p4P6HJJQRSootEnM6rjUIoE7kbroU5aeq6u6rFs9eu6H43A2Fjehfz6GhOY+Yjkia6bry9NJJw87WwAhtvmVtv6z0eNtZirOIM2wTLvVu3M983n/LXkSNijWgGyYlWN/ltJOeIMN0wjEKB8U+zO7ZkUZtGgmWlZyKlRY50N1K/Z/9xPcI9Ry+k33Obl2Ri2opJHgALzkjFxy+4rbJ51ttKrJ7zwHlToIUe/1crDMlAuXRZW44bljYn2jYlpHB6d6+Rmt7pWvgI9UYhBrDjiJKVJqc9R5zZCFRVnyZliFIkD5FbfosTKKrOq2EQF2rACc43OvWxG4EvWtnNMEmxoxSfbQsp9q9sZiuCYpmF+TU5YbfWXwIutUeLKuCFkpV3kg5WHHrecYwNtCQHwTzoQDbOs3m1rVi7BQrz0OCU/5cxzfkt4utie5+2wN+WdghhvnCjXwjVOg1grweJQyeQ/V/R7OGwwA5PNymcPLUi/ESKyZfaODDVzVSDISPBHHbuttJcG9BeNohTbYCF58NTp7cxM9zzYGpXkEnGZXg5SrPik0fwNCa75NNEkBoj/JoD6TJDOSU07PCEaHg9fa8t/4fg== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 90afbc5b-3cea-4b61-58bf-08da43b2cc97 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2022 09:40:44.4858 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: oUoPlTzuIGAIEiG/EJenmkwsIO4Hsk/xSQ4lqneMHUDcm30ayr/O7xODRFrnNHGoZXJgv32MiosWVSqps3VOpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6498 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan Introduce imx_icc_provider as a wrapper of icc_provider to add i.MX specific information. Signed-off-by: Peng Fan --- drivers/interconnect/imx/imx.c | 24 ++++++++++++++---------- drivers/interconnect/imx/imx.h | 6 ++++++ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c index 1ba906822b7e..f381697fb23e 100644 --- a/drivers/interconnect/imx/imx.c +++ b/drivers/interconnect/imx/imx.c @@ -134,9 +134,10 @@ static int imx_icc_node_init_qos(struct icc_provider *provider, DEV_PM_QOS_MIN_FREQUENCY, 0); } -static struct icc_node *imx_icc_node_add(struct icc_provider *provider, +static struct icc_node *imx_icc_node_add(struct imx_icc_provider *imx_provider, const struct imx_icc_node_desc *node_desc) { + struct icc_provider *provider = &imx_provider->provider; struct device *dev = provider->dev; struct imx_icc_node *node_data; struct icc_node *node; @@ -184,10 +185,11 @@ static void imx_icc_unregister_nodes(struct icc_provider *provider) imx_icc_node_destroy(node); } -static int imx_icc_register_nodes(struct icc_provider *provider, +static int imx_icc_register_nodes(struct imx_icc_provider *imx_provider, const struct imx_icc_node_desc *descs, int count) { + struct icc_provider *provider = &imx_provider->provider; struct icc_onecell_data *provider_data = provider->data; int ret; int i; @@ -197,7 +199,7 @@ static int imx_icc_register_nodes(struct icc_provider *provider, const struct imx_icc_node_desc *node_desc = &descs[i]; size_t j; - node = imx_icc_node_add(provider, node_desc); + node = imx_icc_node_add(imx_provider, node_desc); if (IS_ERR(node)) { ret = dev_err_probe(provider->dev, PTR_ERR(node), "failed to add %s\n", node_desc->name); @@ -239,6 +241,7 @@ int imx_icc_register(struct platform_device *pdev, { struct device *dev = &pdev->dev; struct icc_onecell_data *data; + struct imx_icc_provider *imx_provider; struct icc_provider *provider; int max_node_id; int ret; @@ -251,16 +254,17 @@ int imx_icc_register(struct platform_device *pdev, return -ENOMEM; data->num_nodes = max_node_id; - provider = devm_kzalloc(dev, sizeof(*provider), GFP_KERNEL); - if (!provider) + imx_provider = devm_kzalloc(dev, sizeof(*imx_provider), GFP_KERNEL); + if (!imx_provider) return -ENOMEM; + provider = &imx_provider->provider; provider->set = imx_icc_set; provider->get_bw = imx_icc_get_bw; provider->aggregate = icc_std_aggregate; provider->xlate = of_icc_xlate_onecell; provider->data = data; provider->dev = dev->parent; - platform_set_drvdata(pdev, provider); + platform_set_drvdata(pdev, imx_provider); ret = icc_provider_add(provider); if (ret) { @@ -268,7 +272,7 @@ int imx_icc_register(struct platform_device *pdev, return ret; } - ret = imx_icc_register_nodes(provider, nodes, nodes_count); + ret = imx_icc_register_nodes(imx_provider, nodes, nodes_count); if (ret) goto provider_del; @@ -282,11 +286,11 @@ EXPORT_SYMBOL_GPL(imx_icc_register); int imx_icc_unregister(struct platform_device *pdev) { - struct icc_provider *provider = platform_get_drvdata(pdev); + struct imx_icc_provider *imx_provider = platform_get_drvdata(pdev); - imx_icc_unregister_nodes(provider); + imx_icc_unregister_nodes(&imx_provider->provider); - return icc_provider_del(provider); + return icc_provider_del(&imx_provider->provider); } EXPORT_SYMBOL_GPL(imx_icc_unregister); diff --git a/drivers/interconnect/imx/imx.h b/drivers/interconnect/imx/imx.h index 75da51076c68..0ad2c654c222 100644 --- a/drivers/interconnect/imx/imx.h +++ b/drivers/interconnect/imx/imx.h @@ -10,10 +10,16 @@ #ifndef __DRIVERS_INTERCONNECT_IMX_H #define __DRIVERS_INTERCONNECT_IMX_H +#include #include #define IMX_ICC_MAX_LINKS 4 +struct imx_icc_provider { + void __iomem *noc_base; + struct icc_provider provider; +}; + /* * struct imx_icc_node_adj - Describe a dynamic adjustable node */ From patchwork Wed Jun 1 09:41:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 578371 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5FBDC433FE for ; Wed, 1 Jun 2022 09:41:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351189AbiFAJlT (ORCPT ); Wed, 1 Jun 2022 05:41:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351156AbiFAJlD (ORCPT ); Wed, 1 Jun 2022 05:41:03 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2066.outbound.protection.outlook.com [40.107.22.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 022595AEFF; Wed, 1 Jun 2022 02:41:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UEYK/XF7i3gnC4L64nur/4FFO/KAcXxuLkeLyfL6XDPC+GBGUoPVmtqGSvSXXDalVOdsUKJ032kxjNHaq883b+njFlokwj02ylHUxvM2sXBY4qojuiIsTGzNlhNHJbq+T2MJcKzHJd2qqPc5MOAJGUJNVXQmBDU0WqMzFHLdmt5UkqU6F7aaQj8TJYgEOIDeG2UKsgdmtgpk3M4zGCwrCGdkUrLkUXIW3LAVqeDq54QfRxXdm03Me5s+sDl18MRriphTR0UP3KU9XlfH+8TtWhfMcXVctM0L0ti+1uKJVN/06Znq6J3v09kTsUPMai6MS1rqf4ymN1MjbIggSUvA/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/9V9sK69njSkGe+bsKqGpTFzDqe5r+arZoyeFwMQEKg=; b=ALkyw0YVtb9F9/QMlZlMPjfnmyBOmZTNoGm9SyPWMdL4pn2BVnF8KPOB4nAN0GHwFLaUUW9OsNpXLAOPXtF3pS+XefCYI2y6rNHjHEWDimy4nxw6ihUpaHij8W1Z8ZgVgvr3fuJCWjji+N1MLfLjVVk9sG2dj1m7p+ItDfndeSlJQm7j/baQlNDYzKcNd85qXw9JFxfzlTB0dUo4jVcZdvHPEToN61FvXCtp41XK6+eN149PlwGid3nKWDM8YEy/zZihsCKdDzYvmNVb5PwsHwqGLBWCQ7SNp7tWzG5cqcXqE6EPdVkIW5iVNnXDCJ+42/HnrjQfYVryjD1c1JT9Aw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/9V9sK69njSkGe+bsKqGpTFzDqe5r+arZoyeFwMQEKg=; b=jiOA/3OMpyTQOUxpRAcAeGr+wkP+z0bVbxcRUWDLQ0HKiWUm9EGSNXsmbHoKZq43igezZc+mn+3SUA8Q3eWO2YIZMf4t5jast9xyOphLpEwr1CyNCbcfilyT4J/hLrJdm6laHzd1JstN7IAgyXZCHblJTng/pPWVrSlYTvKwc98= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by HE1PR0401MB2441.eurprd04.prod.outlook.com (2603:10a6:3:7e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.19; Wed, 1 Jun 2022 09:40:56 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5%9]) with mapi id 15.20.5293.019; Wed, 1 Jun 2022 09:40:56 +0000 From: "Peng Fan (OSS)" To: djakov@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, abel.vesa@nxp.com, abailon@baylibre.com, l.stach@pengutronix.de, laurent.pinchart@ideasonboard.com, marex@denx.de, paul.elder@ideasonboard.com, Markus.Niebel@ew.tq-group.com, aford173@gmail.com Cc: kernel@pengutronix.de, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, Peng Fan Subject: [PATCH 7/8] interconnect: imx: configure NoC mode/prioriry/ext_control Date: Wed, 1 Jun 2022 17:41:55 +0800 Message-Id: <20220601094156.3388454-8-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220601094156.3388454-1-peng.fan@oss.nxp.com> References: <20220601094156.3388454-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0078.apcprd02.prod.outlook.com (2603:1096:4:90::18) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4f952906-e616-4436-a216-08da43b2d3e0 X-MS-TrafficTypeDiagnostic: HE1PR0401MB2441:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bNIZD06E++jP9X30GCA/grxI0yy8T3QTI5MAIhqPK6GMdxIf21ULjsuM0SHKQ4ZZ/vQcz3/JWa7qttD1I/+1MAeYkjdqHXXp59EUmuT6wP7PHcygC+Jz9p8oge3lGd+Tt/lQxtYO0I8ShCfBjvcabiWK7oqgnAdsh06/TUMCPaGDls8ScIzMxHxu9eGcJQGnoF4TNLILIwCa30RRR2wl7lAuGRwL57OZ1mui5D64S2hNouF0UF3i0fo7zjCwHqNxHZlIHQxeCmD9P9ImkzyEHAwEse99VS2w/yNAZdhy96N0j03O87DWKPP4vKTN3b6G2LriaqLd46U3rnGmsNeDLE6tomXCn3zYqnnPdwAsOSa6xsGAC7xqXaK4SG+edrW2NDcjPY5PVtIM+dUeCpwSmQokQpFD+LC5v+wUAWLJq/aznXTPgMPyNGS/73Toq8t+fQc7ccoXeGXxa5Rxxc/7kYuSu1cfb3/QxWE+L3O8TAaeuHf/mfhLMgj0WljY6zv1KjNu/t9Uqof4Al6z2nHkPaR4Db0qzadE62OvZkhv5ZsxplTr/js3qKFivBygg5kUUosnHz7hg4zJAs61Q/IOAzkUvks1M45b5/njTaHbZeAHgOooH2xYapXmD20cREucPwyoE+XsWv0KEJ6buAvaOvIhdyah9nOXSiXHXPjXEmwc1zO2B+aTff19zSEThzzCg/EQQtuNo6ivjKIvOv+J516g1LXH/hvpogvtRoCBR9g= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR04MB9417.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(66946007)(66476007)(66556008)(86362001)(38100700002)(7416002)(38350700002)(316002)(52116002)(1076003)(8936002)(186003)(5660300002)(2616005)(4326008)(8676002)(83380400001)(508600001)(6506007)(6512007)(26005)(921005)(6486002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VS6ooiRKapHsMFSlwP6EjZ0lZRbg5bfuJTw2L4Non6oGx7DHr3sA8RfGlYvVdqZhka1Nt/6/r0P8quPeQ0jtsxBFcvk5xlKg2d7AaXOyljnqSHJT1BieJCKYtZ2MiD+LyIVIXSK9/eb9enoQYfC8hdSCLp6N37oQc+Dd8wAxrUyVIolnH8+0LJ07VqrfcU3prvYGnw7/9igsHn+eyWzfu5GCSVNcKWmzdJMd71qaW1Ny867xkA7Vr6TttbV97x7cUkmE/EySwW0HxImTSO1Gggrfhd1/4+Nxa50TcQdo7L7OIQ057jSs0p7E4PkojUA9nMdttLbJCXR26b2oRlU4VDqZW0hfF+SjXtkSrklhQZsuLlkm5eM125xv+GrCh9/HqpyNmLS2eN6GYM10RDsOH6CLvwZbIIh7OP0LgIMmHnpWb1ysSUSKwILin0njjGul+/YbZaSkQszciGNkW2cuanzTQyCEKSl1LoN9hQLx50h+4TRTlrzUeaPOr2uVtX/CIKr6K45c1BT9oNKexUrIeOTLso6mGEm9dzfCLsfnYBV2mjQft9r3+ezTnPrPHeT1h2pBfs1tkwk55EOjZpfDhsyq65k4Gk/d+pfr6R4GxhIlsjsnSBu2v6ggo20i7juYPtIS8TwF5VgaTst2BC8LQXlR96C8y3g++VKtGSdx21OdPVbYjcIrcJlmwtodibFXD6Hp1Msq1syQ5WS+o8MQpgWorAVTC/PaTsVT3t4aAtz+bvfxNNIzXYCXFjFw2yQkYFv8x5ODb+t4cL9Z/qMJHCa1IlFoN5DuUBur8+AR8ySGkdnYg7+PVwMa/WMxLJxL3PsVVbydRFFwVZVNRZiR1o/xWwB/dl4SRgf83isnjXF1fyu9oOONvEiL21BTmIsLpQI1hAO8w/ijikCBgUGgjyG6QMRzc0IahuvE36Xxz1KBJyn6EN2LaN0tTNxKVWF0zXUjwmoFhA+pVmkmH6QqCFSn5iSZPA0YKFlgBZBhqyYSzqJ8czaGweyYNzYG/PbnMtJ/Rkysrj6hxAh7OaJ75g0h+2CKBl+foyJcM4gr2UP7Fz94+jIW8MYHuBGwv5C/a/ITtdkkz3lUSme8wAt3PCybKda52pmNjHi1Lt54Efapsr3SYBKz6THpd9HcdxGwTh+HcFpz3u5OM5tvgPEdIZhQBeJ20/SkpWA5h6ebqTdBHqR9yh2bDRxUk701rRxvDRpssSny4AqSxvSrYBqKqt/soiaVyr0bylnYsT1JBnT6rwZlEDp1RGgQTzzaEssGqgOOM4rD4yHlZBw+7pLXRyCAAADW6acSrLrxnBPsel6GH490N1g1Yvl29Or8XLNC3vdpZFUHoiz0D354BSKnb6z4EhLo3F2r0aagELASx5P7dnU//wiM1zNnh+LWiGFRU8gs6agv6p/y4jR3bplgZuHKcHVVFIraRpLVWOP25KWGkPcYM+n6Qwy2ELlho0hdBb7PZHogm/BQxKACMLiQ9a2NV9qdF8tdCItGsyLAjrIfO+cJ/8/LuuA5nQ7TCV7+UPVy3AFU+s9+D2US/K684AZmzePx9+rTCMS/sVsmnDM2enom774MwPH3j3qqMFEv3ZaJD/sq4k8+pffrDsgkrn0dpApvICTPscV/ZDV+9evWlLFZB1NsRGy2RFf9ATxWy3xN0WbKxzy+RHaiQk/q/l/VrVnEnHu6ZzLY3IzE37BifvyRIdhFoAP/aLceGO6Nka1NMLqe3IyrRjn3Dam1Ng== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f952906-e616-4436-a216-08da43b2d3e0 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2022 09:40:56.6331 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: u37ftfL664pFc28AghMmijrQBBmVa9HPIDcHUnZtbMWFLesoFUyEL1/xGGz1cLtamiE28nr3i7AASxVAxu4OZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0401MB2441 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan Introduce imx_icc_noc_setting structure to describe a master port setting Pass imx_icc_noc_setting as a parameter from specific driver Set priority level, mode, ext control in imx_icc_node_set Signed-off-by: Peng Fan --- drivers/interconnect/imx/imx.c | 39 +++++++++++++++++++++++++++---- drivers/interconnect/imx/imx.h | 19 ++++++++++++++- drivers/interconnect/imx/imx8mm.c | 2 +- drivers/interconnect/imx/imx8mn.c | 2 +- drivers/interconnect/imx/imx8mq.c | 2 +- 5 files changed, 55 insertions(+), 9 deletions(-) diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c index 08e3a91d2543..bbb6f4b32b66 100644 --- a/drivers/interconnect/imx/imx.c +++ b/drivers/interconnect/imx/imx.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -18,11 +19,17 @@ #include "imx.h" +#define NOC_PRIO_REG 0x8 +#define NOC_MODE_REG 0xC +#define NOC_EXT_CTL_REG 0x18 + /* private icc_node data */ struct imx_icc_node { const struct imx_icc_node_desc *desc; + const struct imx_icc_noc_setting *setting; struct device *qos_dev; struct dev_pm_qos_request qos_req; + struct imx_icc_provider *imx_provider; }; static int imx_icc_get_bw(struct icc_node *node, u32 *avg, u32 *peak) @@ -37,8 +44,16 @@ static int imx_icc_node_set(struct icc_node *node) { struct device *dev = node->provider->dev; struct imx_icc_node *node_data = node->data; + void __iomem *base; u64 freq; + if (node_data->setting && !node_data->setting->ignore && node->peak_bw) { + base = node_data->setting->reg + node_data->imx_provider->noc_base; + writel(node_data->setting->prio_level, base + NOC_PRIO_REG); + writel(node_data->setting->mode, base + NOC_MODE_REG); + writel(node_data->setting->ext_control, base + NOC_EXT_CTL_REG); + } + if (!node_data->qos_dev) return 0; @@ -135,7 +150,8 @@ static int imx_icc_node_init_qos(struct icc_provider *provider, } static struct icc_node *imx_icc_node_add(struct imx_icc_provider *imx_provider, - const struct imx_icc_node_desc *node_desc) + const struct imx_icc_node_desc *node_desc, + const struct imx_icc_noc_setting *setting) { struct icc_provider *provider = &imx_provider->provider; struct device *dev = provider->dev; @@ -164,6 +180,8 @@ static struct icc_node *imx_icc_node_add(struct imx_icc_provider *imx_provider, node->name = node_desc->name; node->data = node_data; node_data->desc = node_desc; + node_data->setting = setting; + node_data->imx_provider = imx_provider; icc_node_add(node, provider); if (node_desc->adj) { @@ -187,7 +205,8 @@ static void imx_icc_unregister_nodes(struct icc_provider *provider) static int imx_icc_register_nodes(struct imx_icc_provider *imx_provider, const struct imx_icc_node_desc *descs, - int count) + int count, + const struct imx_icc_noc_setting *settings) { struct icc_provider *provider = &imx_provider->provider; struct icc_onecell_data *provider_data = provider->data; @@ -199,7 +218,10 @@ static int imx_icc_register_nodes(struct imx_icc_provider *imx_provider, const struct imx_icc_node_desc *node_desc = &descs[i]; size_t j; - node = imx_icc_node_add(imx_provider, node_desc); + if (settings) + node = imx_icc_node_add(imx_provider, node_desc, &settings[node_desc->id]); + else + node = imx_icc_node_add(imx_provider, node_desc, NULL); if (IS_ERR(node)) { ret = dev_err_probe(provider->dev, PTR_ERR(node), "failed to add %s\n", node_desc->name); @@ -237,7 +259,8 @@ static int get_max_node_id(struct imx_icc_node_desc *nodes, int nodes_count) } int imx_icc_register(struct platform_device *pdev, - struct imx_icc_node_desc *nodes, int nodes_count) + struct imx_icc_node_desc *nodes, int nodes_count, + struct imx_icc_noc_setting *settings) { struct device *dev = &pdev->dev; struct icc_onecell_data *data; @@ -267,13 +290,19 @@ int imx_icc_register(struct platform_device *pdev, provider->dev->of_node = dev->parent->of_node; platform_set_drvdata(pdev, imx_provider); + if (settings) { + imx_provider->noc_base = devm_of_iomap(dev, provider->dev->of_node, 0, NULL); + if (!imx_provider->noc_base) + return PTR_ERR(imx_provider->noc_base); + } + ret = icc_provider_add(provider); if (ret) { dev_err(dev, "error adding interconnect provider: %d\n", ret); return ret; } - ret = imx_icc_register_nodes(imx_provider, nodes, nodes_count); + ret = imx_icc_register_nodes(imx_provider, nodes, nodes_count, settings); if (ret) goto provider_del; diff --git a/drivers/interconnect/imx/imx.h b/drivers/interconnect/imx/imx.h index 0ad2c654c222..5fd650e61186 100644 --- a/drivers/interconnect/imx/imx.h +++ b/drivers/interconnect/imx/imx.h @@ -44,6 +44,22 @@ struct imx_icc_node_desc { const struct imx_icc_node_adj_desc *adj; }; +/* + * struct imx_icc_noc_setting - Describe an interconnect node setting + * @ignore: indicate whether need apply this setting + * @reg: register offset inside the NoC + * @prio_level: priority level + * @mode: functional mode + * @ext_control: external input control + */ +struct imx_icc_noc_setting { + bool ignore; + u32 reg; + u32 prio_level; + u32 mode; + u32 ext_control; +}; + #define DEFINE_BUS_INTERCONNECT(_name, _id, _adj, ...) \ { \ .id = _id, \ @@ -61,7 +77,8 @@ struct imx_icc_node_desc { int imx_icc_register(struct platform_device *pdev, struct imx_icc_node_desc *nodes, - int nodes_count); + int nodes_count, + struct imx_icc_noc_setting *noc_settings); int imx_icc_unregister(struct platform_device *pdev); #endif /* __DRIVERS_INTERCONNECT_IMX_H */ diff --git a/drivers/interconnect/imx/imx8mm.c b/drivers/interconnect/imx/imx8mm.c index 1083490bb391..ae797412db96 100644 --- a/drivers/interconnect/imx/imx8mm.c +++ b/drivers/interconnect/imx/imx8mm.c @@ -83,7 +83,7 @@ static struct imx_icc_node_desc nodes[] = { static int imx8mm_icc_probe(struct platform_device *pdev) { - return imx_icc_register(pdev, nodes, ARRAY_SIZE(nodes)); + return imx_icc_register(pdev, nodes, ARRAY_SIZE(nodes), NULL); } static int imx8mm_icc_remove(struct platform_device *pdev) diff --git a/drivers/interconnect/imx/imx8mn.c b/drivers/interconnect/imx/imx8mn.c index ad97e55fd4e5..1ce94c5bdd8c 100644 --- a/drivers/interconnect/imx/imx8mn.c +++ b/drivers/interconnect/imx/imx8mn.c @@ -72,7 +72,7 @@ static struct imx_icc_node_desc nodes[] = { static int imx8mn_icc_probe(struct platform_device *pdev) { - return imx_icc_register(pdev, nodes, ARRAY_SIZE(nodes)); + return imx_icc_register(pdev, nodes, ARRAY_SIZE(nodes), NULL); } static int imx8mn_icc_remove(struct platform_device *pdev) diff --git a/drivers/interconnect/imx/imx8mq.c b/drivers/interconnect/imx/imx8mq.c index d7768d3c6d8a..7f00a0511c6e 100644 --- a/drivers/interconnect/imx/imx8mq.c +++ b/drivers/interconnect/imx/imx8mq.c @@ -82,7 +82,7 @@ static struct imx_icc_node_desc nodes[] = { static int imx8mq_icc_probe(struct platform_device *pdev) { - return imx_icc_register(pdev, nodes, ARRAY_SIZE(nodes)); + return imx_icc_register(pdev, nodes, ARRAY_SIZE(nodes), NULL); } static int imx8mq_icc_remove(struct platform_device *pdev)