From patchwork Thu Jun 16 07:33:12 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: 582502 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 A0689CCA47F for ; Thu, 16 Jun 2022 07:31:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359043AbiFPHbw (ORCPT ); Thu, 16 Jun 2022 03:31:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230049AbiFPHbv (ORCPT ); Thu, 16 Jun 2022 03:31:51 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2051.outbound.protection.outlook.com [40.107.20.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F5AB50015; Thu, 16 Jun 2022 00:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RmNTSUZd4qacUCWW+rq0jd4YtIaMYgNegPBpMank4xOQ+nefJGE2pvlDZ0AK/RVgVqAgOXb0ZM4Y9JPKeAdk2NHJbywWCyqUD8tEaRznBZHrqtbq3cFF+ZpadQgOVJ4EE3PNr3CRDuBrnCy1sbUUxHuM4IsIOwfGGYW1/zJRb0wjf0EQDAF9/7KTafQUG/eCvnV07CCJnZnYU9mOJXXHCp1I/VWi7BXIdev4Z4z62yTUjh5MYqsAOSXKcIifqhHdrS587onyfvdvx/Awm9Kg2QCFdCiCZmzE9jbsJuHYg34fiazrlf/ZFLCigyakY31gfUvu9AVc9eAdyPt7PcGi0g== 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=CPFhAUauzzpD4pDmJdZ1EpeEWmLCVCxW9wI9YINMrUU=; b=Z0xQrw7wEzv6owh74l+QxUrnZr6LP7Io3PAbE0gr+NOtlvi6qZfDROrGjPZmAsGi2Ojom/EL8nJMJmOn2yMhXj3bLgUffn8rJwSqzKiXuwZiSg6rrWHXybkkvnFj2Tx81TTKaLM6564alRlYmc1PiD2p8UqJcOLldB6KblKXHBAudAmw48+EogOpOvmUHFRr39Atehtj47/bxhqA6xQtAuiWjhVVSDSQZe5MsrL8eeEjuxqIcaYYqxyWaPxyk/BDSmL6/doTFbOCWJl62Xd4fP+me+pEW1fZ1RJ5zjEeG00ySxbUis0cxaFlZnKQcZaa0MdqrSqOgENN+rMZyYcJRg== 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=CPFhAUauzzpD4pDmJdZ1EpeEWmLCVCxW9wI9YINMrUU=; b=Ye7HG+6GNtiomCuZNSOyQX6L9hVCePxsubj7le7WdKSikT+4MMArcVM6ZYfGWVN8lW/JpfnW5HvkL3RE/3R6xU06Wf7fZ/lx1LsVkopwlT55aA/l2n6UIRP/S+59YomUlcdPOPDiYUI06SlBhj6WQ1f6iMsBqzHc7YsUpn07MI4= 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 AM0PR04MB4850.eurprd04.prod.outlook.com (2603:10a6:208:c7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14; Thu, 16 Jun 2022 07:31:47 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5%7]) with mapi id 15.20.5353.014; Thu, 16 Jun 2022 07:31:47 +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, abelvesa@kernel.org, Peng Fan Subject: [PATCH V2 1/9] dt-bindings: interconnect: imx8m: Add bindings for imx8mp noc Date: Thu, 16 Jun 2022 15:33:12 +0800 Message-Id: <20220616073320.2203000-2-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616073320.2203000-1-peng.fan@oss.nxp.com> References: <20220616073320.2203000-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0121.apcprd02.prod.outlook.com (2603:1096:4:188::21) 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: e99e3f2e-2cd2-4e90-b3a5-08da4f6a44fa X-MS-TrafficTypeDiagnostic: AM0PR04MB4850: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: o7zGoDKoLJ3buJrju8lv0cY+QlXobx0S8pZ39iGNCkgLrrwOnhntslnwJseCAWpq9ctt28xEyzfJpUSTV8fWZ021R08i9gtFogYnQ+865+/myczBBsVlrJiAOvh3cTduNQqjXSBrYuRmcEgdQGjC1auUHvF2YeHqAcW3ZFBzHel8vByqxq3yJhMCJ2xz+sUPk1iXoYoVmuxX0pYPO4+jeYbtfcyZb/pCULsQeHbY3O7TCKfn1AdYTLVPFCipNNSIvt3enpfPMlIWi4lukj5ulDMmUMP0KpvaYRVJVEDHtQoNstimW4PoMFSARyblvs2HfLBu4a8tFnbqyn65YnnPLbWhJHmKVkmGla/dxxuM4DCeJQf5RE6S5Afs7fq7D1K9y4p1svxB93lyoyjW7c+eP4WuDCSbYfOZRXVMeanjKR5j4rlWBnH+/rjGJrUHoRZ3SlNZHc3NKhv6r3P5u8CE9xXx+nDEyWdKdXTj9TEM9Kej83O5SK2gctuw3a+EzkfPh7iFC/wiU7znBGRVq2QiU+cBkR3vUP75Ginb6F2/B+5kww1sGyjwmSLPnnKrlGaNl+84gvgtUm/6IGF9Bx+zGxRDtc5LMv/I8P0ZRjVpMfq3xlJlLwx6ekT9KRL/n2Cj3vrdzDWuKFxpqj/m7etDsFcadlvtLwDrc0vLn8O7SvLmBIgp8BVdAkE/3GR43gtaBSVygaJ2b7C6PEKvApOMytqbMu+PCKXkWZ3bZO10Kegs/RpMq/Rsq6EQwuZNm+3o 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:(13230016)(4636009)(366004)(66476007)(26005)(52116002)(6506007)(4326008)(66946007)(6512007)(2906002)(66556008)(2616005)(86362001)(6666004)(8936002)(38350700002)(316002)(38100700002)(8676002)(508600001)(7416002)(6486002)(4744005)(1076003)(186003)(83380400001)(921005)(5660300002)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: D0i917MQ1UW1RVruX6kb7hHAJJp2dyLUUQIjYuGbMS4Slw7mY6wy/zUPwEtB1rglhZ1y2tK8ZSi1PXQeEqDi9P2hA/Hhzxz5H37Zv/v493uF12PXl5gNRSLIvut5wamdEhD84tvwnrP4gXhSJwEJXqVAYQJ9ufX+kLJx/fmZaf8FhOaU0wXE9ZrDAwqbqAOpjVd+INui0EphzyQ1vOXc0Vh0LE6F4MLHVlpceuJpoN9fBXiw1j3m5sBkTPu/bRkXCY9ptuhPl14E5RxyYA10NYmqfijVbCaZa4Y1SMrnJy/F4jrygKVz/TEdoDEcApQnwwhTYTR23N3qAhC7CFZ0KffnZapp5ry+ae0v2r/0X4zG8iVo6m2uFSGjy54qYbxU0IUd3M5xjq/+/kS0ggsJxU0ZlG54UnrA3XbYhSdI0DmcE5OVWCnU3xLU4MorvME+uvbL06w9GIMVHAcAQaDNEgY4rfco34T/J/FqbQKG/aAiUDhq6e/ZRWA9nAEkhfRqUA/0vwTwREMlanPNq7odWWd9XsOo1PjOZkMNQtNWhJKCeLy3VpdVQCuBI8JB7HU9SzRR6UL5aE6LDskO3eunWXlofw/Oh9cjrBrf0K2Uun74Y9LvyDtLQwJ4Too+Gt4ouN+nu//2BgGGvmkUBK+onT9CX5KqqbtN8KFBC/HiYPXzsE58cH3YvNP9KhXKRpSyx6GGLudXaL5NFtGrEOeRUqLiQBPuTCqjm+wP8Sh/ADCGLmB4/PaAfAwZ89sN9rtT7q/XpNf6hPlXtW1t6O7UJHXkDu6kem8Wkht5/ypWZyDE1gVMi+ZNBCRXqb2hi13INfSXY2ImMkxshEn9ah14M0FGmMumM7qeI59KTooKkvb8VnXUF3XQ/As8EH7fnuDriTnci3uhWgI7VLARGX9n5Ap3SD+IEmom4XKGFMc5suiCslYlAWdbBuOZIQyqKJ/Vh7dyb8CZhHg9keSlfSrygo7hJOeGcPsgQ/yEHUaHUyAty5uPXh0gl0KEV06SWrlvzvSFZOq1RGOY986N8RdXPHiv5NDScr1GQSdg+GEwGTCzJSU41IsWWwyvSX8JhRKpo3W5Hk1c2jW8jHMCIlkfUwc8Pq0Vv6kXm2mvPEFs5jug5k8ZZKzb9yxQfO9P7dg5jHK/17gqwvNNhGtyYl805H/3hkHl2Oerj6dapbjAUYWWgMBCu382CFLuXwu6P3Q5PtFF8L2zg9XwGu8lsmzQtjBU56qJYcolSdmHxdXRDJiP9xqBkjCvRh29LDCvOjicm9ITsvKN7KQUGLloQ57hnF596qjiXyHy46VhCB6VH7hJG/p8qL3Pn6/IIB5PMONHcAfoC+QlBdIz2jMPYT9rT8UExhW6niPHYkmvPXLF0CBvhRf14pPpLBvA/eLHPIVqaxLtZpoNo0x8YruQ+6IdNRnVngh4LnA9114JxjatA4Ua5h0L4+2xvl6aqLo2Nyd+JHRUPH9MaCuUGtyfdrsSnsVsityLZprthzvssEiRNvfS6FJ7+aCTeZJX5lb38v4bstgfaC7aPznDZcTsmB6isstMFKWPAQPV3tp4QvwU4BjBLEvmJWYmQT5odQwZ70otnO/kZ+Jqz7tDzB44JCOdxOeGItClTi6TENjgL1y3zF5G4mRyrWyJKtoMdbm63KdlP3yIgPMGgk+G5bZPTPyj9v+TYcKI4w9tucpvWX2KF4Tvl+o6io7dwQNO/ShhIK1dmhm931djiVh3cLYnK2RS7Q== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e99e3f2e-2cd2-4e90-b3a5-08da4f6a44fa X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 07:31:47.2347 (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: 5WGNuchLRdjHPLFpR1+pFUC73qPg6VIUAHFS4OdZBWLaVCHsZCMOR/oYzAf9ckKwmLjUCQfjfdJcFe1F/xBwdA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4850 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, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/interconnect/fsl,imx8m-noc.yaml b/Documentation/devicetree/bindings/interconnect/fsl,imx8m-noc.yaml index b8204ed22dd5..09c8948b5e25 100644 --- a/Documentation/devicetree/bindings/interconnect/fsl,imx8m-noc.yaml +++ b/Documentation/devicetree/bindings/interconnect/fsl,imx8m-noc.yaml @@ -26,14 +26,16 @@ properties: oneOf: - items: - enum: - - fsl,imx8mn-nic - fsl,imx8mm-nic + - fsl,imx8mn-nic + - fsl,imx8mp-nic - fsl,imx8mq-nic - const: fsl,imx8m-nic - items: - enum: - - fsl,imx8mn-noc - fsl,imx8mm-noc + - fsl,imx8mn-noc + - fsl,imx8mp-noc - fsl,imx8mq-noc - const: fsl,imx8m-noc - const: fsl,imx8m-nic From patchwork Thu Jun 16 07:33:13 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: 583553 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 9BDB0C433EF for ; Thu, 16 Jun 2022 07:32:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359400AbiFPHcC (ORCPT ); Thu, 16 Jun 2022 03:32:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359382AbiFPHb5 (ORCPT ); Thu, 16 Jun 2022 03:31:57 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2055.outbound.protection.outlook.com [40.107.20.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFAF35C37F; Thu, 16 Jun 2022 00:31:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FfMCNdGcFiugX6RCduG86ezlz4lJz6YyuyI5yjcaupEBrB2rR78cedQlEIDduXse22moBixoUm4f3BoKDTsv/fu2AQUNBFf6q0/xlUphGYo2StPytWSZ0LKQ2XWIJBmD7Fl72gJ8vBkzJBs4gVNY4leOQP7fzBtOZW7D4ExW5mtRwQDan3+IkO71chX099lNIXHDqmWY2IUti28k5NiY2g+us/fWmkFNUoQXptuYG6aHpMwgjKZiH2d8KAkzUyIpbFUE9hILSOLk/Y1qqx0rtFJeuB6nYZu41fmUNic4dkOegJ8LSL9YIbuF27EvuhJ4oKABCsWlzuhMkPlBtww/tg== 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=BbYD8X+m6jaM2B7uCAGNN2ZG1liFoRO8cSULmisVsbg=; b=EJUPcpXp99jBnG1tIgf5wo1HsiCbF0In22Wr1YjJGVLt/1ATWnfzVW9HHXb4xyrEKGJPWIioEMavdnJdWBYvHBgrECu3ldEL1OeQllpiyFyL13OHFB2+WgOHP/brxzvTnDjIZa4zPQv68XNgna1kOI47cqA4thqwDz5aYoseRM6/cViTXmBrvjui8k+QaSnblltYlxw9j7MIjk2qKMutyFTaQRr1h7wob3N7joQwqq6/IOZuPosD48DdPsluOlol9952a6ue5cFqcq2VVvHVSVKqCmOTlhqhzQtQJ10dHjTrPAN4WG/Azi1AtJFb0uRJmIlXwA3yfj8E/5SrInIT1A== 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=BbYD8X+m6jaM2B7uCAGNN2ZG1liFoRO8cSULmisVsbg=; b=bFyhofeoz6LD2g8AZ6YydHos2eyLY5DCtdfQtKXblVdqyx3Ymv/RwIDGQISFhUXRFoux2+fW7IpckXGOorkBKEZeP3rx+7x6NrSN0fy8VQvBfLYQebyPVytPTMsnSrTLyqAycri80mFU84gMVj1vSLwKkh/8qJUzs+nm+0ErGY8= 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 AM0PR04MB4850.eurprd04.prod.outlook.com (2603:10a6:208:c7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14; Thu, 16 Jun 2022 07:31:53 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5%7]) with mapi id 15.20.5353.014; Thu, 16 Jun 2022 07:31:53 +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, abelvesa@kernel.org, Peng Fan Subject: [PATCH V2 2/9] dt-bindings: interconnect: add fsl,imx8mp.h Date: Thu, 16 Jun 2022 15:33:13 +0800 Message-Id: <20220616073320.2203000-3-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616073320.2203000-1-peng.fan@oss.nxp.com> References: <20220616073320.2203000-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0121.apcprd02.prod.outlook.com (2603:1096:4:188::21) 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: f4f6d8a7-3439-49ab-e63d-08da4f6a48cc X-MS-TrafficTypeDiagnostic: AM0PR04MB4850: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: D4i8evrDOt/duc4sYzJibnO73QsoE8Ox3+3tDBb/g+jYbtw7IMHY09fPBw+erpQ13fCevAU2ea7r2Iwhr0gb7qofpJCNQNUWZkLw2c8ZtSSQ9KnS0Bhkay/S9NE++hwxjNx7tJy7WkX9OE2n1KbcOLjF4H9Soezi0E/s1CnfgV2ituoNWT8OvMV8D9FdMiy6PA+CNiHjtPZX/wCeK4hoB7AG+hLFLX2RXHlJFI/r7sid1vanSzFO/zTpNg6G2ZquqFsKeMkhWryCQ0P7V9Z/Ngu0VmdEZaLNaDB0uaBTB64d+DzyUyEz1ERyCx2NprZp7G722YUxaAHhcejttZ3ADlHc2hkNj5paGc6o1gXbAbF9StftOmuu/IfgfcqxjFL+6nLtPAHmMXC5tanU0JE4MlzCkhjUDw365UZQDDjKe18X2qvm1Nq5OVTpFidByV2qEsG6888WYZ+hVYteGU75cl0oMrXj77bVsvrAvwxIiQs12DbZqE/pCFTF/Sxsp92Tsg0Y6IXr5Eaug1u9IeO2TUd1GOalvOgGHED8c7BrTZ3efEKmUr51L0anV4pEtJt1vGd8QdCjJd7xm3Ahc3I5w6/OnqdOwmnq61E5qoojtu2SVmvvWlxk+KoBcM5ocEP5OySX5H1YW0MWfgBgbLJ9zbTe+pPb5YjY/VBxFURJ3fbz4ijlYQL+dfQQmLuBIiuU2QLhvdiHWcpreenoXGHV0x4VOhhTcL5gAubHRtO1Q+w= 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:(13230016)(4636009)(366004)(66476007)(26005)(52116002)(6506007)(4326008)(66946007)(6512007)(2906002)(66556008)(2616005)(86362001)(6666004)(8936002)(38350700002)(316002)(38100700002)(8676002)(508600001)(7416002)(6486002)(1076003)(186003)(921005)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QYpC4sW9J53ZipjAjj7gI5KZdYpsnbrqk55G3dGoaQSUeg5gmFvGIgQ0Ysf1AY/g1eeryf03ha+tj49ZrVyLfTdBO2dglgYl5wdyVC7+zp6AOOF7wLG8noF37vJ8kegbEscRYRXT2yeViTKb3/S0X8XduOumN/YvJr6GuEVmy28J/x/7bDlTgQfJx8B2JKRZ3UAX6dpj0Oy/Ut4vMGpwinhX0R0+lM7mwTrIlluSxdCRq8B5Mm3a2kGOL8ArjTiFjWcso24oRjUkKSepBl7AqFg8g0hJSE53msf2/mHMF0PJ4RoNmFA1jDU5iiFKHc/IZopMHhr9ZuHGLZQbzuyYrN+Z5Cj1ZxOX7plJogB5yezbE/SGyAqVDQ+dJ1QCm4RtBDCFZhOOIR9h5vMsuFzpNSLaz0yLJRQ+mSgzQdlAiAIdf8g2Qkb1MGg7D5FtS/ZRRNBjtuIgHyLLccKc8EkZ38365hU7a3vblxI68E/Ts3e8X2/tZiTOwVE+F82PGMfXNSpMn97wtua3Czu+ny73mZqgi94nrNLsqSn78p4ndiXJeEBStc50rqIHlXUduKJZ4Be5ag/80IUvEF3kaxrA8xok7oElwwu7V8+TLwrL4MrlTfYGwaLAeYWUrXK6eo/od2skyc8dRYcMjoZ/5UI2mz5ZoC3vZl9KK68H2/7FXgRHQR+P8adqGUr5GySxo9lx1DfswxwN14Rj7dVGdIHke7H1vVeHBNiKPK9SCXedWRYxBUoHZPj9n8AtUrrwz1p/IbGwp59UVkCyzzDeE6j3VejaSGAyOOg5559gaCQQy9E9I+q40sqDwU7+kjweRUoCcilYawdDiQ1ytyJEipv5XSu/nrJyNgAeeiU4WHFzDsHbrTv5dwqcgGYfVod7tbGfCttJk44+VfLPulpSAzyPFQllWzGeenzlFLO3Pnwt3PHNeh8ZMbri1Fivd7G8yauYGsZDlhNm0VxZgND4ANdaT7bK5tzqNrzXxA+/8riXA9DxU0jQxndwWFbmybj/O5YlbSxWoNhs8KWOVnSpHZe3dHg6ZYyhQdUveHsxynh6gXMSoe75Z/4/j6RQodskDPhpnEjegDHjpUMAyV0mw5C3kvfS+dqMUwUafaIzJX9xieJ2oMCCU5PVGK0fgPnkhou5qqDUmxK5DFuKt/j3ZEfRK7a9LJff8pCcPkIUPUKgNjzf2UZWAN8u22WPkshU8I43r9UBBb80SlXEdH56XKWsRJzz/g15bDhtL6pSO9e+8kt4IIdaodc0UwYoWmX78ULK8lDvJSDGTDz/fGFZe4bmwDvkVWYnmHof7+PT7ChAd6jvZidTMpTZQnV8VM4jHJblnSIoOQ36G7xZJSZprrYeDrAD5hjL7XBboWANxNH3S8nmlO7G+EKRZI1i3oeSWl9MG7sgxoADSELOoSbYQevh8RQJclI0xwNkZb1EVuLgq2J0SRGJcDUpuL6l08L8Ipacftmqu+ijP+yr8LdzNXAEh6PY8eJEWBxeVucFLRqA23T7t+PIPswfDdSnmv7C5he+S/QEprbONIXZ6dmpYqlhqpKyMJfCHMlOn3LrQuZIv1VzdGoRmp7xDTv8gPPY7N+bZAzSQ+/heHlvORZOKjpFudRSBsG3HQuuciVZYzoyuAudo+eLTqZgy0xSq2XTjEJnKtrIBYtPYZXSLdeEXh3CYJYDaif0xvIJ8LncDtLishUNoLFU2lUEvVXEmXDlqX74WoA6QsKeR1vCKzTxerCAEg== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4f6d8a7-3439-49ab-e63d-08da4f6a48cc X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 07:31:53.5687 (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: yoj3HuhA3eizU8mhqSjhe02Oq0STdoYW8DS6ENIVa1Fakv1MjP1eavNubDhZSMHrStgBhNid09Yc08d7K7gHrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4850 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan Add fsl,imx8mp.h for i.MX8MP Signed-off-by: Peng Fan Acked-by: Rob Herring --- include/dt-bindings/interconnect/fsl,imx8mp.h | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 include/dt-bindings/interconnect/fsl,imx8mp.h diff --git a/include/dt-bindings/interconnect/fsl,imx8mp.h b/include/dt-bindings/interconnect/fsl,imx8mp.h new file mode 100644 index 000000000000..7357d417529a --- /dev/null +++ b/include/dt-bindings/interconnect/fsl,imx8mp.h @@ -0,0 +1,59 @@ +/* SPDX-License-Identifier: GPL-2.0 OR MIT */ +/* + * Interconnect framework driver for i.MX SoC + * + * Copyright 2022 NXP + * Peng Fan + */ + +#ifndef __DT_BINDINGS_INTERCONNECT_IMX8MP_H +#define __DT_BINDINGS_INTERCONNECT_IMX8MP_H + +#define IMX8MP_ICN_NOC 0 +#define IMX8MP_ICN_MAIN 1 +#define IMX8MP_ICS_DRAM 2 +#define IMX8MP_ICS_OCRAM 3 +#define IMX8MP_ICM_A53 4 +#define IMX8MP_ICM_SUPERMIX 5 +#define IMX8MP_ICM_GIC 6 +#define IMX8MP_ICM_MLMIX 7 + +#define IMX8MP_ICN_AUDIO 8 +#define IMX8MP_ICM_DSP 9 +#define IMX8MP_ICM_SDMA2PER 10 +#define IMX8MP_ICM_SDMA2BURST 11 +#define IMX8MP_ICM_SDMA3PER 12 +#define IMX8MP_ICM_SDMA3BURST 13 +#define IMX8MP_ICM_EDMA 14 + +#define IMX8MP_ICN_GPU 15 +#define IMX8MP_ICM_GPU2D 16 +#define IMX8MP_ICM_GPU3D 17 + +#define IMX8MP_ICN_HDMI 18 +#define IMX8MP_ICM_HRV 19 +#define IMX8MP_ICM_LCDIF_HDMI 20 +#define IMX8MP_ICM_HDCP 21 + +#define IMX8MP_ICN_HSIO 22 +#define IMX8MP_ICM_NOC_PCIE 23 +#define IMX8MP_ICM_USB1 24 +#define IMX8MP_ICM_USB2 25 +#define IMX8MP_ICM_PCIE 26 + +#define IMX8MP_ICN_MEDIA 27 +#define IMX8MP_ICM_LCDIF_RD 28 +#define IMX8MP_ICM_LCDIF_WR 29 +#define IMX8MP_ICM_ISI0 30 +#define IMX8MP_ICM_ISI1 31 +#define IMX8MP_ICM_ISI2 32 +#define IMX8MP_ICM_ISP0 33 +#define IMX8MP_ICM_ISP1 34 +#define IMX8MP_ICM_DWE 35 + +#define IMX8MP_ICN_VIDEO 36 +#define IMX8MP_ICM_VPU_G1 37 +#define IMX8MP_ICM_VPU_G2 38 +#define IMX8MP_ICM_VPU_H1 39 + +#endif /* __DT_BINDINGS_INTERCONNECT_IMX8MP_H */ From patchwork Thu Jun 16 07:33:14 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: 582501 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 CFB07C43334 for ; Thu, 16 Jun 2022 07:32:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359417AbiFPHcF (ORCPT ); Thu, 16 Jun 2022 03:32:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230049AbiFPHcD (ORCPT ); Thu, 16 Jun 2022 03:32:03 -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 15D125BE74; Thu, 16 Jun 2022 00:32:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UhivMWZKGnJNCK9Zjg616phGOcilRZWdzieqdbxHrep13Cb+aE0LCOp9l51kUN/ikc8hLLtPaYhAVI6JdArdHpc8hSuevIl+I4sq6P1TFz3V0Do7K5Yh4ustkoS/BbD/FPEUSSi5yBqR9Sva1dXAwp2K+eJ5RqmjNPGTfJA4ipAawDtWsaiXK2+3DTj64Rbag+C6vUrM9+E5vMf4WMuX78a8pO18dvgBsgJzK3T8MB53hY5dJVWCjbp+kvMUo+5HsfggkBshILiyyTjxjT90uiGgEo4N545I6tHBztsKUp9CMvygecSRWMDf5HPk+x0xg3WZhcwcFV8Jp3lkEfOgoQ== 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=acQKgVJF7AArGjJMPl+670oOUbjqsjIozrJ1xFJ5NrI=; b=F5UT/HhXBTQSX3nGNAwQrUpHTpo4ejI9+6fnZ0hXzMpKwGmxSsVmp7ZYshWJBSWLWFMDH4c6DvQ3OIZhAY1Zjpd6rKCedv8Qybb1GKs/8FvowwhB4lar7eGuapf6qsZXDuNCcW0qImCE41hLyTCY9WNLfh+QgA4TZMsAEBsp/L1Jq2KQjPOl5VRDKtd33nZp98ose5vfcA1DU7y1+eE4Yn3XYL7gQmfGJ2Pr6vm1EWP/NRW87CnhQDCrZps9waO2wgUNlJSRrgplSWSMThkQLY4zFho0FcFWyhOyFYjW3tpWW+eOB10v1N5ZTlkI3EnQQKNgYpJO3v5ZYwTBc7Jjlw== 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=acQKgVJF7AArGjJMPl+670oOUbjqsjIozrJ1xFJ5NrI=; b=MZ0f5ANOHiLGqTUh4EUP8dXXsr6/M+OIwBMKGaH008LQHV0QNZlFq/uVYP/2qaDhCotrB6oFkUytePR5VTA0qZottLMf6nguxqMgP7FjUt221Cb2V4+Zu4Zb+TrsBdKfrVYSoaVkgaSbaWe1JuLmUqAhnwN5EjoAX+70NgN4qUU= 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 AM0PR04MB4850.eurprd04.prod.outlook.com (2603:10a6:208:c7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14; Thu, 16 Jun 2022 07:31:59 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5%7]) with mapi id 15.20.5353.014; Thu, 16 Jun 2022 07:31:59 +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, abelvesa@kernel.org, Peng Fan Subject: [PATCH V2 3/9] interconnect: add device managed bulk API Date: Thu, 16 Jun 2022 15:33:14 +0800 Message-Id: <20220616073320.2203000-4-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616073320.2203000-1-peng.fan@oss.nxp.com> References: <20220616073320.2203000-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0121.apcprd02.prod.outlook.com (2603:1096:4:188::21) 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: 739e75b4-603b-4a52-ea39-08da4f6a4c74 X-MS-TrafficTypeDiagnostic: AM0PR04MB4850: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: Nw9tSfVWk2OHsvBtQgHryzBstKm3b+VX/Mp/jbMLncLM0WZzjYsm+5n6qsgqEyeYGgBgMcny658YkvpEcxI/Lka/6DZ3GQag8KOXSsws93igFdF+eLxwi7BSwe2Pm8fmJV9ya+KRzxbc/GVSeQ4LgSd9xgDlG6TuiWQS+CO3Y6RqNRMR0SGoTWMiorhQve+47psm4rCDJIV5Ku9j5LnYefIF5ofoMoYvVypS1RtI10Slf11mhSqoGKiYdTO4AQrKiPbtrx6IQ4TLEf54PY8BZSxkjVNCEpkIpQX+DZQ6+a4ahzfdOFvcZ7U+PG6bDSqG9UXQ1ZBFHcZ9Guzqm14y1rllicfUmMOXfPcAeP4K2Z+F7I4aEQn57oOhzZpR2wUIoLi28Nd3cxK5y0EQ2YHeTzXksg21tGG+FMMxLnhlNx6FEd9uZMGvTOOer8RkcepGaeMLc39+v3b0GOv3H/g+DsR9jbvedXP24R5fXQKdsWafBz3fTX2jlBTaKliSxutzPy62KpIAoU0yY227uFmF15BVaAmlM5VLaKdrAfRJVOqRjeiVgMOjYXZ0+jMq1NPzU9Iaq8kviN3ZJ5ni92LrNt91qU0ssLv33WqaBuaBDpFjcQFk3JeG8wxfdDDiHK8zKRoYqrjm3D587eKIjdLNwvTGk/cFerAHpASvBRVvsJibhAREk19MeK9fhLW+i49k3MvWzd1r0c7bcwgNZr8/F/Dw1xDdxJdwgoCwucQcbxw= 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:(13230016)(4636009)(366004)(66476007)(26005)(52116002)(6506007)(4326008)(66946007)(6512007)(2906002)(66556008)(2616005)(86362001)(6666004)(8936002)(38350700002)(316002)(38100700002)(8676002)(508600001)(7416002)(6486002)(1076003)(186003)(83380400001)(921005)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: okSBa/8+GeDabKszL3ASLETfYSKzUrQxf4yhWJ9Dzv9nKpscojRWr8rHHcs8K2SVjykHm4oRNsIPvWyFy4SP5UrrXjcQjijpe1MdT/+5M7CSdCWm7UzgjImjmAuwCcuUHXDHSVnZDQ2zQZA/J0V1VlzC354EJvI+YP/vko3q79i8MhnHtjt6LnpWf39v6d42Xcg4CnP3CKUc6HR6w+IFJCDChD+ylffzAR/XHzHKrj2WdL/0luHblAxLinOCB+zKkqbnYoiQ803wskyujhkES7d9lMAMfp/C3Ujh1GWuGBlBmIU7BCFfLLtZHihG3JfgwDfvQ9HMHHryFOAE7f6e8nLjH/A9rFbSnvar3MnlvH3AWjUhXTji+YO6BPXQTCqiiz9d7mn5QFsvVG+9jbQnnJjLAzVgs8eL6lNVhsgttb2QrkFYy0mLTkQNfD8sk+aU713MaQ5/diFU8FImYgskUaYqA6hsPBjmlFRxFs2DSOebFWPT6a97MmkGycLpIc9W/NATSIniANDMlkIJdmbfEPtykSnpuQroDt4FTS63TU/fUMrodqRVrx2kNXI/LCZ/D6TCIEho4ledn4vk7a6M7t+d7+C5I99f0qJgrRkZpQqbIW6VsXgKvxZ24iB4zcvPRmIm3qserLng4nPinHyw/XMcptJZQOJpse4PfIgzpTeiWK9vfvk5VK0ttko37AZOdAVCYdSzebk074Iw8/4+evavWYLA9qAgp6xmz4BiZ3bd4Ctm/ut0cagtBH31qZkW830SnJwP+3yv2UKOoy+qc0Di658AE1WwP6/+HmLY/sl26UEVwohxNLy7QI0BP2+ZejkcEfYMwRb69ZfSdbkPpLEO3R74N8RNhyrCXOQ8Izh7LoECm0QINz1m5d+yILEWSCoSE4wZi6mfBd66BPpfpiI7chqVAD/EP7kG8axt4JcIE0sYL4dl8eG8KYa8U1WC8P/3bK73FtI4cdf8mkUHu67KycG2BebDizS5Uo6pKcdPcyBwMLJzWXvVvAi6AQCpvuHCBId3nF9GX2Qrq+RDT9l+3YXUO+kr3UTyk6HuypPL6hz7+cmnMqYaTmgKwOrdFtjQ1+1VwY/xGgo5o9DzXAave4qXEO2unEQSfxarcFh3QHe+0mhzPE7/+h71uuJY73Wp435YxkwlgYRWCKo6N3djN1n03CPmtgufI5XxXjG6X7+CjG4lKSl7AEO937jZxQHIRWROTFa9fgdnCfkHm9w6pReX2Oo5baew7aQm5h1lffWEzybS7ohFxuraQomv9ScCczzzDY/df9+1T5/23flqD2+08ZCtz2EY/xvVUl9efOgHL9TT8C7YtG6yWyNccZECNFSu4EmcLq6/w776Pvc5UM/1X63Gd3CkcVOpV5Ob+u773iNAQZzTO0zpwZxBsNwYrb49tSJDZCdbQikFXR2qUK68HaI8W2V+DpSikrrx+uoeI1z0HA5+K+TP6yewI+EAYwxuJpAmxt2pDT6OA3pb6XLJmIidpgIsoiwhUZrV0BYzLS2Sb3G4c8/mbjjiCDx1/K0+oFjMbpmuOwNebomftSdJWZ9vdHJeaeySXfE1gVqjJJF7J67BV5bwh56EX3F3SpLZfl1IRl8OkvlKecPkuxXeHP1jZA+kuRH6omsxnM5cAy7aVvdO2wQBUe8g5ICNAHGl2Jif+Uu4UccA8xXTHxSNU+xRCwop89mLjcbqRQYzWXBevaWO8NsbN/TWc0Irxg0A+O5p2o5UlRmY6w== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 739e75b4-603b-4a52-ea39-08da4f6a4c74 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 07:31:59.7185 (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: SO3YfkjS95k3etlvfUOmv0DOxmZX6fFT3BAswGkX3gvcAyuBwZYXjoP3/0l96UDCndzrO4vBrHf/2G5Uxl3PwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4850 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 --- drivers/interconnect/bulk.c | 42 ++++++++++++++++++++++++++++++++++++ include/linux/interconnect.h | 7 ++++++ 2 files changed, 49 insertions(+) diff --git a/drivers/interconnect/bulk.c b/drivers/interconnect/bulk.c index 448cc536aa79..8b1d8a412464 100644 --- a/drivers/interconnect/bulk.c +++ b/drivers/interconnect/bulk.c @@ -115,3 +115,45 @@ 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); +} + +/** + * devm_of_icc_bulk_get() - resource managed of_icc_bulk_get + * @dev: the device requesting the path + * @num_paths: the number of icc_bulk_data + * @paths: the table with the paths we want to get + * + * Returns 0 on success or negative errno otherwise. + */ +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..2b0e784ba771 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,12 @@ static inline int of_icc_bulk_get(struct device *dev, int num_paths, struct icc_ return 0; } +static inline 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 Thu Jun 16 07:33:15 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: 583552 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 972E5C43334 for ; Thu, 16 Jun 2022 07:32:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359311AbiFPHcW (ORCPT ); Thu, 16 Jun 2022 03:32:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359435AbiFPHcN (ORCPT ); Thu, 16 Jun 2022 03:32:13 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2052.outbound.protection.outlook.com [40.107.104.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C83145C67B; Thu, 16 Jun 2022 00:32:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LG1NnP4Bf5935jGI8nWzrVtFcMU0MRS/O+zSe/JRFGdu30ryWMLJp7xRKQyDyMmK8V5LNFWYaUYw9dzIdEzlcsDrhs0GsOsoE6e+NwBww5vQIcptj6Az+/USwCoDkJkIw1dRQWCvS3W8ODrEyRVXQ18Fg/ozRYS8kY/H0NSZaAdBigwMLObjNVWHnxDkaOanV7hBWATCAmKrUBEB3f58mX/oeDIFOSN4iRvxUbtA6bKZduTmIYLAa/OdtVs8y0nWfWJ46azN6DYFvFidq6nKt01x4VF5HUACGmyEwbkC9M+kMR1e4tNOsq74AZskJqkPDGNS/5tohjBGeOr6p0ijzA== 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=nnFrfn5UnzLFl40Nkg7G8mYn2FZ/F9QeYrn/MkSMNeA=; b=fcQRYoWVvM6W7PRtLhOq625YtrEPX8u1xge+KaSxf2xCUvrqYgzPqrgxr+fc75YXGLljU3BD5GE7vEj6C2TKWI0risvYWCwjxapyaOlAq00UVtOVV2vZW+b8XTg4LI/wwpXHqcUxeijhVKH4Q50rMEDVoYY/POxMv5uHrQVtZ1F2h9Lwtqi7glu1wqnImnVVF+ypOJ+a2kVy7RR6B7ry17hWRxA4hWK0F58LfJgf2A2g06c3CROrleAP9m7SqgOgtQetyJp0oKMZYS2RPrviCNQK02TZASzC1/P4pJrvoJqdtASQy+FvA/iUwwl3oWTK3yDJ6EHgPwbZyenmgWEahQ== 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=nnFrfn5UnzLFl40Nkg7G8mYn2FZ/F9QeYrn/MkSMNeA=; b=ZP271+B9afc79BN52J1s7GBAgw7r0hmr8KJ0hvvxl9cRpcrjDNLo1hex2Axj3HQTtTkF3ssSQcyiB9QGPrVlK5A6LUX9t4Qp6aBSbRTICbyIy0StfKbqee7gu0vDb7dOfwK+/BM2+Foq2kRa6NNddjevL0LD+klugdlsudQroUw= 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 AS8PR04MB8435.eurprd04.prod.outlook.com (2603:10a6:20b:346::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Thu, 16 Jun 2022 07:32:06 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5%7]) with mapi id 15.20.5353.014; Thu, 16 Jun 2022 07:32:05 +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, abelvesa@kernel.org, Peng Fan Subject: [PATCH V2 4/9] interconnect: imx: fix max_node_id Date: Thu, 16 Jun 2022 15:33:15 +0800 Message-Id: <20220616073320.2203000-5-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616073320.2203000-1-peng.fan@oss.nxp.com> References: <20220616073320.2203000-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0121.apcprd02.prod.outlook.com (2603:1096:4:188::21) 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: 358c9767-04fb-4abc-0f3c-08da4f6a5027 X-MS-TrafficTypeDiagnostic: AS8PR04MB8435: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: 7HIDEGfr7JuQ6Xw21w7YOQ0LfPiKL+T8CcAXW872Ynjvp+aLmM2+663jHq0Feqf8gWHcKr7M0rV3+C4Z/FQ5W3F4gVHaHlcN/X8gUralrL9akW2zAqqzbZBVjoPfP5fZJm4h93eMjH3knJAAoWoj7y0pvep+CUUvAAgzRY+8kpJLYwLrtFSkNnZ16l4BFalh+moTGmcLCFqD1IQ+yWCh7cQ6sEPBp90ajTfAbl2hIBNU1RenhrjyxCsFJVklwIii/t374sRIoa4c2efgGWdOo/b+2m+Hd69vm36GCko+q/d2GMfvR6XtNB0ihmSrFcxsjTM8CIZNrr3LL2eO4Or+JIkES/yBiwbCX8XebRFgwFM+kf7fBY+71zW58oUI5F4OiG1i1mvyVbLOXEMM/5V7LAzDhqPyxzLdqjk+Tx6Z4jUXS/dxOSCtvDLjwaK4+tbcBONqZwSRnJAee0H6EvpsKVhPigMl5yY4+oBasqn423O+3Y2cRBQ3gLIJGIgwB+LusKUpfDTwhVGGXAfhFQ9cx30BwWZWVEWdhSqXsm6yj+xCNgkZzCDX/1/cTHeRWDHiU1ABDDGinPh/LI8b1UPsQQUyXQJ90ew2o5NRMRO7NjOQ0VKNbxJXUphuBGAs/yuo74W+IvE7EF7EOvungzEqI7yBjFC+7/sQXtZWV7fT3YcdTOnNac2PXt/hh0UM8ljZxaF3lWEl/QIJpIM9W7TcGNwifpORxwrEck1Osyb8jTk= 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:(13230016)(4636009)(366004)(26005)(316002)(6666004)(6512007)(52116002)(66946007)(66476007)(4326008)(66556008)(8676002)(2616005)(86362001)(83380400001)(6506007)(921005)(5660300002)(7416002)(38350700002)(38100700002)(508600001)(2906002)(6486002)(1076003)(8936002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rPwmhdMhkdKRZqyujmXZZg3mzlYiATbDRbTSm6UMaZ0g7l+F6iT49owLHKEX2JMnTmUCsBJsrJ34WzaQuxNR48u5ZxHASMk6X3/TL+0E1avXh4YVQ6fdPxfs1UkVLDg5lvj6sTCwZZru0LkWSFbXkJqcCjsdcnCTqWcPKrCCB0U0w9HlD6q4WrbYyCWtzD5k+czD0p+JEd4cuZlK3REot7k+sLH5Uwm6jMquksrpQ+mWnzkaI69o21rZegnaZNahJeG6VaDjMQYfTFt9xxGBMCLINm1fzzZvlrAX/VCJoEWTskqlTfEy1bBa6a0CuzZUzR9DR2dOJq1AwxmWsDuRKKsY+b9agDQJPit5PLGqBv1WmoKvBWIanhFg8wgNC4H/ycgCB6bmRG/PQ9EMuSomgxbek53wIFs768/msxPeuoCFlf5lW5HKXfR6kkUxBu8nMJ+bERykZP/DU2aXdKazj9E4eldOavY9ATLmZzr1MdbVvKIU0GaoEAV3EuGv0NslehbtVVd1YqaL8a9qYaF7hKkScwNNMGry0kt9ubkcduear/oyOlwbJwhjLuFxbDDIbqprEn9RvVlHCuHTnAowZkmt7mhx5t3CCegwOev+D98O8S2lqQ4q2rlcNPjhFwX04TUKHT8iD8WBNq60CYE1UEtzdTXoTpfCxFfChQPCzKipxRwuk6eFMH09jBfpPhjHmaieviFe5zKVunf7XBYLZ4y92xVbP93aawsZQZLljtIgDo7pyIGsPHjVpcbcugaE5W0AXA5DyIIS83k49c3duyPKuXD0hpiTcUBy40CIYBySeguBXXhkGklwqt3mlgBvDzzDUvmLFOg9+U8VorXFAR35N6zPYP2hUuJdc3s6IIzNB+Aw4E5n4SWPql6NB9BZpQSpuuRBbn2CIGM62z380C5lqIzBtNVa7qVEe7BUBP4QEYBxib1LyZ/venVQVLbC9ugfR7lKMyau1mZ1S1R45MLKHSLg9th0V2k8fv+lG8BkTR9UPt0O87j9lO+ulDe5ZeuaCn4ky6g/PoM+tWXxv8QSnSxAlkIbtccaPohayTODa86l5XLEvFUNRHodzmKiHfZpX5qDtaCz+0kGRYmvWYJkmvJbbt+EjpAf5rmi1NP3yc5O/+Cm9eiHqb+SPr9pK7CHWGpF4GS3Awmv0a5fVCrszB0FzGOhSaYCden5+1yDHqrkXiBt75I+T//t//d7PndHoL5qD3tRT9Bpz9w5Gi39Twy3cm+2EYjzsmVICBu+mB5di+SzXBcG55guNA/Ai0HJq5gXneWbRcijibBfkJnJ7FQ3jMR2EqBlFAqFzFxY9K/auJcZm2ezu3NxvupvHpbTN6/cnqtkBYbaBJvsiY3tueHdxJTaF3xOS2WDM4j11PAShM2rk7vyZQHTqlKL8qwyvsuMHuiGH9WsCahr8zMAzyz9BXNGkVTnFeYxpAMQ85ITi6b56ohrsiTO559Km9kvmH4yu1yNu1eBKBWKki1ngy0r60i1Xzff4ZngE0Z0nTeTKTy9fgtj4xELkAeQCtEPUFdPtzB8d1LZBu1EDIZERvLQS7l6qd0nbWiH+EZPiOWETJsVKayowqdIdDfzkXw2uBuHQgzY4+70fvhbGN8pMgw5rmLuaxHW3OWgc93Vea/qrVtCgfSmyZaPrROGnu/1L3LSmFUTAUFxY16PnIp37R2B9gq9TnOGAKLTvg6IZTNbqA2eYL5WMHkgxYCC6OfDdxr4eJK8B/LnzjY/3A== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 358c9767-04fb-4abc-0f3c-08da4f6a5027 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 07:32:05.9492 (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: 8Q/qMw6gfRpaNf63MId/Ku2p2akiFjVWwdzGiz9CwUbLghcKML4UXTKbkeeGitr9f4ROLrCnLJM+Okfb0lgsDw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8435 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. And rename max_node_id to num_nodes to reflect the reality. Fixes: f0d8048525d7d("interconnect: Add imx core driver") Reviewed-by: Laurent Pinchart Signed-off-by: Peng Fan --- drivers/interconnect/imx/imx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c index 249ca25d1d55..4406ec45fa90 100644 --- a/drivers/interconnect/imx/imx.c +++ b/drivers/interconnect/imx/imx.c @@ -234,16 +234,16 @@ int imx_icc_register(struct platform_device *pdev, struct device *dev = &pdev->dev; struct icc_onecell_data *data; struct icc_provider *provider; - int max_node_id; + int num_nodes; int ret; /* icc_onecell_data is indexed by node_id, unlike nodes param */ - max_node_id = get_max_node_id(nodes, nodes_count); - data = devm_kzalloc(dev, struct_size(data, nodes, max_node_id), + num_nodes = get_max_node_id(nodes, nodes_count) + 1; + data = devm_kzalloc(dev, struct_size(data, nodes, num_nodes), GFP_KERNEL); if (!data) return -ENOMEM; - data->num_nodes = max_node_id; + data->num_nodes = num_nodes; provider = devm_kzalloc(dev, sizeof(*provider), GFP_KERNEL); if (!provider) From patchwork Thu Jun 16 07:33:16 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: 582500 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 B15DBC43334 for ; Thu, 16 Jun 2022 07:32:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359502AbiFPHcd (ORCPT ); Thu, 16 Jun 2022 03:32:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359468AbiFPHcW (ORCPT ); Thu, 16 Jun 2022 03:32:22 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2043.outbound.protection.outlook.com [40.107.104.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA1B35C772; Thu, 16 Jun 2022 00:32:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lw9g9+YQ/KEKvNn4iA+mNcl5XTP9RFauREzgCDdrEoXpY0LPb4BZvXs77580kzg/pdEoIX7drXWbThz1oBMizCPEta0Ta3IVnDT7ZAKcHu8crMQ141Zat9GfT0SJo2DpfRUcKn9Rvv7GbLY0m48A67VpWyC0lFhdkFYt0re9juAIe5MKxgZGnjVwhFM2f1gA2u5dQvKV5s9KyeXL4r7GQhbQINsdZEkMzSLNuEWuxmJwQqxEb84LriiRagMEzIcUgOcCSmKHmz08OYiNLmkEvE1Zx3GD1+rPo/JUcbxBOynKWD3v/LYedNkU2piTc4C18zdm7zsJht42h+Swes8/jw== 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=SsCBv03YMON/LGFRqdyaB7553gxFeYD3FG2+X/3brNs=; b=l52CUkmCtQGNpQMCc3lpTRfuNKfkUDHun3o5H+v6wf8mPRie/JyrXl2GQicxnqr+asW3uli+AMgoWMBJwEGZZTlYHV/UctX47HXEcD5XVyJvaK3ugVe22w8l9lK95wiJ+b+wPZtuAK9OWSBMcvkX80cwQ46mwpSEc8h5u2iBX+xLD3uA3FMj5zMWA7UlThYM8UOvKvwV042vzuzF1k/RIiyZMHEacTEVWs6YR1Z8noNC4LLQ7WmKryxlxCSfVzqrxZlpLkBPfP8PNkf1bQZecxqYBMQsR5zpJcSeA75HPF+m+HNhT+SFiLViLiucWXYpakH9p99FBRsA7iY0AmzGeg== 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=SsCBv03YMON/LGFRqdyaB7553gxFeYD3FG2+X/3brNs=; b=GIfsbAsHH5wW4FfNb52ETUbug0x75y/P9dMb2P5gtfwhNqQty5kv5XBKxn6FYMUq/3+RU1SZ6aLa9uVQPcKq0eTzE58CVvbVITZgumlBxCMZM2qqcYpyRL+UZ3qoRCHVTJ8cj0/S9C7xGyLbqPjsabD2okpq1GcYhvZat5g61J8= 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 AS8PR04MB8435.eurprd04.prod.outlook.com (2603:10a6:20b:346::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Thu, 16 Jun 2022 07:32:12 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5%7]) with mapi id 15.20.5353.014; Thu, 16 Jun 2022 07:32:12 +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, abelvesa@kernel.org, Peng Fan Subject: [PATCH V2 5/9] interconnect: imx: set src node Date: Thu, 16 Jun 2022 15:33:16 +0800 Message-Id: <20220616073320.2203000-6-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616073320.2203000-1-peng.fan@oss.nxp.com> References: <20220616073320.2203000-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0121.apcprd02.prod.outlook.com (2603:1096:4:188::21) 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: 7548e98d-6789-4f0d-0f07-08da4f6a53f4 X-MS-TrafficTypeDiagnostic: AS8PR04MB8435: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: D6OY1rSvy2YOj5Re49r4K0jyiKyImL2Pnk9pcjyc9er1Pfh+RQebptCKDENQgp/+qUveY4mTYBhmVgN/pWXA8otrHEF2mhVbfq7QRcH41cEqEHe5KMQJ3QedMc9pIx2WMzDUxie7gEkr0/s+NShPVGv1ZRJdXxMkQhJsPZ+IznRB8os5VVMgFJH903nBMLtcr4ggXisVz3oIbfXVpYa2F3ZzUBY/7EUS5MYYld/tg+XVpbZs2jsylX1LYuUF/14UcftnbnS0GkxGxMCnGtx7P6VhjDurM0SgHfxDV3JsyIqonOiB1i77DThj3018UII20/9zNWIFCi3uo6t5PEqJ52nfeid9lN6XMGtsWS5jlAb4mQayl5nmXqOOrQErXXZM7R6Xf/JMeGUv+T3/LGn1OLgxaGo1S41Jnt+8PEuoB0oyMRJ3jYy8LOt0cSLs6s8IHFWZWuGjUDGJk7NSFu3gUSryR3blFauTtpcp0YGBpVTuZtis+9BuwGzlIC0brM2yoldB34qt7Xc61F4FyAZYxhyB46s8pcMWd+ibJPfrorDTVv860PmkXOTl2Cl7pvWyie5Nv4bDUX9aeUd5xyh31WtBpcJjlOvsQyjIMMEBx6JY70cujPXvC+YPFVuFGMOgAcZigXh7ZvJy5WdAADXAg/Sigt3ttBXeMTJVI0aqI4eminNTylZqo4y526a6es9i2pAkSlJZelbiPgNSkIzXaEyXP1EzhkL7+MrpQSC0Upw= 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:(13230016)(4636009)(366004)(26005)(316002)(6512007)(52116002)(66946007)(66476007)(4326008)(66556008)(8676002)(2616005)(86362001)(6506007)(921005)(5660300002)(7416002)(4744005)(38350700002)(38100700002)(508600001)(2906002)(6486002)(1076003)(8936002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JoyGCYTtRkxKPv0KXFbyDwV/ovDD52NXgYHdKG++5g6E/xhKHJuvcpMqKBX8chYhiBxgiSE6IKoGJEmvpTPqshkMYnoEdSfSlt9PTtPYqkFDK4WoeLznSHKtA+UMdpKrSvse8xxTsEmOKyBec6Ee3lEQu4c4e8WRvWeOoxgxK08xJjYQpUtfaH1Prgf5kdn8zptfwU1xNgv/+IzpR4qT85ZyFyIRaLSQ38knVNotq8B5+N3KQdpt6irb8q74oEElU8BrFL6rWUSQRnHUuKVb1aXypYwEQX+Pg87o4BDL9JzFYgagojnPpFypXQJy+XW/1z5W+meH3sLqRwuw7enGoN15PLrs3ssI6nlgAfAAqXyDEGCLczCcFdsw1LPxDvsQXOLL+09e1iFyBS0Wjb9NFzgueFyfOu9Z1sO4TAKhk0ADYqyMPaASwKhGX+ajiOMAesjkc5LrJAMqJLn69rph390ZjKwoh5Jt0hjQU2jAnGaap4H5xN7QE960ZPnD7jgyzk06TDrqNZk6tBNd5+4kZaa2Oj5eY1MtfEkX7JyHnB1Yk2ibHGWJEXOglR9EqWP9BydQ/Z28CQd7QCh42PvZpU2m3lfwfC+Eqa7TuProCSf7gXeklycLoz/eXVoQtDLTjlHll/5VPvU4kZdn5Bnh3yPeZJ5+a585ZjbznApTVwV8QB0ovWaJlP2Yn5wNctb6OQsJAmWt+Wb0QX3WuTcb4BJYxcne9WtDUncR5LcaepN9zENBVBei0LSWzKZtCjMBNVjPixJedS0NN+sI9Epw8B/TOFfki/VcJv+s4uKeVbdy/l6fuQ5ruRqbhjx6G6srKSeznraRgTBPR6I3yyyiTIv2LX1m9xNmyvFG/cWjSMtBPkHqpdqxG9hweim/vKfOtEu8KjfalH+PUdvDPyEclWAUCP0n6Qjymoj7gPiXe/DmIbaQ6yPtMG+l3HW5CvlJ9xPor/kxnmSAFwJFJXKYil9dBewhnVIloN7Jn0sRVjzEfwUDZ86cLDW+hcc76Oglus4ETkfzjlpLRcJ8+fmU4iK91ODpufxnBj86QyAHw7RvBlTO9ougPpdCRVS8SDk+PLbzNQ1hS3o6iV7ZMpWWtRIWNrUYpHQyNsEzwe94WfzsKEELU4aPZE8T/utUm+uYGFeJ8qBFI/1nq7YBKWjbrT4ixuZEOYaOrLVzPWzgL+JT+HOkFnfTge3SFB+iU8jj6Gcawahtbo04VLTxsrGFr5ZMc7LHfiL9IgZV/HcIKy7wvZXVxT9vL58i8lT12umVrlEwL8BQzcOapEZx6VJvmchYGDvC3J14dJCTegIrWgQI/5iwALZDLpVjD+PoI6CKjTHII1tccSiPhDz4K2knEBeaugQ1lHdMrFcJPhsf+F+yiO3oiPjykljQ6bQoyjMlQlJLnjts2pMLat2vc2MaLwKavAITMRe6ClmrRmoTQVu3xIYlTnOzVdNLVlLdxGESveCfjAVS+Z0WrcYqjpjvSgAzdW2gSvEJNJIaLTjRLG0Qu8lZFxfiZV4FDE+w0CILMC2WFxZ9kaSJ8vd1pyEjfwygbHuf+jmtE5hLryGXBB+V95QGPBVQ7KkhtOl/A6A0q6TQq2hFTunW4Cwr20KOyBdiZjI5VGjinb+E56lDAoJjOvVDP2MBwlaAsMaA7u8sSnPxe5yNjrheE2reRHLq+DYBQRx3JobKDaCtV7O3E6yCw25DLxeNb8+UZuR865/BpWyPyLl0N90evmiqGEN/SA== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7548e98d-6789-4f0d-0f07-08da4f6a53f4 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 07:32:12.3727 (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: Q6pUsgQvYER0xctY7AlewFAOdeekUp0W96vUOdvLFlF+Y8nnab+9qRM+HfGx2WOk7ozQy+ygW1mfScCL0T138A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8435 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 4406ec45fa90..9b83f69945d8 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 Thu Jun 16 07:33:17 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: 583551 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 1B061C43334 for ; Thu, 16 Jun 2022 07:32:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359553AbiFPHcr (ORCPT ); Thu, 16 Jun 2022 03:32:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359498AbiFPHcc (ORCPT ); Thu, 16 Jun 2022 03:32:32 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2070.outbound.protection.outlook.com [40.107.20.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6EFE5C74C; Thu, 16 Jun 2022 00:32:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EUcaE0wgszq5gDktZRlZVVQDd9PkqfD7aTT19w4JsWcaWahJ39ZIK+5xt/ZxmTPifWmQ2iUxFBrbLW3g3CxRWfr5KMUcppdJZUmrRp4Hs1ytSw3z1oNdhij1C2ykNimnjAjMec+Iil1pdXxukNegusJEG6ba31mW+FVqWPlSR5kUp9lJZrfzmspKe89Ovmw4W3XbNXJhz4i43W7fqhkmNB1mAm+YsD9wdNzlcxAGGohSlpqISUxmJ1AYAfKg9hWBtqKJiGjOQqLALELGEvMjmwcQ0GtOsahiTTZqOeOhh50cLsDbhn8fwBClYRDDnKWY0eb7b+2+vI7OOMb1J9hK/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=VMO9YkRud2Dgs7CFcVcpItGnH1I8/OM8YjyRzC2bGJ8=; b=DvNmsuMuSQpAboP10a/QjcGgQhS7BhFxTNNAXPN9rDnePK3Ma8sOl2oDArrVL+fXyx1s4QWtAzOh1X++6+SEuiwxG8rYHoaFiuBJlbiPuTarC2qK0em28pgcLBLLsLIUnkDbhmSzdkQIHEbN/CkNRc1eyBbc06uwoDQH9m3WuQ7vgcBJisMiySYclV9AFPWbFcAl3heVQlENtM7d2gEUAowBM/07+ufW6tE0FfPMS03UFC5rj9oXpZXHVP6eSkOPvXIjXC6eSHxHuJ6zzJloOhgAQyzk74JY270gCvb1tXkZipV6lao6Z8H9adwLdXdXAFvt7RmW7tFVpLBUdMJfnQ== 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=VMO9YkRud2Dgs7CFcVcpItGnH1I8/OM8YjyRzC2bGJ8=; b=CofOh9YOUUVeVepDqXZ2ZCk3bC8iD+psBCz9OF3GQp8uGGU+3dT33Ua+QLLSos4vU32tR6272gB3Pe+Dnwez38TtCkwho54kg3JOKMH5gqtz/uK54xi9zOsvjCG3sPLjnyFEhRzUoRAshzrNET4qEbVr6VxKlNYbUzazzCFHf8c= 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 AM0PR04MB4850.eurprd04.prod.outlook.com (2603:10a6:208:c7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14; Thu, 16 Jun 2022 07:32:18 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5%7]) with mapi id 15.20.5353.014; Thu, 16 Jun 2022 07:32:18 +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, abelvesa@kernel.org, Peng Fan Subject: [PATCH V2 6/9] interconnect: imx: introduce imx_icc_provider Date: Thu, 16 Jun 2022 15:33:17 +0800 Message-Id: <20220616073320.2203000-7-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616073320.2203000-1-peng.fan@oss.nxp.com> References: <20220616073320.2203000-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0121.apcprd02.prod.outlook.com (2603:1096:4:188::21) 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: d0f9a624-3a01-470f-a84e-08da4f6a57ab X-MS-TrafficTypeDiagnostic: AM0PR04MB4850: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: tfwNLmghbBoBRfzZKVDloPCBKjyqCHfCHoZ6Q4AWhwpVtVr8AQIagDCpVDRUr7c66nY4zZIdJjtRFtRpq0RijPK1k8pEVITtj2eOYEBUznVwUkJc5TC6mcESwrSK+YK6OHuWkHWefiDzG14xw7dOgjOiXTb1r14SVk40cdlqT6xJJf/bd1dFsN0eWih2452NZpY+CYHMTzMpTe6yasbNIEJ0qyGYkK7p57OGBlpOMLBdVR1CrWj3vbP3o+uoi7PshzMdy5pqnhoo1z0NXqN+UKFDQy7+2NKrmhy027PWBy4NjPYLMMDirIEmtYYCHk9aab43DQOPCHCMHwrZlmslbY2lOqEhV0wcSBw9RzkF82IO4ALBh2zWKL2pK5BkuPqD3HXiKLlrG8jI7pb+W5QkFd4D/OaHTVluCnEOUO6+tQvuKDZjI1jGcTN3oV7flyePLSqG3o4yj/30b9ANoWJWiCsZ27fdi8pCOzyeAen8Z8BXbYDneEJGHzjcrSZHiSvGDavOOzsarHppQw0Ct2zeC2P95rfaPeijJ0za7KoKmQ5/hMWpqNAKdZwritFG5G3J2cdu+2VewhrWOrxXtLnsQBPdcw+RR8H8jI1Ax4ZMRWhbZnCt2bQq4LlS6UUaUh162czBFIbx/jGhopoyCC7JxfN9KW3qsbyTeMDI3TIcgF4hjcrSxlKN0Isvflz09S5tndph0/VFQA4WYFEmCj5Nctx89HYcUXitSs92uBeAmRk= 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:(13230016)(4636009)(366004)(66476007)(26005)(52116002)(6506007)(4326008)(66946007)(6512007)(2906002)(66556008)(2616005)(86362001)(8936002)(38350700002)(316002)(38100700002)(8676002)(508600001)(7416002)(6486002)(1076003)(186003)(83380400001)(921005)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VkY9mtj9rsiFA4BBh0wQ2QkcrVc14zvtqBXA8ZQV5z8JeiGRK+zYpa1YIVGs1lUok++3lWQM61514KwFUdxqeqTpFWckDLRCiNcjqV7/G0EhbCUPtk8+18UylgksLSHG6k7CVzFFwemZGs50EHFMqNsjq3TWR8kUdm0mxOp5VddrpSxD9j5XJbmRFN1jyRcqMW9EikQW/xe1gUcgn0LxopsE5sq3fIplhK6z2zWqQbhTx1iOUnKUun27GTg/mCKsXYx8X19g+/48L/JQmCJwre0y2x7q0+kfpPPjQAkLMW2n2KbMk+CGl8vMq+JGPNgojovF+ZHiHsNECoHV+uL8kekgtEl+zo7ykYbnyoTcJjTFDg4NMrylDH70XzSbnquhkjtzGQNTGKcdauDTzDUk1nfBsR93lc5U/AnUS7isZ7+vNoKXjblj4yrE0UOdfBui5hNfqONKu6tM/6w292H9byY1WRjiKBzHN/BHg3Xbr5KWr/nByGBx2hobnULi0y9Ncoiu0TA7ihlvmSOTcF4AyZu7HYjmiTZPM/9CglAcZLy9SNMu/hn/UtHnbnsyq5AiyYBCr6wIostheN8RwGZDF3k403S0kwCJZpQP1Xlw2WvoaN9qIMI1cwSDstPlkv0VRFFNWVF51ch/BNNlT/27I4ofZOE9aldyJ+LRPyozdXjHkI+vexOpIymoQojpXnBTTA0GBx3iJwxcUNVUM6fbFA1j+i4pxa161CreMODgWBwq3Ib/QNC50Lrj6oqAkACCGNk2Og/KDGihVWKDP/HuDA1F/lSwGc9mPenqzn0sNxacRgxvNhgxc++holmHsZpMJWxoXzDLi16sxnXWGHRj9oMU9PLa1AghD1ExlXgajBaScFniWbWoDfZMAiuOErm5XCXtYcFu0VhK6ge0HudSOfFFcf9ef3bUzsrq81EP4vkemiW8QXHEmpXoSX0LmjV82xY1GsbvmtBE3NwG6tnMSMo0R4st4by2F0eJFovf8640xCKOrwHmTOUIxXIM1MBsNs2G4h+cp+EF8ZaDKxO7Y0mFkSDPOQexO6RI26BvfDl1bDcbHMJ3KWLLiv0DFN+6tvRygm9RbJ1y+qFKDHHx6UCtigcBqiHCXsYxon1lOiFNz5kJGRh3UV5Om16UkaOLz7zT2p4U5zsln9JDOsUklZ3/Tqut5eFKbBVpG5z0F4rUVV5BVbCyYtDYPsljSdk6Ysc70OG043kMg2ciR+zGOCrFQgvZkfDOhiPv+O5suqqY+RIWeciPCgz5q9b5C+9OF5Yubs6gMSl7E192xj8PSs3l6itisXii5dhZg++myBhQb4nqXv21aEyKU1mrHQeCE6q2kvl6koFekscTJPqb8Lx4mdYrhKWyvAo9Uh7l1u8YypZvS4ejhKDTeIGRspiNMh7Q1Ww62cKe2EH+waz8F1Md4beLSj2GBy09jpNWnKFMjLf0BIcaDpS3YwM0HkhC103pgdmA+LYYerD2yZamUyzl/1N6ZLsMpIcBzvjce1vU5VcuPZOYydLhnoI/Cj5RigP2A4XjPpulpDAyCWG/DoFuEDD/MaB4YJW8bliGg+Qj5jJh/c2CIcppHAv8KzUuQdsF5wdl9WaDdHzos/H6uMPIK7QHwYcunF/fqKWy0Yr6G9BhmJtAYGmJ2cJi4xJb/KPtnYCjOR1ix7nuneoGRcG+4UM6XQFSXsr3K9W7M+3qa5iQRWhuLYaHTuFHAM7jxzs9AIzfiLfCTB7Fy7ejRg== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0f9a624-3a01-470f-a84e-08da4f6a57ab X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 07:32:18.5309 (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: jkrjmMNh9TGcEGksObvYTSI0UBj3u2dEK9M+DFxxJ79/lJaNXCupm1HP633iStP9qxD1+f13e3y1fozgrqY6vQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4850 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 9b83f69945d8..1f16eedea21c 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 num_nodes; int ret; @@ -251,16 +254,17 @@ int imx_icc_register(struct platform_device *pdev, return -ENOMEM; data->num_nodes = num_nodes; - 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 Thu Jun 16 07:33:18 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: 582499 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 02430C433EF for ; Thu, 16 Jun 2022 07:32:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359557AbiFPHct (ORCPT ); Thu, 16 Jun 2022 03:32:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359519AbiFPHce (ORCPT ); Thu, 16 Jun 2022 03:32:34 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2067.outbound.protection.outlook.com [40.107.104.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1D7A5D185; Thu, 16 Jun 2022 00:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e0cuCTma/9ClFPXv/IwOl2ei6ng/tpLBlzOEGpL136d2elMjMCViF45ITSZP8vCj5GCaAbTc3dc27le/dTkTmZRObRArSjbSgwTgDgeGvDtAFQ1ssocklyDJKSiQykWjUgtDD9sa9xoTd58KUk+/wd1Pw6qnnCgOtNFghFxdSA4W2t7ZqKOAvTj1maUkGLSU0XIrwCBR/0vI1vcN/Z1by4Y/xEFXTPzJaHgf2JiQWJqdVWh+DLOrVmLlpzKmRyQ06socIHmusdo/xVcbcp0FmTlZ3rUFsW4aljNEaiO3zHIpNeUqKyIbPy3uAxDcvre4QpqWnYwa5XTf2ilFNHkWJQ== 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=6gBh5hNdCaK3zsbVMpem/fXhBZmMLr6ujYSrRdFmXck=; b=MrxGvUqIhhJzXOaO5a0495r7jUpHCU8SfQBklpxdq/wynUAv3T2yXPzJNNMaYo79HgD7FXubIvxIlft/AokoY5VLchHHLr9KVvPCuapau4QUo2iev1zy8dYZyPPKlHEwcIE7K3fhA1Fx6dYIIexpAykh7MRpvs+YGDcaXMEDmxwEWZW9iXQI2wTqVrD4NzTEX2Xj7M8KI10X9HNIC7WcPQPNit0NpPWSr5VJcsA2qNy3k7PBLuDvo3788HjZC/kE/0151Th0z5T36+jSgztZeyPZ/rEhik0hs+UjaWCqkmOK15g3ZrdYeCPYGMmayHuNuiOi2CUZqSOtGJVmccC0qg== 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=6gBh5hNdCaK3zsbVMpem/fXhBZmMLr6ujYSrRdFmXck=; b=TSuzA3HyLgXYAYYpNoNW5QQ/eT+M73gGXssfWSghdPkWzuOfjl7pPcQtk1/c2zpkZ53hu1LizHhysnGDI+aFYsI2/yzipDcMVrx7IPPViXm8NbDZratbIOjDm3TCruk519lyBd4Lixhd86QGSAha9x9oBuUUdE1bKudlwqvrj5Y= 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 AS8PR04MB8435.eurprd04.prod.outlook.com (2603:10a6:20b:346::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Thu, 16 Jun 2022 07:32: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%7]) with mapi id 15.20.5353.014; Thu, 16 Jun 2022 07:32: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, abelvesa@kernel.org, Peng Fan Subject: [PATCH V2 7/9] interconnect: imx: set of_node for interconnect provider Date: Thu, 16 Jun 2022 15:33:18 +0800 Message-Id: <20220616073320.2203000-8-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616073320.2203000-1-peng.fan@oss.nxp.com> References: <20220616073320.2203000-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0121.apcprd02.prod.outlook.com (2603:1096:4:188::21) 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: 90f3c8cd-6940-47a1-d1e0-08da4f6a5b84 X-MS-TrafficTypeDiagnostic: AS8PR04MB8435: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: 0oAwzbDoNsEknJVAbyamaTeF/aN336XHP2c6Jjk54b7rzuXcVepINtpnAsBjIPAq8LT+UQ9LG2uF3hEFfTs21ss6mNlwTskD/ZvgpgjYx9czm4MFLkxIFVl1pO4WFH3xgyhyY6VizrGMmo0a4HyCq9b3UBBS7JBW0ded14Y1LpN4b0kG2I0PJX4h2UjlzHZGzbrYDXacPLSg9a2Tg7h1hqz7ZUdYlnssNn3N4lhomFR87A05ecdU+M19QhhXpmnhzhBD0XKxs9s8hR1OCYxTnMXhkUbgNYfluyuhVNzR/t6mwwbZSgpKbs7SoDXcx+dTNsCS6Xir2/Nc5rF+QUzfXAf85kDtLvK8VohwYtATKGnrXCK8Sj2oFDIOTi9nbG43asKPZI9Q9ENFysCtSnqVNvhPyoPn6g3k9sI2flVO1FCOyagC15pYMqrsgGD2ndFo49JJOAviskno+5uJIAlMGKYGwFeWHmpcJynAIDQ0tfYKF7ti+q2xC4dBbWq8+3BXJ60v18diH3FDTxhSvbBNDX7baCfd5an27/WJ6+aw8kN4knRgPs7JjE74AkDRA8QmWPeJdqIRnSryJIrGhR5NLhwvU0P2thsqsQfPatXPrXnArWL/sgpj69Fgk1iJV1uAsWkkRwUIEKFugcyQ68PR1tp8/o+93GMmYLE1gxQrSnAWKjeHvdEraZQwtexDt/3Vmz0RFNWCq0f8N2Bx62Jgl9ZYAowIjhk0hFqoZAqVHJQ= 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:(13230016)(4636009)(366004)(26005)(316002)(6666004)(6512007)(52116002)(66946007)(66476007)(4326008)(66556008)(8676002)(2616005)(86362001)(6506007)(921005)(5660300002)(7416002)(4744005)(38350700002)(38100700002)(508600001)(2906002)(6486002)(1076003)(8936002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: M0lM28ErNOAZ9HVNVa0bv+WHQ/WQijc4Xvb2lFk/I5pMtOyqBz/mtRrlEBFFLEemzSeqw8+OCFsm6RmEVwOx7HLpOIxlFcuc7p/izeM970wacDbJtoudEH2b+cRvuvusbmtCT5uw6mbNXIOGMK0PMH9pa3mXGycb4Iy1hYXiHXlR1l6B8KJZDJc6vbbyZP8G5VMjDo/BGytOQXIa4bbG5y5VMEqP0llvkTHlh4p7++QhKjUehvBDNYuDQKaJGdf1/ciCyN+1VQUsLj82PfkME/u5/GZNxkHOQ2LJY3/9D3fABad+sIl0rEv5G9ox0Rc38ShX6+O27p7bUJxmWJaodyBUfI8Fg0OJ9rLpL/C2vCyLAguZkbolnKib7b5XXbgles/VSMARBUYhLgLZDPq0LOJuQKg4YcRA2zM/j7Apm5SeWhDERYxRASlqNAkld5iHfglEpJYqpjQihDWsVsCr2Moxp5IYcILKNPSkq+uH5ghPQXBpKI8PbTcC3EEBz+6B0O/uoVFQo/kmSdVSn5vqpU4oteaj0Ryb0/DYiuvPR4uROUZXZZn2mJtw7NiupPvMvMmRRBIKBhAkOkKWoA5JHRRYg5itK22EbxQsWtIpkBmMSRg8/tP7Q0e3rf+51Wr9YkBcz9NXqyh0vk/HZvnciitPvdYjE2eDRCOAp3UEaKVLmw9BPCYQz4WEzemGvOMlLiWrv55HRBRkq2VVHjyLEzn9OAoQ58IaaAR7l99qGZH1Scg3FTB9Ei8ono3cxiac6cU1WLe0MLj7GPJjKmkkYzrfnKrvGOkoAZ8AzCQJpSFB9ubhKYog92OGFmUmTpqFIWtRtg/tK76TPfmKgqnE2pdTC8KUgoeTvuRe25vcqKZnX6OOMYviglERjWAK/fnStS8q0AIaEY5u4Sg+thmoFtLmbE7hW7g3KlKrVkYA2/I0gVD3jTLDE0pMXhYvV/qbBelnApJrPwj7PDLl62EbAbTDRBCQMWMezg1B45ogx1a81tEkheSHt/dHz9MlHxOGxGyT97Fvz1VPCDDCjFJpJp5OA1N4YoB8Cq2NB1lO0j3Sx0jeDTUi9bN91mpqP0uSM1l/QdCIc3NwQk3F/JDc1GCaNdB0XXfDm9mWcjI3217T+w8w6xDqef/S48Y0iIIE9ORy58RAtXC6zNCVb/oUPAe0Ho+pfGu2udTrKAjjMEXJrGQ4JkoIE6w+HqSxArXtgtz4+UU3whsTYn5ry9urEvOHuiRcbHjDyIpLsrdQ8r+h1WX2OshO/40hioOn9SrD/++5nGGZmtOAw9CTtiELRRhG+rqcZFa6nd2UlTuYWhfR+VCn390rEWfGxeXssxrEX//BaDOfUCGPHP0CLPhewuxWxaP5MsCJ+TEpf/BDuSeeshGMWj1R7ZfiG6YHACmndky6EerIKewnYhafBVc1JXx7gnY4crpwkxTjl1mk3HNpLrSg6A0SIJTIRmeL68DzBjWuTyzC9WvPJ6MZJIrWcmQPP7HHEa1WKOZQjV2zlC9x8nRYFYJdNTr7HkaDDbOhrYu1w/lAHXqiBNGPhvNSJ8YY4E4KaxN4zqiCX834uQY5pw7M8xh6eLwzGgTOBPO329cP4Mz+S0QG1oQnNcMZanxwJ8IqXAbxMQDAqUmQzhGP/zCzbLZ1Mo3Vf4aSzVWRQUBMQsHMdYoSkTTfpzd7ypiR41OuKrsqFreqyyPI0ffQCwovsKyjMp+q/9551fFtJ/U7pAcglPMATOmL5W5AdA== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 90f3c8cd-6940-47a1-d1e0-08da4f6a5b84 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 07:32:25.0967 (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: clarECdKULdmlRfmdYn5uctdiUfWqumk72paDwfCHIk1LIAdKy+DLi9R0fLsvf8WE1kLBLkzJD0FkCoAPzYQZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8435 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan The provider device is created using platform_device_register_data in imx-bus driver, which not has of_node. With of_node set, it will be easy to support QoS settings. Signed-off-by: Peng Fan --- drivers/interconnect/imx/imx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c index 1f16eedea21c..78557fe6da2c 100644 --- a/drivers/interconnect/imx/imx.c +++ b/drivers/interconnect/imx/imx.c @@ -264,6 +264,7 @@ int imx_icc_register(struct platform_device *pdev, provider->xlate = of_icc_xlate_onecell; provider->data = data; provider->dev = dev->parent; + provider->dev->of_node = dev->parent->of_node; platform_set_drvdata(pdev, imx_provider); ret = icc_provider_add(provider); From patchwork Thu Jun 16 07:33:19 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: 583550 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 81537CCA47D for ; Thu, 16 Jun 2022 07:32:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359483AbiFPHcy (ORCPT ); Thu, 16 Jun 2022 03:32:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359525AbiFPHcl (ORCPT ); Thu, 16 Jun 2022 03:32:41 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2072.outbound.protection.outlook.com [40.107.104.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 474001118; Thu, 16 Jun 2022 00:32:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TYS2Ah5aFEakQFOpAjJzM6P2K9RvP6AaNOgTeLDIM1PMJj88jFfr+cnxiKmYkomJ6wAQkkvIw4tz6jDS0RvkXX8KR2ppLCcvd3XoC8Jt6VS9SBojNXfvlw0JjJLtDkbWXqdETelTBq+W2CsatFjLt+89sZpu8IvrTCEqElgmwtKFdoj3YxS7e8WQIN5qn6tIXoGVvkX+wvrdiSiuzXQ6o4RB9bQa5rRRZ+2k/ZBsgSnayxvZsuV34uChIJ+nbMvAGS9JwCSPgDjCFTXkcoNFsq0lMPiQEGUNF/MN3B/EiFheuhlNggNS0kBkdu5zU/pXwjiv7wwOlFtVEvxogTMxlA== 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=kyuhG0Ti1frXKqnfihyxiVrF8r9wwXPcljbsvOjHiVU=; b=P7+vdiM0WfWmbSiiIVCgZ68nb9eZFFHyvEky6q1/bk5vckA5fPSCVguBmHufe55bREFr2yPcj+lkfiIeehmsaDB5XmLfT83fPFdr/p1fqgzpe4n1pv0sd0DBnvYcaidf7RNpiCI1wn51y3+kakt3xWlUlIEHU9F4GodroVgdwnOpuXDNsckFJogCoty3VKOBfDBDcnVCm5L5fuBd5v2wiqq6YerER4m+3/he1cbN/eMAMlok//t1OogLtE9+W/NqYJWBNUd863slTEr5fqIUJYp2Pyr1f7eCppQw4FUiiQKR6FX3tm4aY07UDQN66QtFM9K17fHgc0jeYaD5wwwMsA== 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=kyuhG0Ti1frXKqnfihyxiVrF8r9wwXPcljbsvOjHiVU=; b=hXIiy22T6seYVSPUgsz/75RyCb/ngvbavXFWirKqjR18LkXZYGSGSFh6O/tE5W4GO+mSvUeKqdxZASrZI7BfbZxqinOr7u1OJYFm3woO3DxUGeSnB16c4NVLXXdM28uHVLI69tfYiVaGFS8vl80bxiOv+Z+xG6lXdkLNkOWPgiE= 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 AS8PR04MB8435.eurprd04.prod.outlook.com (2603:10a6:20b:346::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Thu, 16 Jun 2022 07:32:31 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5%7]) with mapi id 15.20.5353.014; Thu, 16 Jun 2022 07:32:31 +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, abelvesa@kernel.org, Peng Fan Subject: [PATCH V2 8/9] interconnect: imx: configure NoC mode/prioriry/ext_control Date: Thu, 16 Jun 2022 15:33:19 +0800 Message-Id: <20220616073320.2203000-9-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616073320.2203000-1-peng.fan@oss.nxp.com> References: <20220616073320.2203000-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0121.apcprd02.prod.outlook.com (2603:1096:4:188::21) 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: f38ca2e2-a27a-44f1-b694-08da4f6a5f43 X-MS-TrafficTypeDiagnostic: AS8PR04MB8435: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: icqjnL+I6Y4MFJ2LWZYyyjmjZPx4lLtideOdBs1dk2G6wo60kn4+Q7LGAhbQyqb4vdPXs8KPXpoKmRrhR3wnoivl+klJtBDzdtvAeSbgWmLgqEq7JYdnKQx05CmkO4ay+Mk0s8gy++KinwHNLT0gMLaqNWMpmeQeBKe5xwHrJ6kHcQS0YZE5XY2exs9/ZhdT8mNp4wMevbqCZ8bIxtYLnAIC9F3fvMUnGJYCEv2xk5gDF7Bby4WN78sAKayR0dwa4V1hu9b2wz5BN0klMia4T5svWV8S6k1FAkEoT2cE6707TDAFnCxLU7ELAqbbyDcqEUtjNn3HrlQeUuPq+qqoknjUOXrcbBsNNbvGuCeNp1Cc73Xk6z0XnPSecq3dKp7YmiFADJSnXaOYuuUb6/LFQoY5QQukFM+LlMOzJuOQDYMkOy8awInbPvJSdqRoviM/q1zYUlsAAbYossWsBSTx1A/PrKV8jEeKHvKS5vRyU8+MeF1+sftgdM22rxH8can1rYghYvSPCqLdXV5f/8sla9HkQG0U2rVXBw5cXQHpMfX+cyh/MGFY7ijFkkqKW+CWWKlrAqtU6hH2TiUtKw+ecSiLJgfffidTOR7FI64KmG3sJ3sNQ6I1JDJtNWigPz8ou3U4w1Qx4r6m3+8owJX+icrog5VkyF6cZNrSbg6JJivZhTFhr6UHFiBaJopkAWYO4CH5Ubyc7k+5hVgHFt86Xf8cP1w2Cdpx/S7Ff0h/K2g= 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:(13230016)(4636009)(366004)(26005)(316002)(6666004)(6512007)(52116002)(66946007)(66476007)(4326008)(66556008)(8676002)(2616005)(86362001)(83380400001)(6506007)(921005)(5660300002)(7416002)(38350700002)(38100700002)(508600001)(2906002)(6486002)(1076003)(8936002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PMH+hlqbHrK2/ML65zvwm7wYZHz9OgrLe2kk0jraLhEI+ncsbYDci9hBDswGfnh+rXWXtkAlAKSszNY+frwYwDO2xU3V79oxCD4iEZ9hB8BLKAM8lm+y65nNLjfZjDXXtwWqxlvjsJyqdkPj/QwwtTkyw+SGv2iOlQIIkaKOOdtdxNF+sN+oaSVBvB4R+2IPSxgTaEzxwB7R3elv42Yn4+OiOtElVABcAD/Rbd7bcWBLEajxOUqN3mfIZABBdP804NEhIRxEuS61XkQwVM+YAl+lph5mzRSW+FUzFXofvFxdYB0bNCudpyL1k0OPRyF5g1ZLwT72T7cHwKRZIsEg2PML+5/fXEQZm+jrbc7SLaBNOa0qFgp4OEAXwlcmZ42q2yNYAA+9wakvCSjjT9UXdgMyW4uRH+n6lKYpdE8pBMIELZgg3LUnWpoJ5acV+Jo+Y/GE6eLsKBfMnxSxjwRBRmqGVO2M2exPJWxXdDHO7tQtZkOzMCOL1ns39Dp6nmaUd2al8HMAjps2xDSHpMzJ4+tzULx5NAeVoC1yq38SBC3B3IcMIxCbZMtAnM6DieLYPbyiErlampbLdpVFdsr4pvjImVfMANhulA2J/VN9b8bDvpqvsdQP+Qc6Mzn2v3rpOzuuvPX+ohhbiqEadjLfhebsLFuwjtTZsHCrRpuBFy0DiBBcErmeC32uQRpeavFXzkCi/jLsLdmkFpWW/MaaqGV3u2fvXchxHdLvew5beuuznlHrcVPXj6VwBOBQIjXnr8xo+6NBuicvL5baAH8nSOEHf/7svrRBSQCKzMmneH2OWBmeZqv4vrixV2zqk7IIM/z+nHIm8J100qUk6dsjmCuRF1olFl9Ga24hNDCHe7BhvfzBZD1oZ1wPVc+Oh1mUpbBmpqPIe7CRRhZvl+wyDX1CX6/odh9xi8dQ21jLa5NdugS5bt8XqPDlgyXa1nb66mw5fwZnXjZ7P/q6i1fZ4raoQf4ZOjSaqrhHepIDBwLKcxtYBUTzRSumC5AtqVa9dMzuP++VPO93Ign1y6sLowFE+nNNLGymMRjEs7xZbYSY0Z0Pu15qicMhhv0iUxO2UsW+dm2J5y5pwlrUC+5jR3PhfuY3qr2Y8bkWjoVgXndC7m9PlEuBaO4o60sC8JqjwWq6aFJ0K5r3Wy1OoM5t5EWhXzVzikVMNAorlY3/wGWL8NqdhjL2UCqCxEPqiS0ca9lZjsFNVtZHWEPAZ0qjtOKAcd3YBi2Gn70S3vfpkHHyYBCb8iF2vWljwkCRTCbkUgqad6GQCWKV11P/z8vcSSEOm/Dgl9twiXh0R31F2VvVliEcUzWkl+cXTbyWY/f7Wyn8lwOOiW9f8H+Am12Do5YFLxyyQEdE+ZBIQPDCk4TJMENhkxGU1C/c77wpR0qq+znDdEtkuIE+a9ota/ROLYE+GBUVtTPKAQZSm0zoz0pwqKdaHH50Kss1m7B8z0JiwWhVk8t5hLW13HLeGW3rDH29OXv1pf4zuRHaGo/8C4AUKQHqx3IwMjIcE3f4nBYggFIbd2gZ9gFONukOL8LwitnzYS77CKYLOWrLnVhDK7VGUYz6o91h+060nhxsO6gbbUpRTV0Fo8lU9sfqVRMVfm442EAbO/TKh30yWo4uPhX7LsfD8AIxdR9H/DMI/Ucz2MZOsNJLh4QcFIwwprvzLSKZ1E2UqZ2eIkex5i4/vm/AKol9T6gms4zN+aZimSlDLim/XyeotwHyidUaElwnPA== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f38ca2e2-a27a-44f1-b694-08da4f6a5f43 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 07:32:31.3779 (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: ZGfT4U6SARCAdUopt6497Ep1S8RRljnJO7xCUKNqon1xzIDQML/K5URzN3Lq4YAB978n6l7Qlor8xRyI5ZFszQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8435 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 | 43 ++++++++++++++++++++++++++---- drivers/interconnect/imx/imx.h | 44 ++++++++++++++++++++++++++++++- drivers/interconnect/imx/imx8mm.c | 2 +- drivers/interconnect/imx/imx8mn.c | 2 +- drivers/interconnect/imx/imx8mq.c | 2 +- 5 files changed, 84 insertions(+), 9 deletions(-) diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c index 78557fe6da2c..bd728caf2b85 100644 --- a/drivers/interconnect/imx/imx.c +++ b/drivers/interconnect/imx/imx.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -21,8 +22,10 @@ /* 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 +40,24 @@ 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; + u32 prio; u64 freq; + if (node_data->setting && !node_data->setting->ignore && node->peak_bw) { + base = node_data->setting->reg + node_data->imx_provider->noc_base; + if (node_data->setting->mode == IMX_NOC_MODE_FIXED) { + prio = node_data->setting->prio_level; + prio = PRIORITY_COMP_MARK | (prio << 8) | prio; + writel(prio, base + IMX_NOC_PRIO_REG); + writel(node_data->setting->mode, base + IMX_NOC_MODE_REG); + writel(node_data->setting->ext_control, base + IMX_NOC_EXT_CTL_REG); + } else { + dev_info(dev, "mode: %d not supported\n", node_data->setting->mode); + return -ENOTSUPP; + } + } + if (!node_data->qos_dev) return 0; @@ -135,7 +154,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 +184,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 +209,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 +222,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 +263,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 +294,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..1da87cfe27da 100644 --- a/drivers/interconnect/imx/imx.h +++ b/drivers/interconnect/imx/imx.h @@ -15,6 +15,31 @@ #define IMX_ICC_MAX_LINKS 4 +/* + * High throughput priority level in Regulator mode + * Read Priority in Fixed/Limiter mode + */ +#define PRIORITY0_SHIFT 0 +/* + * Low throughput priority level in Regulator mode + * Write Priority in Fixed/Limiter mode + */ +#define PRIORITY1_SHIFT 8 +#define PRIORITY_MASK 0x7 + +#define PRIORITY_COMP_MARK BIT(31) /* Must set */ + +#define IMX_NOC_MODE_FIXED 0 +#define IMX_NOC_MODE_LIMITER 1 +#define IMX_NOC_MODE_BYPASS 2 +#define IMX_NOC_MODE_REGULATOR 3 + +#define IMX_NOC_PRIO_REG 0x8 +#define IMX_NOC_MODE_REG 0xC +#define IMX_NOC_BANDWIDTH_REG 0x10 +#define IMX_NOC_SATURATION 0x14 +#define IMX_NOC_EXT_CTL_REG 0x18 + struct imx_icc_provider { void __iomem *noc_base; struct icc_provider provider; @@ -44,6 +69,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 +102,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) From patchwork Thu Jun 16 07:33:20 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: 582498 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 2FBE7C433EF for ; Thu, 16 Jun 2022 07:33:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359536AbiFPHdG (ORCPT ); Thu, 16 Jun 2022 03:33:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230049AbiFPHcn (ORCPT ); Thu, 16 Jun 2022 03:32:43 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2072.outbound.protection.outlook.com [40.107.104.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 664ED2196; Thu, 16 Jun 2022 00:32:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RUxXNCz9FMJrxIPu9O7hgE0Ug7PLjKE4hj7pFvxbUDyg1kh6JU29AGAg8LWiX68DJkinaiTbQVihe84opBsYKVHzxJKIYaL55WGUIcwEHDvzGxank5n+hJdaeBgcLLT7cR312B2W3npRZezKQ7Pn/WCvCEAPG1oAvZ46/TsNUzAeR+0F//BfWUSP6gnncdL2F6AutZjduw6Xw09LtEenjWiWr5ERlxTQ3B5vPtS871ZjPifBtGOgTe2k7jRwMZqJPllNNdG/USktZCWQcU6QdwuF1xTg5w4BBb9cuBneC4zuyGx1bwAuXx+kS5WXsspml8Lt70d/9vLz0Ih1YjlPNQ== 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=zcjUJHrInmewz1//bW92dJq1Y7i4Z0g5MVVPA8FCLy4=; b=MF/VphZNTep0CR6Dcl9FzlTLBLyn3fGqpoJC2TV3uRRlf2hs1RQBpNZzTjj7j6hwhRNTJxbiJydM0Ci2gvUCGLV0PAfcjcrmV0iEFijd6r1xe8PsZICiXW6G2t1M8IwUO1K6UvZ8FPIdQoxFltRxddyj95+5UHtFT27mqM6ngnolpkOCJn6J4gInEPU+uRRZIiredAI0lfR/CauGCe4+dS2SPQOzHpGu4W42RGHnh2ic5GNhV2wXrjP+9YahR2ESJdHpzPml4E6AX97Ig17jaTMmpkTURPcEYzLZU4TvcxaVJ66KGmQu0/TFsXc0QD28A9WK6qRSwBoIiX8U4JwkkQ== 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=zcjUJHrInmewz1//bW92dJq1Y7i4Z0g5MVVPA8FCLy4=; b=AW4J3M644bIz2gSBx8NcepuPJZp6lG+HXLkyRU2cJwcIWgwR2Ta0fs1mUnhud+CaRUUWizNSpNo/qWe+oCOK+vlBCINDQEz9cAjw0oeMZfSPkqv6IfLgq0fMFH+7BY32ljagVfy54Fqa5rvTc2/l+KT2iFo43t0jNAupwiGzvnc= 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 AS8PR04MB8435.eurprd04.prod.outlook.com (2603:10a6:20b:346::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Thu, 16 Jun 2022 07:32:37 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::a892:e4a9:4769:13a5%7]) with mapi id 15.20.5353.014; Thu, 16 Jun 2022 07:32:37 +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, abelvesa@kernel.org, Peng Fan Subject: [PATCH V2 9/9] interconnect: imx: Add platform driver for imx8mp Date: Thu, 16 Jun 2022 15:33:20 +0800 Message-Id: <20220616073320.2203000-10-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616073320.2203000-1-peng.fan@oss.nxp.com> References: <20220616073320.2203000-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR02CA0121.apcprd02.prod.outlook.com (2603:1096:4:188::21) 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: 6aa3f1c5-8f84-4317-d483-08da4f6a6304 X-MS-TrafficTypeDiagnostic: AS8PR04MB8435: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: +Mm1YZJLrFfstvLjoCu193hZUYI94mMlyiKhWHIxItKwyP/plFSDV1H2aCcrPhE2EdvsHSrkfgoEGzrrqmRJBytT0X8vSNvGFbM5bA/AdFiBGfYuTEJxh0eQvweaF12xO9fzjzJI9Ml7IN27I6cgofA6AOoJF/o+TU5ZtYLynzSVv41MgVXC1VfoVCg55eRUvlX2dHQl5CX0ymiJqC786JQA0l98BksS5tG/WB4Tbx+CD/WVlLnxW6SxJBYwPPPYlPFgGTyTCI9H7jQAc197tTzAsnV5plVb52/+S/U1ksUVjWFqWUrEiwF/ZYa8SZ+MI3uc5hHPiz24lIfYElbUDrO+wxNXeAcvszB0IfDt6BDic2oJMAOhmJ8paHwb00qOziK+G67rK9abjRGzqF8r6IvBO2hgLOzG+QZbpKJwvoUQ67HBJSBVFUPCscLlFdm4ys1rxrARGQc7cpy/DLTMZaGCtYdXbQo9ILyCELaLcYv/pccqaywDJPTHopW9StPBB10ADzcLab8N3hRrzSVj9DxzMHs3mdi7+6vChmQJO4iXp/NtF3JJqwHmthPsn4vAGVW8kOgv/7wupp2ZXCfi5Z7M4haun4biGrMjTRh9dF3C7OoK5Cel/cVmm/Ao/tODxmQKabvabyhUpzaJ//hjP8Vl8mPruocAJStG8qz70PkIT61LCQi8SdWbHuGIpybYO/tZnEBUInHFMviAdBRpN6iOrUAM9cNiMdG/iqexiVDLXClqsnrXfPV8jm+UhT6A 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:(13230016)(4636009)(366004)(26005)(316002)(6666004)(6512007)(52116002)(66946007)(66476007)(4326008)(66556008)(8676002)(2616005)(86362001)(6506007)(921005)(5660300002)(7416002)(38350700002)(38100700002)(508600001)(2906002)(6486002)(1076003)(8936002)(186003)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wiZnVBAo3bwq5zHlwvribmXZyCPGdJ2Bos6pCsZ1JLBaPk2eZyyOULDJ8844/FYWF1pFoTDdBAd1iEddCVpFeCqmLMWKL5lL2PWTfsa/sotsjSR5vh6LUZDbdaXCHF/jpwkaxu0pK+dkObDG1wJBOJPJqvd1YZIQ9n79RJ7pAe3PhR6U2Nlqzxq422iKPEGc069gPtqVGd8ZLxzITgtpI6XtH4EAT8rBe6jVuB94cSz3c6iU1nERay2mnCjHh6v7bFSG6RpnsN61GptMWD/z8LJCjsHuiCP2VUBWn6MjTKQWQlPJ06RWlXyvtGkB8BOZAb/nal639owuY1YY0tQVI1Uxy3arp9OTc+F6UMe6gVC8u/a/+dii64Ocfh/Rmjc7m2OXhapvzs8yXpRhcV04aeLkpjpQIXQh8aoONc1TuBPyrl34pfpz7iYsW0nLzDXcZ5w3ffDtmo8IJrc/P7zjZktSkjCI6kpI4meJX78rT+CCTwn0sr+mrpkU+ZzFLKlm4raoX0jUbsKOK/x87jITqyf0ZUdUJGR4Bd8LcNgmcGYw6Fr1TCN9gprKjJ3FeHGs8R1cNre6czQU9ncbNb6gYRZUDGbC6xP1xYn0bET0B1T12iVqrD6RdSpZ/uMBYR1BEWQ4Yp3EKbqSiRnyVsQH8AtOFn/UsTOJOnVVbytfPspf6i3ljw+VvZWEH6tIqBAuBg+5dzm7fjST2kasD7fDPk8UPdop4rL5EF/j6eejYO19ttIqxn5x4YIhDI+eLk2sYhxpWNfmTScdEP1+kjje/7PiY3Wg/YRSljYqVzVDw7oI8Fwxc7T4RJRQc+Tk1gAnbOp1FX59b/+eYj2kxfXC8fsL4h3zyeqW+z3J+8XAnP9ZGH1Tz8ikC2FfAnk3z5M965S71UvztqvZJTL0T7IWukm0hy3e1xtAviGNzSQpIzAoJ3gGOwtmD+5XNZVv6RFPmcHfX7iIEJEBf5Okc0rMa7y7ZCkpxryttJKDU5zgq4GnqePjzUKGWGA8ONXE4OPnPrriHIcyesRmU4JLlhJNZSNxadpbm1nwZQuU+FpEHg8XD04dm6Sm/GfsG6oBuqXYrNKoIfP71UWo3XjkR65rLbfg5H2qIyOCJFoGh2vM7WRA/yKO5ga84a/WetJ8fQqAUxMJdQT2+iIZdP2gX7RH7zJT7onWLQ/Lkqvwn20Mb2YcU2npc6o9Ggtbv/0A447927+4PwNBYflJqO0nvJUOfsE6VE/xykufS60XDOoY9oX23H8c/F84xzDVSKI7MNm1l9ReVt6rdmUn8gpys9i0FZfM5Ip5Hy8DzjiHDBGguCRUbT2C3YCtDmn5Z9qsuQd71A3W3Yxws9KRCfkI3Q0iWtEVmUbrW2xvadWJFpHVr0LX2XulrX2nhG/Wdyc7ZrudAsIhS6W1rWsl9TvygnAx8oMCwSDFKPs+YoB2m7JrswMVsE/AlREO5HoVar2M8gmK0k96tFOsl4QyvBPp6S8rfQyDw6uPtKGaf4XFU/BJD3doYtb8IOUY4zWWqhGYd8wWNrdMCo7URdEasxtAE73biThzAcZkOrIfM7l6I9ML3IkPFg7bc8sK5dGMxhpkjOxF8qAvOPKRv4E2Oass0HfS9lYbBIOJUa5BAHSeSovPFBN+ivR5fuda4IKcpdmsNF3htk3jD9jyeFVLel1aPElabCPaOwegUCemupm/We8ox1VjM3tCK2239YZptadC/aAVs0hWWrE1aXtz1c81z1ijZg== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6aa3f1c5-8f84-4317-d483-08da4f6a6304 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 07:32:37.6484 (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: FOvNKHItxCTYTEUWfNZig0Ih8gZpuDOdqjl0p9jyOsP+O/5AqEQy4jr3XMnmTIp0/XX9JoLeMnkg3dvHdgN3sA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8435 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan Add a platform driver for the i.MX8MP SoC describing bus topology, based on internal documentation. Signed-off-by: Peng Fan --- drivers/interconnect/imx/Kconfig | 4 + drivers/interconnect/imx/Makefile | 2 + drivers/interconnect/imx/imx8mp.c | 259 ++++++++++++++++++++++++++++++ 3 files changed, 265 insertions(+) create mode 100644 drivers/interconnect/imx/imx8mp.c diff --git a/drivers/interconnect/imx/Kconfig b/drivers/interconnect/imx/Kconfig index be2928362bb7..c772552431f5 100644 --- a/drivers/interconnect/imx/Kconfig +++ b/drivers/interconnect/imx/Kconfig @@ -15,3 +15,7 @@ config INTERCONNECT_IMX8MN config INTERCONNECT_IMX8MQ tristate "i.MX8MQ interconnect driver" depends on INTERCONNECT_IMX + +config INTERCONNECT_IMX8MP + tristate "i.MX8MP interconnect driver" + depends on INTERCONNECT_IMX diff --git a/drivers/interconnect/imx/Makefile b/drivers/interconnect/imx/Makefile index 21fd5233754f..16d256cdeab4 100644 --- a/drivers/interconnect/imx/Makefile +++ b/drivers/interconnect/imx/Makefile @@ -2,8 +2,10 @@ imx-interconnect-objs := imx.o imx8mm-interconnect-objs := imx8mm.o imx8mq-interconnect-objs := imx8mq.o imx8mn-interconnect-objs := imx8mn.o +imx8mp-interconnect-objs := imx8mp.o obj-$(CONFIG_INTERCONNECT_IMX) += imx-interconnect.o obj-$(CONFIG_INTERCONNECT_IMX8MM) += imx8mm-interconnect.o obj-$(CONFIG_INTERCONNECT_IMX8MQ) += imx8mq-interconnect.o obj-$(CONFIG_INTERCONNECT_IMX8MN) += imx8mn-interconnect.o +obj-$(CONFIG_INTERCONNECT_IMX8MP) += imx8mp-interconnect.o diff --git a/drivers/interconnect/imx/imx8mp.c b/drivers/interconnect/imx/imx8mp.c new file mode 100644 index 000000000000..2be2e9e2974e --- /dev/null +++ b/drivers/interconnect/imx/imx8mp.c @@ -0,0 +1,259 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Interconnect framework driver for i.MX8MP SoC + * + * Copyright 2022 NXP + * Peng Fan + */ + +#include +#include +#include +#include + +#include "imx.h" + +static const struct imx_icc_node_adj_desc imx8mp_noc_adj = { + .bw_mul = 1, + .bw_div = 16, + .main_noc = true, +}; + +static struct imx_icc_noc_setting noc_setting_nodes[] = { + [IMX8MP_ICM_MLMIX] = { + .reg = 0x180, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 3, + }, + [IMX8MP_ICM_DSP] = { + .reg = 0x200, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 3, + }, + [IMX8MP_ICM_SDMA2PER] = { + .reg = 0x280, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 4, + }, + [IMX8MP_ICM_SDMA2BURST] = { + .reg = 0x300, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 4, + }, + [IMX8MP_ICM_SDMA3PER] = { + .reg = 0x380, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 4, + }, + [IMX8MP_ICM_SDMA3BURST] = { + .reg = 0x400, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 4, + }, + [IMX8MP_ICM_EDMA] = { + .reg = 0x480, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 4, + }, + [IMX8MP_ICM_GPU3D] = { + .reg = 0x500, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 3, + }, + [IMX8MP_ICM_GPU2D] = { + .reg = 0x580, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 3, + }, + [IMX8MP_ICM_HRV] = { + .reg = 0x600, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 2, + .ext_control = 1, + }, + [IMX8MP_ICM_LCDIF_HDMI] = { + .reg = 0x680, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 2, + .ext_control = 1, + }, + [IMX8MP_ICM_HDCP] = { + .reg = 0x700, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 5, + }, + [IMX8MP_ICM_NOC_PCIE] = { + .reg = 0x780, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 3, + }, + [IMX8MP_ICM_USB1] = { + .reg = 0x800, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 3, + }, + [IMX8MP_ICM_USB2] = { + .reg = 0x880, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 3, + }, + [IMX8MP_ICM_PCIE] = { + .reg = 0x900, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 3, + }, + [IMX8MP_ICM_LCDIF_RD] = { + .reg = 0x980, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 2, + .ext_control = 1, + }, + [IMX8MP_ICM_LCDIF_WR] = { + .reg = 0xa00, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 2, + .ext_control = 1, + }, + [IMX8MP_ICM_ISI0] = { + .reg = 0xa80, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 2, + .ext_control = 1, + }, + [IMX8MP_ICM_ISI1] = { + .reg = 0xb00, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 2, + .ext_control = 1, + }, + [IMX8MP_ICM_ISI2] = { + .reg = 0xb80, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 2, + .ext_control = 1, + }, + [IMX8MP_ICM_ISP0] = { + .reg = 0xc00, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 7, + }, + [IMX8MP_ICM_ISP1] = { + .reg = 0xc80, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 7, + }, + [IMX8MP_ICM_DWE] = { + .reg = 0xd00, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 7, + }, + [IMX8MP_ICM_VPU_G1] = { + .reg = 0xd80, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 3, + }, + [IMX8MP_ICM_VPU_G2] = { + .reg = 0xe00, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 3, + }, + [IMX8MP_ICM_VPU_H1] = { + .reg = 0xe80, + .mode = IMX_NOC_MODE_FIXED, + .prio_level = 3, + }, + [IMX8MP_ICN_MEDIA] = { + .ignore = true, + }, + [IMX8MP_ICN_VIDEO] = { + .ignore = true, + }, + [IMX8MP_ICN_AUDIO] = { + .ignore = true, + }, + [IMX8MP_ICN_HDMI] = { + .ignore = true, + }, + [IMX8MP_ICN_GPU] = { + .ignore = true, + }, + [IMX8MP_ICN_HSIO] = { + .ignore = true, + }, +}; + +/* Describe bus masters, slaves and connections between them */ +static struct imx_icc_node_desc nodes[] = { + DEFINE_BUS_INTERCONNECT("NOC", IMX8MP_ICN_NOC, &imx8mp_noc_adj, + IMX8MP_ICS_DRAM, IMX8MP_ICN_MAIN), + + DEFINE_BUS_SLAVE("OCRAM", IMX8MP_ICS_OCRAM, NULL), + DEFINE_BUS_SLAVE("DRAM", IMX8MP_ICS_DRAM, NULL), + DEFINE_BUS_MASTER("A53", IMX8MP_ICM_A53, IMX8MP_ICN_NOC), + DEFINE_BUS_MASTER("SUPERMIX", IMX8MP_ICM_SUPERMIX, IMX8MP_ICN_NOC), + DEFINE_BUS_MASTER("GIC", IMX8MP_ICM_GIC, IMX8MP_ICN_NOC), + DEFINE_BUS_MASTER("MLMIX", IMX8MP_ICM_MLMIX, IMX8MP_ICN_NOC), + + DEFINE_BUS_INTERCONNECT("NOC_AUDIO", IMX8MP_ICN_AUDIO, NULL, IMX8MP_ICN_NOC), + DEFINE_BUS_MASTER("DSP", IMX8MP_ICM_DSP, IMX8MP_ICN_AUDIO), + DEFINE_BUS_MASTER("SDMA2PER", IMX8MP_ICM_SDMA2PER, IMX8MP_ICN_AUDIO), + DEFINE_BUS_MASTER("SDMA2BURST", IMX8MP_ICM_SDMA2BURST, IMX8MP_ICN_AUDIO), + DEFINE_BUS_MASTER("SDMA3PER", IMX8MP_ICM_SDMA3PER, IMX8MP_ICN_AUDIO), + DEFINE_BUS_MASTER("SDMA3BURST", IMX8MP_ICM_SDMA3BURST, IMX8MP_ICN_AUDIO), + DEFINE_BUS_MASTER("EDMA", IMX8MP_ICM_EDMA, IMX8MP_ICN_AUDIO), + + DEFINE_BUS_INTERCONNECT("NOC_GPU", IMX8MP_ICN_GPU, NULL, IMX8MP_ICN_NOC), + DEFINE_BUS_MASTER("GPU 2D", IMX8MP_ICM_GPU2D, IMX8MP_ICN_GPU), + DEFINE_BUS_MASTER("GPU 3D", IMX8MP_ICM_GPU3D, IMX8MP_ICN_GPU), + + DEFINE_BUS_INTERCONNECT("NOC_HDMI", IMX8MP_ICN_HDMI, NULL, IMX8MP_ICN_NOC), + DEFINE_BUS_MASTER("HRV", IMX8MP_ICM_HRV, IMX8MP_ICN_HDMI), + DEFINE_BUS_MASTER("LCDIF_HDMI", IMX8MP_ICM_LCDIF_HDMI, IMX8MP_ICN_HDMI), + DEFINE_BUS_MASTER("HDCP", IMX8MP_ICM_HDCP, IMX8MP_ICN_HDMI), + + DEFINE_BUS_INTERCONNECT("NOC_HSIO", IMX8MP_ICN_HSIO, NULL, IMX8MP_ICN_NOC), + DEFINE_BUS_MASTER("NOC_PCIE", IMX8MP_ICM_NOC_PCIE, IMX8MP_ICN_HSIO), + DEFINE_BUS_MASTER("USB1", IMX8MP_ICM_USB1, IMX8MP_ICN_HSIO), + DEFINE_BUS_MASTER("USB2", IMX8MP_ICM_USB2, IMX8MP_ICN_HSIO), + DEFINE_BUS_MASTER("PCIE", IMX8MP_ICM_PCIE, IMX8MP_ICN_HSIO), + + DEFINE_BUS_INTERCONNECT("NOC_MEDIA", IMX8MP_ICN_MEDIA, NULL, IMX8MP_ICN_NOC), + DEFINE_BUS_MASTER("LCDIF_RD", IMX8MP_ICM_LCDIF_RD, IMX8MP_ICN_MEDIA), + DEFINE_BUS_MASTER("LCDIF_WR", IMX8MP_ICM_LCDIF_WR, IMX8MP_ICN_MEDIA), + DEFINE_BUS_MASTER("ISI0", IMX8MP_ICM_ISI0, IMX8MP_ICN_MEDIA), + DEFINE_BUS_MASTER("ISI1", IMX8MP_ICM_ISI1, IMX8MP_ICN_MEDIA), + DEFINE_BUS_MASTER("ISI2", IMX8MP_ICM_ISI2, IMX8MP_ICN_MEDIA), + DEFINE_BUS_MASTER("ISP0", IMX8MP_ICM_ISP0, IMX8MP_ICN_MEDIA), + DEFINE_BUS_MASTER("ISP1", IMX8MP_ICM_ISP1, IMX8MP_ICN_MEDIA), + DEFINE_BUS_MASTER("DWE", IMX8MP_ICM_DWE, IMX8MP_ICN_MEDIA), + + DEFINE_BUS_INTERCONNECT("NOC_VIDEO", IMX8MP_ICN_VIDEO, NULL, IMX8MP_ICN_NOC), + DEFINE_BUS_MASTER("VPU G1", IMX8MP_ICM_VPU_G1, IMX8MP_ICN_VIDEO), + DEFINE_BUS_MASTER("VPU G2", IMX8MP_ICM_VPU_G2, IMX8MP_ICN_VIDEO), + DEFINE_BUS_MASTER("VPU H1", IMX8MP_ICM_VPU_H1, IMX8MP_ICN_VIDEO), + DEFINE_BUS_INTERCONNECT("PL301_MAIN", IMX8MP_ICN_MAIN, NULL, + IMX8MP_ICN_NOC, IMX8MP_ICS_OCRAM), +}; + +static int imx8mp_icc_probe(struct platform_device *pdev) +{ + return imx_icc_register(pdev, nodes, ARRAY_SIZE(nodes), noc_setting_nodes); +} + +static int imx8mp_icc_remove(struct platform_device *pdev) +{ + return imx_icc_unregister(pdev); +} + +static struct platform_driver imx8mp_icc_driver = { + .probe = imx8mp_icc_probe, + .remove = imx8mp_icc_remove, + .driver = { + .name = "imx8mp-interconnect", + }, +}; + +module_platform_driver(imx8mp_icc_driver); +MODULE_AUTHOR("Peng Fan "); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:imx8mp-interconnect");