Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Marc Zyngier <maz@kernel.org>
Cc: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Rob Herring" <robh@kernel.org>,
	"Alyssa Rosenzweig" <alyssa@rosenzweig.io>
Subject: Re: [PATCH 1/2] PCI: host-generic: Allow {en,dis}able_device() to be provided via pci_ecam_ops
Date: Wed, 4 Dec 2024 11:35:20 -0500	[thread overview]
Message-ID: <Z1CEyAJn8OnxEHUO@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20241204150145.800408-2-maz@kernel.org>

On Wed, Dec 04, 2024 at 03:01:44PM +0000, Marc Zyngier wrote:
> In order to let host controller drivers using the host-generic
> infrastructure use the {en,dis}able_device() callbacks that can
> be used to configure sideband RID mapping hardware, provide these
> two callbacks as part of the pci_ecap_ops structure.
>
> Signed-off-by: Marc Zyngier <maz@kernel.org>

Reviewed-by: Frank Li <Frank.Li@nxp.com>

> ---
>  drivers/pci/controller/pci-host-common.c | 2 ++
>  include/linux/pci-ecam.h                 | 4 ++++
>  2 files changed, 6 insertions(+)
>
> diff --git a/drivers/pci/controller/pci-host-common.c b/drivers/pci/controller/pci-host-common.c
> index cf5f59a745b37..f441bfd6f96a8 100644
> --- a/drivers/pci/controller/pci-host-common.c
> +++ b/drivers/pci/controller/pci-host-common.c
> @@ -75,6 +75,8 @@ int pci_host_common_probe(struct platform_device *pdev)
>
>  	bridge->sysdata = cfg;
>  	bridge->ops = (struct pci_ops *)&ops->pci_ops;
> +	bridge->enable_device = ops->enable_device;
> +	bridge->disable_device = ops->disable_device;
>  	bridge->msi_domain = true;
>
>  	return pci_host_probe(bridge);
> diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
> index 3a4860bd27586..3a10f8cfc3ad5 100644
> --- a/include/linux/pci-ecam.h
> +++ b/include/linux/pci-ecam.h
> @@ -45,6 +45,10 @@ struct pci_ecam_ops {
>  	unsigned int			bus_shift;
>  	struct pci_ops			pci_ops;
>  	int				(*init)(struct pci_config_window *);
> +	int				(*enable_device)(struct pci_host_bridge *,
> +							 struct pci_dev *);
> +	void				(*disable_device)(struct pci_host_bridge *,
> +							  struct pci_dev *);
>  };
>
>  /*
> --
> 2.39.2
>


  reply	other threads:[~2024-12-04 16:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-04 15:01 [PATCH 0/2] PCI: Convert the Apple controller to host bridge hooks Marc Zyngier
2024-12-04 15:01 ` [PATCH 1/2] PCI: host-generic: Allow {en,dis}able_device() to be provided via pci_ecam_ops Marc Zyngier
2024-12-04 16:35   ` Frank Li [this message]
2024-12-04 15:01 ` [PATCH 2/2] PCI: apple: Convert to {en,dis}able_device() callbacks Marc Zyngier
2024-12-04 16:37   ` Frank Li
2024-12-11  6:04 ` [PATCH 0/2] PCI: Convert the Apple controller to host bridge hooks Manivannan Sadhasivam
2025-01-15 21:01 ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z1CEyAJn8OnxEHUO@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=alyssa@rosenzweig.io \
    --cc=bhelgaas@google.com \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=maz@kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox