linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Krzysztof Wilczyński" <kw@linux.com>
To: daire.mcnamara@microchip.com
Cc: lorenzo.pieralisi@arm.com, bhelgaas@google.com, robh@kernel.org,
	linux-pci@vger.kernel.org, robh+dt@kernel.org,
	devicetree@vger.kernel.org, david.abdurachmanov@gmail.com,
	cyril.jean@microchip.com
Subject: Re: [PATCH v20 3/4] PCI: microchip: Add host driver for Microchip PCIe controller
Date: Mon, 25 Jan 2021 16:04:03 +0100	[thread overview]
Message-ID: <YA7d43I5V2ITG1H/@rocinante> (raw)
In-Reply-To: <20210122145137.29023-4-daire.mcnamara@microchip.com>

Hi Daire,

Thank you for working on this!

[...]
> +static const struct pci_ecam_ops mc_ecam_ops = {
> +	.bus_shift = 20,
> +	.init = mc_platform_init,
> +	.pci_ops = {
> +		.map_bus = pci_ecam_map_bus,
> +		.read = pci_generic_config_read,
> +		.write = pci_generic_config_write,
> +	}
> +};
[...]

If you are using standard ECAM, and it looks like you do, then you can
omit the .bus_shift initializer, as since the e7708f5b10e2 ("PCI: Unify
ECAM constants in native PCI Express drivers") we use the proper shift
value automatically for you, if you don't provide a custom one.

Alternatively, you can use the PCIE_ECAM_BUS_SHIFT constant, to avoid
open-coding the shift value.

Krzysztof

  parent reply	other threads:[~2021-01-26 19:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 14:51 [PATCH v20 0/4] PCI: microchip: Add host driver for Microchip PCIe controller daire.mcnamara
2021-01-22 14:51 ` [PATCH v20 1/4] PCI: Call platform_set_drvdata earlier in devm_pci_alloc_host_bridge daire.mcnamara
2021-01-22 14:51 ` [PATCH v20 2/4] dt-bindings: PCI: microchip: Add Microchip PolarFire host binding daire.mcnamara
2021-01-22 14:51 ` [PATCH v20 3/4] PCI: microchip: Add host driver for Microchip PCIe controller daire.mcnamara
2021-01-24 11:33   ` Leon Romanovsky
     [not found]     ` <MN2PR11MB42694FE9CF48F7904035660696BD9@MN2PR11MB4269.namprd11.prod.outlook.com>
2021-01-25  9:33       ` Leon Romanovsky
2021-01-25 15:04   ` Krzysztof Wilczyński [this message]
2021-01-22 14:51 ` [PATCH v20 4/4] MAINTAINERS: Add Daire McNamara as maintainer for the Microchip PCIe driver daire.mcnamara

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=YA7d43I5V2ITG1H/@rocinante \
    --to=kw@linux.com \
    --cc=bhelgaas@google.com \
    --cc=cyril.jean@microchip.com \
    --cc=daire.mcnamara@microchip.com \
    --cc=david.abdurachmanov@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).