From patchwork Mon Sep 14 09:32:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Daniel Baluta (OSS)" X-Patchwork-Id: 11773397 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F2D0992C for ; Mon, 14 Sep 2020 09:34:14 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B597F20719 for ; Mon, 14 Sep 2020 09:34:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="c3AnDf6N"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="T3qW8+ow" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B597F20719 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=OQRXlz55F6VyHjkkKIpfAlh+OFnc+HsokYKUV0LB340=; b=c3AnDf6NxcPyQSvJdUkPyYH7EA PjB8PSD+3AAYSi+Vp7Ac6mhWftyX2MqWCGSSSXB7eOtmEsBkl9tQn+ARf2gh9S94+1JZvPjoAWQR1 zHhclbDl1TisqMmczEHocQVgD8hxoqOfmob4QGBV2ZOfOgivS87dti17Y33gPDGf5Y9uaVKL4v1pV fweYUDNpWIbsnmqM+KNYc40DTN2DCbh+NhwcWP61kvmj8RzF0tVePxVwlkqhQADATz7uARW7JdFAB cJFwYuwND/A7c9qZnErO8KDkzj7Cbf2FF9djcbFi++oWdp7/sYc+BfS228rSX4U3/AEjDkwLbbUYO 1bL3ekuA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHkqu-0005NW-BX; Mon, 14 Sep 2020 09:32:48 +0000 Received: from mail-eopbgr80070.outbound.protection.outlook.com ([40.107.8.70] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHkqr-0005MI-6Y for linux-arm-kernel@lists.infradead.org; Mon, 14 Sep 2020 09:32:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KhjR5M2dXJubtjb3SmLnZ/9lGEfhcy3p3dGWTN+1CsOXJSu1IO2rWelD7SSzLERo1vxlGsaTiQUkwH48edxLBW7Y2y4ohNssld66vV2pO/EZIqfJUniL+c0Rl2Y+hS1C0eLDMBah8+xJLXO3vT2kcMGc3HwU+SPhVWlyaq+LxX/MiTI2RDVlrSpldKGjnDbGqz5IFGHtBwe1tXVNJf067jOpYq2GA4g7My/NRwft6RENqeIC+FqJOnOImjP0M436dr0b3girmiTGcZaSHqq70TKaQ5gQz8kVPYaMyFsz1trIl7zb/965y4SC4E+3HzRcBwTOCwOKBDPx2U1FvHfpAA== 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-SenderADCheck; bh=gIrf6XmG+2q7KDoYFGD7m01T8hk6JPx/FshZKQ/TdUU=; b=UScBoEUMb0b6bnn3fxwD+NZ4eEx53bh/gpLe17XRs7zmK0pjnOCqIkkSE7r4lKs79p6iRERmTxkXA7c6omgImzV8BhZRQ3Q6WwF5jiPX25MduQsuN5JpOGurNssOi9KeQzUrsQXqHJ8/At8sAhovJJUa6dhEcpBotuGw9g/0aSZJ98kvcfgyS3YaIlrvf9jEmt5FniShygKFSAj/GdnwWPDL7wGodfPIIXRU4CjgWZFfx4nZeGZ+JrHzzbo8cERhQNvwXN9PQgwW2y2692asQol3gd5kHn0O3DeZbKHJJe0c4BSNTy66YGWKA5B707KpY1J56lK1ixbeW361h+3MSA== 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=gIrf6XmG+2q7KDoYFGD7m01T8hk6JPx/FshZKQ/TdUU=; b=T3qW8+owFHiDSGQdS7QFDC0XucaglNXqKaTTJjf88LBJ2VQWf/OeA7yb6WYJnK/L6sQPQ5qyiy6vKDV+4TltWS+CLEQa48S9tURPoXrhDsiNzLZgTp6Rj/QYNTpzmFAUlaghq+rS9+wVAiqevMehHmt4afufBbXQmBquOLBN7WU= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR0401MB2287.eurprd04.prod.outlook.com (2603:10a6:800:2e::19) by VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Mon, 14 Sep 2020 09:32:41 +0000 Received: from VI1PR0401MB2287.eurprd04.prod.outlook.com ([fe80::174:edc4:7d33:9c88]) by VI1PR0401MB2287.eurprd04.prod.outlook.com ([fe80::174:edc4:7d33:9c88%12]) with mapi id 15.20.3370.019; Mon, 14 Sep 2020 09:32:40 +0000 From: Daniel Baluta To: shawnguo@kernel.org, o.rempel@pengutronix.de Subject: [RESEND PATCH 0/3] Allow on demand channel request / free Date: Mon, 14 Sep 2020 12:32:24 +0300 Message-Id: <20200914093227.5094-1-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: AM0PR06CA0133.eurprd06.prod.outlook.com (2603:10a6:208:ab::38) To VI1PR0401MB2287.eurprd04.prod.outlook.com (2603:10a6:800:2e::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from fsr-ub1864-103.ro-buh02.nxp.com (83.217.231.2) by AM0PR06CA0133.eurprd06.prod.outlook.com (2603:10a6:208:ab::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Mon, 14 Sep 2020 09:32:39 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [83.217.231.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d9c3c3b1-5792-45a3-6463-08d858911fd6 X-MS-TrafficTypeDiagnostic: VE1PR04MB6688: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: alOY1FcYvuJ0HsaQLeN8ZoON7jKipOVB/NiqtYrNydxWIp5V4cU2SBFv1ydKStMMyOzYj9/YXsO7T7NTi2yLrKGnCrTZoNuysgH4IjcpWfFRYaDNg2FceOPQV3pEpw1vLdToDYlFQoiGPCkDhlMt9O3T32iiv1NFlFxt7fNZ/+mxJjXj/j7H2v0wac51PQ9pn9CIjbKsXTGdEzt3Dbuot2V9bJdj4p/ipwJl5rKtc3c+B8EXXVxFDDMyYoLJKd1Dg4tF3LPdGugkKdXAD3k70ywtlqAxWvjHSSNTfhkzl3p4fs8ZDLftiG+p35VzPcl6Vq9KpIwmjGR6McUlxhYLqQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0401MB2287.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(39850400004)(396003)(136003)(366004)(376002)(16526019)(6512007)(186003)(6486002)(66946007)(52116002)(66556008)(66476007)(316002)(26005)(6666004)(4744005)(6506007)(478600001)(956004)(2616005)(2906002)(44832011)(8936002)(5660300002)(86362001)(8676002)(1076003)(83380400001)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: D399ezxWlPxxmsl5iZWlFoKAD0UYdyNYbX9FEc4xmS2kkyW2JVFKy/aujhsJjj64zT4eyjSHjqBeYt/o13mQiwqlJy2XxJo99jJN454p+JGqLCeGniZAn3odgPrsLfI10krfWBdhUgBtkUevWott70NX2/6w4qwcTHUBedKXsy4Fey/vhp5hwrtlWZFPNbebOqLAmxCYMG5OWA6Nj1FG+yYSVjI27WcU59rWl3bKMg/VL6KKyAjKFnUjGeok8yFeE4yNzRWOYn+qUIBAkxUeO47yP4FuOB4trsleS6c3a7DCfNLbHhHloAMgog5vKjqGaDNX2MG72N91QwkSfTB3lhB5m2ursa1NHF3wFhEtf38AWA5zkhZxl5qibNCEzyNNKIpnqallJo/pSuQHIOufvF+CEQ1JqEbexif/i12t2q/SIJcCqlVuQKYTt3IH82kLXxsor7g7j8NTA7kGjlL6Ds+iByCfldUP3pEz3M52m8/EoyUDze75raxRmx7BFK0UHSxI6rAn4b1F/17LuOSfCIQ1Q8nig3gxqvVF+FGwe+cElCTpOitM6SfIt6nyHrPN5AbyWCrA2eQzvIpiIo+iUWNXoHpjKPN/uoKziNRLUzs/91LtrwpzAQqH77A0PExyflGjCg00jj4noFQnAMVfRw== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9c3c3b1-5792-45a3-6463-08d858911fd6 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0401MB2287.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2020 09:32:40.7288 (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: mRvtNSwazEW68FOrsjLWQH9HYvuKOoR8BSUKYUefx4pQjvQTpg3t4Nya+a9+Gbeau1IjtKzBEIF2KYZqJXC27w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6688 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200914_053245_397194_3C0DCF3A X-CRM114-Status: UNSURE ( 9.05 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [40.107.8.70 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.8.70 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Daniel Baluta Requesting an mailbox channel will call mailbox's startup function. startup function calls pm_runtime_get_sync which increments device usage count and will keep the device active. Specifically, mailbox clock will be always ON when a mailbox channel is requested. For this, reason we introduce a way to request/free IMX DSP channels on demand to save power when the channels are not used. First two patches are doing code refactoring preparing the path for 3rd patch which exports functions for on demand channel request/free Daniel Baluta (3): firmware: imx: Introduce imx_dsp_setup_channels firmware: imx: Save channel name for further use firmware: imx-dsp: Export functions to request/free channels drivers/firmware/imx/imx-dsp.c | 72 ++++++++++++++++++++++++-------- include/linux/firmware/imx/dsp.h | 10 +++++ 2 files changed, 64 insertions(+), 18 deletions(-)