From patchwork Tue Jun 19 19:43:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 139241 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5612566lji; Tue, 19 Jun 2018 12:43:45 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLnR6uIEU2lrWfvNNhC/FpNGxUCWoD4fe3ryQHVnNP7ioPfkL5mBtJwMrIUysqLT6LUKJ36 X-Received: by 2002:a62:d8c5:: with SMTP id e188-v6mr19332806pfg.151.1529437425366; Tue, 19 Jun 2018 12:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529437425; cv=none; d=google.com; s=arc-20160816; b=xjJj6ylr6dFnikPdBJTPq1dU63sJeOOS8xEjutO/ee9RhTt0s79xWf0W/fObeWwTST 318IoJ0DLbLBF+yrg1PVegXTCfDIDgNxAJTZJP45GJCr7zAkGsRk2Wf77VPr1pyvrV3P ykiiO8jI1fhTzL1739iDXOMhr6MavKI+yfN4/7tBamUecdY/PoLU6RnzBlHb8H0sbWoo JqOcgm8j5SHzZ1moJwQtVqLaFT8auKamfulsi/G+EJeZn97OVN4paaVboIliZaPgNOcs kEFPG/kN3qGK3pOz3MACNg5goipcxLvnqadGt/ZyO3GUX32dlgdVybWendkC9QmE/dHZ ZoRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=AhkyO3Tk/dV2mH9N4LH2cGshEXit8u58Lo/n/GBSdoU=; b=NPL+4snn4a0xpi6KahDUlk9PguCXdvdKKEdz2N6Vj39ajpFds77VjgNTchPA7UyXFo r4GwXmsq+u4VBMoW75830M9XSH7J3hCHeWFLllAf9f1O5AY7nIp9Po7mDgrYt1nU8DG+ Y3f91J3XJC9dPHVx+nx7HQVZVPSBYhJRggdokyf1eHAclnSM+9m0sn1/sVz+EGMELWKW JQCO3VLFnrEj97husx4sMm70UIY5e6oyhp1yVZKJ9F+vR/SsKHIQ5PzSUxUnrGkiEgLH +FR0F/EzxQ9GO/BeY5gXhSufNSx0cRhKy8p4l/khcqA5RcIv0yv5gcpvYEph1c8ebToF BAjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=B2HFOmVm; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13-v6si359480pgo.542.2018.06.19.12.43.44; Tue, 19 Jun 2018 12:43:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=B2HFOmVm; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030366AbeFSTnn (ORCPT + 5 others); Tue, 19 Jun 2018 15:43:43 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:39332 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030373AbeFSTnm (ORCPT ); Tue, 19 Jun 2018 15:43:42 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w5JJhchO013459; Tue, 19 Jun 2018 14:43:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1529437418; bh=8RlblOSc7AB8wmEKQxY3Q9urf0Rn1vadrIb43GEIQSA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=B2HFOmVmKz+OjVbB/y7HE2Nhrq401LduufrDbC3WaLabAXII8lnr9Qk/FaMfjOc8H fPIT0zArfESL115YZ5CGvipcIAgzXuDHMit7QWR5IwiTTAUFaXXI/jHC9CzBbpE7Hq /X+/dohXv8rPpjguYIM7J+p4Rp2U5JeEkA75qZ+8= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w5JJhcvh024514; Tue, 19 Jun 2018 14:43:38 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 19 Jun 2018 14:43:37 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Tue, 19 Jun 2018 14:43:37 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w5JJhbvN032510; Tue, 19 Jun 2018 14:43:37 -0500 From: Nishanth Menon To: Jassi Brar , Mark Rutland , Rob Herring CC: Nishanth Menon , Suman Anna , Tero Kristo , , Subject: [PATCH 4/6] mailbox: ti-msgmgr: Move the memory region name to descriptor Date: Tue, 19 Jun 2018 14:43:35 -0500 Message-ID: <20180619194337.31522-5-nm@ti.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180619194337.31522-1-nm@ti.com> References: <20180619194337.31522-1-nm@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 RFC: None RFC: https://patchwork.kernel.org/patch/10447653/ drivers/mailbox/ti-msgmgr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) -- 2.15.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);