Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2650243pxb; Fri, 17 Sep 2021 15:05:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNVLCqr0sAw1QtldPRUEj++DbcNria9JAHxP3eY5l4UTB3vL7PnKx0/nGrcy6EPTk81VA3 X-Received: by 2002:a05:6e02:1a8d:: with SMTP id k13mr9012251ilv.70.1631916347210; Fri, 17 Sep 2021 15:05:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631916347; cv=none; d=google.com; s=arc-20160816; b=nnGrQPj66ScimjgRYlJUZZB8iYqH6zaE3QgMhV+TNAL2IvW/byOAhzsbw/seXTEDTV OcjpPm5RdDDngmyW8qnmE4r5PK9X7sYvIzda77YoV48olyqsm5IKkXGRHtDbm5CmYJ2D k1mEPfjvJqv32sGKrSMzR5E7IE7Sx4pY++dloMs8P6WJTP4HEsLsEb7GMCDHDf9ozaah HclgeBp9U2klc6A2rknEAs6PKNKDSa3o5+Sap9zLFMllT/3ZFfpbKqfEI8/iqe+DMri4 P02htd57xbs+MednN/Q20yuYSi1DRexOJew7YV2c4DOsui/86g1D63ZiGwGr0MoU3JEQ ALcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=dRwuVUClxRa7Y6o4ytTCqqywv97bhBtf32apcmvkhao=; b=Yzop3tzWzg717xpvU6oLSw+r0NhdF/C5KlQyBz9eBo29+bUN27XWw5SWNpZqqUKy5q hEagLM/3oJPAEVmCv0KVlRU4Fg6MXXIkCIqaaKD35HoZRwgvxaVpE/nWCOYB/xYL7Qgn bODCwEkAabl+UboscN3puatTOJMTOvdjRqr5JVwaMCVsp57NmyPDm/atibbYsqxE1lDh WBsymZKgLuJF3kBrfVYvlVFOwucWHMe7DpyVL9dswN7YHlMwy1RN6KqAdSTJhAW/GriJ HGKYiFug5YnaZo8yEB3eSZ2ZM6dpa5M7bKKnhAxjjQSbXiP3aBejFISg7P2xoeaMnuHc zHfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s10si7146077ilh.107.2021.09.17.15.05.36; Fri, 17 Sep 2021 15:05:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245632AbhIQNgA (ORCPT + 99 others); Fri, 17 Sep 2021 09:36:00 -0400 Received: from foss.arm.com ([217.140.110.172]:53314 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245138AbhIQNfj (ORCPT ); Fri, 17 Sep 2021 09:35:39 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 396DE11B3; Fri, 17 Sep 2021 06:34:16 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 54CF43F719; Fri, 17 Sep 2021 06:34:15 -0700 (PDT) From: Sudeep Holla To: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sudeep Holla , Cristian Marussi , "Rafael J . Wysocki" , Jassi Brar Subject: [PATCH v2 08/14] mailbox: pcc: Rename doorbell ack to platform interrupt ack register Date: Fri, 17 Sep 2021 14:33:51 +0100 Message-Id: <20210917133357.1911092-9-sudeep.holla@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210917133357.1911092-1-sudeep.holla@arm.com> References: <20210917133357.1911092-1-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The specification refers this register and associated bitmask as platform interrupt acknowledge register. Let us rename it so that it is easier to map and understand. Signed-off-by: Sudeep Holla --- drivers/mailbox/pcc.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index 453a58fda3a4..ae4b7a4b3531 100644 --- a/drivers/mailbox/pcc.c +++ b/drivers/mailbox/pcc.c @@ -69,14 +69,15 @@ static struct mbox_chan *pcc_mbox_channels; * * @chan: PCC channel information with Shared Memory Region info * @db_vaddr: cached virtual address for doorbell register - * @db_ack_vaddr: cached virtual address for doorbell ack register - * @db_irq: doorbell interrupt + * @plat_irq_ack_vaddr: cached virtual address for platform interrupt + * acknowledge register + * @plat_irq: platform interrupt */ struct pcc_chan_info { struct pcc_mbox_chan chan; void __iomem *db_vaddr; - void __iomem *db_ack_vaddr; - int db_irq; + void __iomem *plat_irq_ack_vaddr; + int plat_irq; }; #define to_pcc_chan_info(c) container_of(c, struct pcc_chan_info, chan) @@ -198,12 +199,12 @@ static irqreturn_t pcc_mbox_irq(int irq, void *p) doorbell_ack_preserve = pcct2_ss->ack_preserve_mask; doorbell_ack_write = pcct2_ss->ack_write_mask; - ret = read_register(pchan->db_ack_vaddr, + ret = read_register(pchan->plat_irq_ack_vaddr, &doorbell_ack_val, doorbell_ack->bit_width); if (ret) return IRQ_NONE; - ret = write_register(pchan->db_ack_vaddr, + ret = write_register(pchan->plat_irq_ack_vaddr, (doorbell_ack_val & doorbell_ack_preserve) | doorbell_ack_write, doorbell_ack->bit_width); @@ -256,14 +257,14 @@ pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id) spin_unlock_irqrestore(&chan->lock, flags); - if (pchan->db_irq > 0) { + if (pchan->plat_irq > 0) { int rc; - rc = devm_request_irq(dev, pchan->db_irq, pcc_mbox_irq, 0, + rc = devm_request_irq(dev, pchan->plat_irq, pcc_mbox_irq, 0, MBOX_IRQ_NAME, chan); if (unlikely(rc)) { dev_err(dev, "failed to register PCC interrupt %d\n", - pchan->db_irq); + pchan->plat_irq); pcc_mbox_free_channel(&pchan->chan); return ERR_PTR(rc); } @@ -288,8 +289,8 @@ void pcc_mbox_free_channel(struct pcc_mbox_chan *pchan) if (!chan || !chan->cl) return; - if (pchan_info->db_irq > 0) - devm_free_irq(chan->mbox->dev, pchan_info->db_irq, chan); + if (pchan_info->plat_irq > 0) + devm_free_irq(chan->mbox->dev, pchan_info->plat_irq, chan); spin_lock_irqsave(&chan->lock, flags); chan->cl = NULL; @@ -400,9 +401,9 @@ static int pcc_parse_subspace_irq(struct pcc_chan_info *pchan, return 0; pcct_ss = (struct acpi_pcct_hw_reduced *)pcct_entry; - pchan->db_irq = pcc_map_interrupt(pcct_ss->platform_interrupt, - (u32)pcct_ss->flags); - if (pchan->db_irq <= 0) { + pchan->plat_irq = pcc_map_interrupt(pcct_ss->platform_interrupt, + (u32)pcct_ss->flags); + if (pchan->plat_irq <= 0) { pr_err("PCC GSI %d not registered\n", pcct_ss->platform_interrupt); return -EINVAL; @@ -411,10 +412,10 @@ static int pcc_parse_subspace_irq(struct pcc_chan_info *pchan, if (pcct_ss->header.type == ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2) { struct acpi_pcct_hw_reduced_type2 *pcct2_ss = (void *)pcct_ss; - pchan->db_ack_vaddr = + pchan->plat_irq_ack_vaddr = acpi_os_ioremap(pcct2_ss->platform_ack_register.address, pcct2_ss->platform_ack_register.bit_width / 8); - if (!pchan->db_ack_vaddr) { + if (!pchan->plat_irq_ack_vaddr) { pr_err("Failed to ioremap PCC ACK register\n"); return -ENOMEM; } -- 2.25.1