From patchwork Mon Jul 16 18:06:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 10527445 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 410AC6037E for ; Mon, 16 Jul 2018 18:12:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EF99284FF for ; Mon, 16 Jul 2018 18:12:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F3AD28BE3; Mon, 16 Jul 2018 18:12:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C088C284FF for ; Mon, 16 Jul 2018 18:12:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=PwT8zf1TBeC4cs+WRngah9ANDz9y7jRBGRnOfDZPobk=; b=bSvCzPeHEsGU4i YC3ClRgE1wRS7S1Py9CaYJXJOTP8FMNrkn6JuKx0PXOV7mNgpvXM4X+uuvQ5Rdm2LOYeIHgI75vw/ xkA7DmBlfcWZP2KgGjf2praS+oJAO8lnwjH9g6pDm4olQt/C783cWKQ/dJUSE5WZ0RVjqp4+WyfFE l0hz2lUC74p7Di7jZm+GttDnIjh0pxIUoqKmRIhjobuFH1nZYe90Qkj515VIayN1i0T4NIW0wbDK6 Byg3ytqi58zAbIzuuZqApuWXNFHi6Y0xCxC952Xx9xs5vE0XcJIV2TbUkcO1bUDueScarcMsAUplv S3Yu9mpnfT7KmlsEyobQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ff7zI-000456-Aq; Mon, 16 Jul 2018 18:12:44 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ff7tA-0000N8-TB for linux-arm-kernel@lists.infradead.org; Mon, 16 Jul 2018 18:06:27 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id w6GI69sv048192; Mon, 16 Jul 2018 13:06:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1531764369; bh=pjndw84cSeNk1ZBGfYgK+F7omBF/DgkhA23tQUo+wEc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=QuGDZECmFhLO8U8M6FtILnFMRjsO1/VhCk+7YIY1U+7R/w6HzNlr4VnLXCdRDxkgk FsUQf+vydwn9Xy5R5H9AsVdLwDbRjpkq+468HQnOAZf2dOI1GmSepwkw/lJjZaffOq qHytqq6j5ItWNcp1OSMHdqNNON3dLz7mwsoJ7K7g= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w6GI69dt018320; Mon, 16 Jul 2018 13:06:09 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 16 Jul 2018 13:06:08 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Mon, 16 Jul 2018 13:06:08 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w6GI681R019375; Mon, 16 Jul 2018 13:06:08 -0500 From: Nishanth Menon To: Jassi Brar , Mark Rutland , Rob Herring Subject: [PATCH V2 4/6] mailbox: ti-msgmgr: Move the memory region name to descriptor Date: Mon, 16 Jul 2018 13:06:05 -0500 Message-ID: <20180716180607.16526-5-nm@ti.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180716180607.16526-1-nm@ti.com> References: <20180716180607.16526-1-nm@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180716_110625_130729_9B0819C6 X-CRM114-Status: GOOD ( 16.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Tero Kristo , 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 X-Virus-Scanned: ClamAV using ClamSMTP For newer generation of the hardware, the naming of the region is decided at integration level and there could be additional regions as well. Hence move the region naming to be described from compatible descriptor. Signed-off-by: Nishanth Menon --- Changes since V1: None V1: https://patchwork.kernel.org/patch/10475331/ RFC: https://patchwork.kernel.org/patch/10447653/ drivers/mailbox/ti-msgmgr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/mailbox/ti-msgmgr.c b/drivers/mailbox/ti-msgmgr.c index 7d2eb4b359ba..7167cc708f44 100644 --- a/drivers/mailbox/ti-msgmgr.c +++ b/drivers/mailbox/ti-msgmgr.c @@ -48,6 +48,8 @@ struct ti_msgmgr_valid_queue_desc { * @tx_polled: Do I need to use polled mechanism for tx * @tx_poll_timeout_ms: Timeout in ms if polled * @valid_queues: List of Valid queues that the processor can access + * @data_region_name: Name of the proxy data region + * @status_region_name: Name of the proxy status region * @num_valid_queues: Number of valid queues * * This structure is used in of match data to describe how integration @@ -63,6 +65,8 @@ struct ti_msgmgr_desc { bool tx_polled; int tx_poll_timeout_ms; const struct ti_msgmgr_valid_queue_desc *valid_queues; + const char *data_region_name; + const char *status_region_name; int num_valid_queues; }; @@ -531,6 +535,8 @@ static const struct ti_msgmgr_desc k2g_desc = { .queue_count = 64, .max_message_size = 64, .max_messages = 128, + .data_region_name = "queue_proxy_region", + .status_region_name = "queue_state_debug_region", .data_first_reg = 16, .data_last_reg = 31, .status_cnt_mask = Q_STATE_ENTRY_COUNT_MASK, @@ -582,13 +588,13 @@ static int ti_msgmgr_probe(struct platform_device *pdev) inst->desc = desc; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "queue_proxy_region"); + desc->data_region_name); inst->queue_proxy_region = devm_ioremap_resource(dev, res); if (IS_ERR(inst->queue_proxy_region)) return PTR_ERR(inst->queue_proxy_region); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "queue_state_debug_region"); + desc->status_region_name); inst->queue_state_debug_region = devm_ioremap_resource(dev, res); if (IS_ERR(inst->queue_state_debug_region)) return PTR_ERR(inst->queue_state_debug_region);