[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5738e05f-fa1c-0aa7-78f3-3d38f9f0ae3c@huawei.com>
Date: Wed, 5 Mar 2025 14:48:13 +0800
From: "lihuisong (C)" <lihuisong@...wei.com>
To: Sudeep Holla <sudeep.holla@....com>, <linux-acpi@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: Jassi Brar <jassisinghbrar@...il.com>, Adam Young
<admiyo@...amperecomputing.com>
Subject: Re: [PATCH 07/14] mailbox: pcc: Move pcc_mbox_ioremap() before
pcc_mbox_request_channel()
在 2025/3/3 18:51, Sudeep Holla 写道:
> In order to add support of mapping the generic communication shared
> memory region in the PCC mailbox driver when the PCC channel is requested,
> we need to move pcc_mbox_ioremap() before pcc_mbox_request_channel().
This patch is supposed to merge into patch 8/14 because it depend on
this moving.
>
> No functional change.
>
> Signed-off-by: Sudeep Holla <sudeep.holla@....com>
> ---
> drivers/mailbox/pcc.c | 38 +++++++++++++++++++-------------------
> 1 file changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
> index e693675ce1fbd8d01d0640b3053a5c1882bdbce7..f230e512c29b79fc03e429145180ff049a250d2d 100644
> --- a/drivers/mailbox/pcc.c
> +++ b/drivers/mailbox/pcc.c
> @@ -357,6 +357,25 @@ static irqreturn_t pcc_mbox_irq(int irq, void *p)
> return IRQ_HANDLED;
> }
>
> +int pcc_mbox_ioremap(struct mbox_chan *chan)
> +{
> + struct pcc_chan_info *pchan_info;
> + struct pcc_mbox_chan *pcc_mbox_chan;
> +
> + if (!chan || !chan->cl)
> + return -1;
> + pchan_info = chan->con_priv;
> + pcc_mbox_chan = &pchan_info->chan;
> +
> + pcc_mbox_chan->shmem = acpi_os_ioremap(pcc_mbox_chan->shmem_base_addr,
> + pcc_mbox_chan->shmem_size);
> + if (!pcc_mbox_chan->shmem)
> + return -ENXIO;
> +
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(pcc_mbox_ioremap);
> +
> /**
> * pcc_mbox_request_channel - PCC clients call this function to
> * request a pointer to their PCC subspace, from which they
> @@ -419,25 +438,6 @@ void pcc_mbox_free_channel(struct pcc_mbox_chan *pchan)
> }
> EXPORT_SYMBOL_GPL(pcc_mbox_free_channel);
>
> -int pcc_mbox_ioremap(struct mbox_chan *chan)
> -{
> - struct pcc_chan_info *pchan_info;
> - struct pcc_mbox_chan *pcc_mbox_chan;
> -
> - if (!chan || !chan->cl)
> - return -1;
> - pchan_info = chan->con_priv;
> - pcc_mbox_chan = &pchan_info->chan;
> -
> - pcc_mbox_chan->shmem = acpi_os_ioremap(pcc_mbox_chan->shmem_base_addr,
> - pcc_mbox_chan->shmem_size);
> - if (!pcc_mbox_chan->shmem)
> - return -ENXIO;
> -
> - return 0;
> -}
> -EXPORT_SYMBOL_GPL(pcc_mbox_ioremap);
> -
> /**
> * pcc_send_data - Called from Mailbox Controller code. Used
> * here only to ring the channel doorbell. The PCC client
>
Powered by blists - more mailing lists