Skip to contentSkip to conversation

PCI: pcie-rcar: Cache PHY init function pointer

PATCH In review [email protected] 4 participants 13 messages Apr 26, 2020 – May 6, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: pcie-rcar: Cache PHY init function pointer

From: Marek Vasut <[email protected]>

The PHY initialization function pointer does not change during the lifetime of the driver instance, it is therefore sufficient to get the pointer in .probe(), cache it in driver private data, and just call the function through the cached pointer in .resume().

Cc Bjorn Helgaas <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Wolfram Sang <[email protected]>

---
NOTE: Based on git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it from pci-rcar-gen2.c

---
 drivers/pci/controller/pcie-rcar.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/pci/controller/pcie-rcar.c +4 -6
index 1a0e74cad9bb..59e55f56e386 100644
@@ -153,6 +153,7 @@ struct rcar_pcie {
 	int			root_bus_nr;
 	struct clk		*bus_clk;
 	struct			rcar_msi msi;
+	int			(*phy_init_fn)(struct rcar_pcie *pcie);
 };
 
 static void rcar_pci_write_reg(struct rcar_pcie *pcie, u32 val,
@@ -1147,7 +1148,6 @@ static int rcar_pcie_probe(struct platform_device *pdev)
 	struct rcar_pcie *pcie;
 	u32 data;
 	int err;
-	int (*phy_init_fn)(struct rcar_pcie *);
 	struct pci_host_bridge *bridge;
 
 	bridge = pci_alloc_host_bridge(sizeof(*pcie));
@@ -1187,8 +1187,8 @@ static int rcar_pcie_probe(struct platform_device *pdev)
 	if (err)
 		goto err_clk_disable;
 
-	phy_init_fn = of_device_get_match_data(dev);
-	err = phy_init_fn(pcie);
+	pcie->phy_init_fn = of_device_get_match_data(dev);
+	err = pcie->phy_init_fn(pcie);
 	if (err) {
 		dev_err(dev, "failed to init PCIe PHY\n");
 		goto err_clk_disable;
@@ -1253,7 +1253,6 @@ static int rcar_pcie_probe(struct platform_device *pdev)
 static int __maybe_unused rcar_pcie_resume(struct device *dev)
 {
 	struct rcar_pcie *pcie = dev_get_drvdata(dev);
-	int (*hw_init_fn)(struct rcar_pcie *);
 	unsigned int data;
 	int err;
 
@@ -1262,8 +1261,7 @@ static int __maybe_unused rcar_pcie_resume(struct device *dev)
 		return 0;
 
 	/* Failure to get a link might just be that no cards are inserted */
-	hw_init_fn = of_device_get_match_data(dev);
-	err = hw_init_fn(pcie);
+	err = pcie->phy_init_fn(pcie);
 	if (err) {
 		dev_info(dev, "PCIe link down\n");
 		return 0;
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · On Sun, Apr 26, 2020 at 2:31 PM <[email protected]> wrote:

From: Marek Vasut <[email protected]>

The PHY initialization function pointer does not change during the lifetime of the driver instance, it is therefore sufficient to get the pointer in .probe(), cache it in driver private data, and just call the function through the cached pointer in .resume().

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#2 lore raw
In reply to [email protected]
Quoted 13 lines · On Sun, Apr 26, 2020 at 02:31:47PM +0200, [email protected] wrote:

From: Marek Vasut <[email protected]>

The PHY initialization function pointer does not change during the lifetime of the driver instance, it is therefore sufficient to get the pointer in .probe(), cache it in driver private data, and just call the function through the cached pointer in .resume().

Cc Bjorn Helgaas <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines

---
NOTE: Based on git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it from pci-rcar-gen2.c

---
 drivers/pci/controller/pcie-rcar.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

Squashed in https://patchwork.kernel.org/patch/11438665

Do you want me to rename the $SUBJECT (and the branch name while at it) in the patches in my pci/rcar branch ("PCI: pcie-rcar: ...") to start the commit subject tag renaming from this cycle (and in the interim you send a rename for the drivers files ?)

Lorenzo

Quoted 52 lines
drivers/pci/controller/pcie-rcar.c +4 -6
index 1a0e74cad9bb..59e55f56e386 100644
@@ -153,6 +153,7 @@ struct rcar_pcie {
 	int			root_bus_nr;
 	struct clk		*bus_clk;
 	struct			rcar_msi msi;
+	int			(*phy_init_fn)(struct rcar_pcie *pcie);
 };
 
 static void rcar_pci_write_reg(struct rcar_pcie *pcie, u32 val,
@@ -1147,7 +1148,6 @@ static int rcar_pcie_probe(struct platform_device *pdev)
 	struct rcar_pcie *pcie;
 	u32 data;
 	int err;
-	int (*phy_init_fn)(struct rcar_pcie *);
 	struct pci_host_bridge *bridge;
 
 	bridge = pci_alloc_host_bridge(sizeof(*pcie));
@@ -1187,8 +1187,8 @@ static int rcar_pcie_probe(struct platform_device *pdev)
 	if (err)
 		goto err_clk_disable;
 
-	phy_init_fn = of_device_get_match_data(dev);
-	err = phy_init_fn(pcie);
+	pcie->phy_init_fn = of_device_get_match_data(dev);
+	err = pcie->phy_init_fn(pcie);
 	if (err) {
 		dev_err(dev, "failed to init PCIe PHY\n");
 		goto err_clk_disable;
@@ -1253,7 +1253,6 @@ static int rcar_pcie_probe(struct platform_device *pdev)
 static int __maybe_unused rcar_pcie_resume(struct device *dev)
 {
 	struct rcar_pcie *pcie = dev_get_drvdata(dev);
-	int (*hw_init_fn)(struct rcar_pcie *);
 	unsigned int data;
 	int err;
 
@@ -1262,8 +1261,7 @@ static int __maybe_unused rcar_pcie_resume(struct device *dev)
 		return 0;
 
 	/* Failure to get a link might just be that no cards are inserted */
-	hw_init_fn = of_device_get_match_data(dev);
-	err = hw_init_fn(pcie);
+	err = pcie->phy_init_fn(pcie);
 	if (err) {
 		dev_info(dev, "PCIe link down\n");
 		return 0;
Signature · 1 line
2.25.1
#3 lore raw
Quoted 22 lines · Lorenzo Pieralisi
Quoted 13 lines · On Sun, Apr 26, 2020 at 02:31:47PM +0200, [email protected] wrote:

From: Marek Vasut <[email protected]>

The PHY initialization function pointer does not change during the lifetime of the driver instance, it is therefore sufficient to get the pointer in .probe(), cache it in driver private data, and just call the function through the cached pointer in .resume().

Cc Bjorn Helgaas <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines

---
NOTE: Based on git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it from pci-rcar-gen2.c

---
 drivers/pci/controller/pcie-rcar.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Quoted 1 line

Squashed in https://patchwork.kernel.org/patch/11438665

Thanks

Quoted 4 lines

Do you want me to rename the $SUBJECT (and the branch name while at it) in the patches in my pci/rcar branch ("PCI: pcie-rcar: ...") to start the commit subject tag renaming from this cycle (and in the interim you send a rename for the drivers files ?)

I don't really have a particular preference either way. I can keep marking the drivers with pcie-rcar and pci-rcar tags if that helps discern them.

#12 lore raw
In reply to Lorenzo Pieralisi
Quoted 22 lines · Lorenzo Pieralisi
Quoted 13 lines · On Sun, Apr 26, 2020 at 02:31:47PM +0200, [email protected] wrote:

From: Marek Vasut <[email protected]>

The PHY initialization function pointer does not change during the lifetime of the driver instance, it is therefore sufficient to get the pointer in .probe(), cache it in driver private data, and just call the function through the cached pointer in .resume().

Cc Bjorn Helgaas <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines

---
NOTE: Based on git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it from pci-rcar-gen2.c

---
 drivers/pci/controller/pcie-rcar.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Quoted 6 lines

Squashed in https://patchwork.kernel.org/patch/11438665

Do you want me to rename the $SUBJECT (and the branch name while at it) in the patches in my pci/rcar branch ("PCI: pcie-rcar: ...") to start the commit subject tag renaming from this cycle (and in the interim you send a rename for the drivers files ?)

My vote is a tag of "rcar" for the pcie-rcar driver because almost all new drivers are PCIe, and none of the others use "pcie-" in the tag.

For pci-rcar-gen2.c, we could use "rcar-gen2" (already used by the last 5 commits, last touched over two years ago). It's slightly confusing to use "gen2" to refer to some internal R-Car thing instead of PCIe Gen 2, so we could use something like "rcar-pci", but I'm not sure it's worth it.

Bjorn

#4 lore raw
In reply to Marek Vasut
Quoted 27 lines · Marek Vasut
Quoted 22 lines · Lorenzo Pieralisi
Quoted 13 lines · On Sun, Apr 26, 2020 at 02:31:47PM +0200, [email protected] wrote:

From: Marek Vasut <[email protected]>

The PHY initialization function pointer does not change during the lifetime of the driver instance, it is therefore sufficient to get the pointer in .probe(), cache it in driver private data, and just call the function through the cached pointer in .resume().

Cc Bjorn Helgaas <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines

---
NOTE: Based on git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it from pci-rcar-gen2.c

---
 drivers/pci/controller/pcie-rcar.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Quoted 1 line

Squashed in https://patchwork.kernel.org/patch/11438665

Thanks

Quoted 8 lines
Quoted 4 lines

Do you want me to rename the $SUBJECT (and the branch name while at it) in the patches in my pci/rcar branch ("PCI: pcie-rcar: ...") to start the commit subject tag renaming from this cycle (and in the interim you send a rename for the drivers files ?)

I don't really have a particular preference either way. I can keep marking the drivers with pcie-rcar and pci-rcar tags if that helps discern them.

So:

- "rcar" for the PCIe driver
- "rcar-pci" or "rcar-legacy" for the pci-rcar-gen2.c (preference ? there is no urgency, no commit queued to rename, it is for future code)

Are we OK with that ? If yes I will rewrite the commits subjects and push out an updated pci/rcar branch.

...DT bindings commit subjects - should I change their tag subject too ?

Lorenzo

#5 lore raw
Quoted 33 lines · Lorenzo Pieralisi
Quoted 32 lines · Marek Vasut
Quoted 22 lines · Lorenzo Pieralisi
Quoted 13 lines · On Sun, Apr 26, 2020 at 02:31:47PM +0200, [email protected] wrote:

From: Marek Vasut <[email protected]>

The PHY initialization function pointer does not change during the lifetime of the driver instance, it is therefore sufficient to get the pointer in .probe(), cache it in driver private data, and just call the function through the cached pointer in .resume().

Cc Bjorn Helgaas <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines

---
NOTE: Based on git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it from pci-rcar-gen2.c

---
 drivers/pci/controller/pcie-rcar.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Quoted 1 line

Squashed in https://patchwork.kernel.org/patch/11438665

Thanks

Quoted 4 lines

Do you want me to rename the $SUBJECT (and the branch name while at it) in the patches in my pci/rcar branch ("PCI: pcie-rcar: ...") to start the commit subject tag renaming from this cycle (and in the interim you send a rename for the drivers files ?)

Quoted 7 lines
Quoted 3 lines

I don't really have a particular preference either way. I can keep marking the drivers with pcie-rcar and pci-rcar tags if that helps discern them.

So:

- "rcar" for the PCIe driver

Wouldn't it be better to mark this rcar-pcie , so it's clear it's the PCIe driver ?

Quoted 3 lines

- "rcar-pci" or "rcar-legacy" for the pci-rcar-gen2.c (preference ? there is no urgency, no commit queued to rename, it is for future code)

rcar-pci , since the Gen2 controller surely isn't legacy.

Quoted 5 lines

Are we OK with that ? If yes I will rewrite the commits subjects and push out an updated pci/rcar branch.

...DT bindings commit subjects - should I change their tag subject too ?

Signature · 2 lines
Best regards,
Marek Vasut
#6 lore raw
Quoted 38 lines · Marek Vasut
Quoted 37 lines · Lorenzo Pieralisi
Quoted 35 lines · Marek Vasut
Quoted 22 lines · Lorenzo Pieralisi
Quoted 13 lines · On Sun, Apr 26, 2020 at 02:31:47PM +0200, [email protected] wrote:

From: Marek Vasut <[email protected]>

The PHY initialization function pointer does not change during the lifetime of the driver instance, it is therefore sufficient to get the pointer in .probe(), cache it in driver private data, and just call the function through the cached pointer in .resume().

Cc Bjorn Helgaas <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines

---
NOTE: Based on git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it from pci-rcar-gen2.c

---
 drivers/pci/controller/pcie-rcar.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Quoted 1 line

Squashed in https://patchwork.kernel.org/patch/11438665

Thanks

Quoted 4 lines

Do you want me to rename the $SUBJECT (and the branch name while at it) in the patches in my pci/rcar branch ("PCI: pcie-rcar: ...") to start the commit subject tag renaming from this cycle (and in the interim you send a rename for the drivers files ?)

I don't really have a particular preference either way. I can keep marking the drivers with pcie-rcar and pci-rcar tags if that helps discern them.

Quoted 6 lines
Quoted 3 lines

So:

- "rcar" for the PCIe driver

Wouldn't it be better to mark this rcar-pcie , so it's clear it's the PCIe driver ?

All other drivers in drivers/pci/controller are PCIe but don't require an extra tag to clarify it - that's the rationale behind "rcar".

How does that sound ?

Quoted 5 lines
Quoted 3 lines

- "rcar-pci" or "rcar-legacy" for the pci-rcar-gen2.c (preference ? there is no urgency, no commit queued to rename, it is for future code)

rcar-pci , since the Gen2 controller surely isn't legacy.

Ok

Quoted 5 lines
Quoted 5 lines

Are we OK with that ? If yes I will rewrite the commits subjects and push out an updated pci/rcar branch.

...DT bindings commit subjects - should I change their tag subject too ?

I shall leave DT bindings as they are then.

Lorenzo

#7 lore raw

Hi Lorenzo,

Quoted 43 lines · Lorenzo Pieralisi
Quoted 42 lines · Marek Vasut
Quoted 40 lines · Lorenzo Pieralisi
Quoted 27 lines · Marek Vasut
Quoted 22 lines · Lorenzo Pieralisi
Quoted 13 lines · On Sun, Apr 26, 2020 at 02:31:47PM +0200, [email protected] wrote:

From: Marek Vasut <[email protected]>

The PHY initialization function pointer does not change during the lifetime of the driver instance, it is therefore sufficient to get the pointer in .probe(), cache it in driver private data, and just call the function through the cached pointer in .resume().

Cc Bjorn Helgaas <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines

---
NOTE: Based on git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it from pci-rcar-gen2.c

---
 drivers/pci/controller/pcie-rcar.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Quoted 1 line

Squashed in https://patchwork.kernel.org/patch/11438665

Thanks

Quoted 8 lines
Quoted 4 lines

Do you want me to rename the $SUBJECT (and the branch name while at it) in the patches in my pci/rcar branch ("PCI: pcie-rcar: ...") to start the commit subject tag renaming from this cycle (and in the interim you send a rename for the drivers files ?)

I don't really have a particular preference either way. I can keep marking the drivers with pcie-rcar and pci-rcar tags if that helps discern them.

So:

- "rcar" for the PCIe driver

Quoted 7 lines
Quoted 2 lines

Wouldn't it be better to mark this rcar-pcie , so it's clear it's the PCIe driver ?

All other drivers in drivers/pci/controller are PCIe but don't require an extra tag to clarify it - that's the rationale behind "rcar".

How does that sound ?

Are there any other platforms that have two different drivers for the same platform, one for PCI, and one for PCIe?

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#8 lore raw
Quoted 50 lines · Geert Uytterhoeven

Hi Lorenzo,

Quoted 46 lines · Lorenzo Pieralisi
Quoted 44 lines · Marek Vasut
Quoted 33 lines · Lorenzo Pieralisi
Quoted 32 lines · Marek Vasut
Quoted 22 lines · Lorenzo Pieralisi
Quoted 13 lines · On Sun, Apr 26, 2020 at 02:31:47PM +0200, [email protected] wrote:

From: Marek Vasut <[email protected]>

The PHY initialization function pointer does not change during the lifetime of the driver instance, it is therefore sufficient to get the pointer in .probe(), cache it in driver private data, and just call the function through the cached pointer in .resume().

Cc Bjorn Helgaas <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines

---
NOTE: Based on git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it from pci-rcar-gen2.c

---
 drivers/pci/controller/pcie-rcar.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Quoted 1 line

Squashed in https://patchwork.kernel.org/patch/11438665

Thanks

Quoted 4 lines

Do you want me to rename the $SUBJECT (and the branch name while at it) in the patches in my pci/rcar branch ("PCI: pcie-rcar: ...") to start the commit subject tag renaming from this cycle (and in the interim you send a rename for the drivers files ?)

Quoted 7 lines
Quoted 3 lines

I don't really have a particular preference either way. I can keep marking the drivers with pcie-rcar and pci-rcar tags if that helps discern them.

So:

- "rcar" for the PCIe driver

Wouldn't it be better to mark this rcar-pcie , so it's clear it's the PCIe driver ?

Quoted 7 lines
Quoted 4 lines

All other drivers in drivers/pci/controller are PCIe but don't require an extra tag to clarify it - that's the rationale behind "rcar".

How does that sound ?

Are there any other platforms that have two different drivers for the same platform, one for PCI, and one for PCIe?

I don't think so - nonetheless it's time we agreed on something and be done with it. Bjorn expressed his opinion on this and unless we have a compelling reason not to follow it IMO it'd be better to take it.

I don't think using rcar-pcie is a disaster either.

Let me know how you want to proceed, thanks.

Lorenzo

#9 lore raw

Hi Lorenzo,

Quoted 57 lines · Lorenzo Pieralisi
Quoted 48 lines · Geert Uytterhoeven
Quoted 46 lines · Lorenzo Pieralisi
Quoted 44 lines · Marek Vasut
Quoted 33 lines · Lorenzo Pieralisi
Quoted 32 lines · Marek Vasut
Quoted 22 lines · Lorenzo Pieralisi
Quoted 13 lines · On Sun, Apr 26, 2020 at 02:31:47PM +0200, [email protected] wrote:

From: Marek Vasut <[email protected]>

The PHY initialization function pointer does not change during the lifetime of the driver instance, it is therefore sufficient to get the pointer in .probe(), cache it in driver private data, and just call the function through the cached pointer in .resume().

Cc Bjorn Helgaas <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines

---
NOTE: Based on git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it from pci-rcar-gen2.c

---
 drivers/pci/controller/pcie-rcar.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Quoted 1 line

Squashed in https://patchwork.kernel.org/patch/11438665

Thanks

Quoted 4 lines

Do you want me to rename the $SUBJECT (and the branch name while at it) in the patches in my pci/rcar branch ("PCI: pcie-rcar: ...") to start the commit subject tag renaming from this cycle (and in the interim you send a rename for the drivers files ?)

Quoted 7 lines
Quoted 3 lines

I don't really have a particular preference either way. I can keep marking the drivers with pcie-rcar and pci-rcar tags if that helps discern them.

So:

- "rcar" for the PCIe driver

Wouldn't it be better to mark this rcar-pcie , so it's clear it's the PCIe driver ?

Quoted 7 lines
Quoted 4 lines

All other drivers in drivers/pci/controller are PCIe but don't require an extra tag to clarify it - that's the rationale behind "rcar".

How does that sound ?

Are there any other platforms that have two different drivers for the same platform, one for PCI, and one for PCIe?

Quoted 7 lines

I don't think so - nonetheless it's time we agreed on something and be done with it. Bjorn expressed his opinion on this and unless we have a compelling reason not to follow it IMO it'd be better to take it.

I don't think using rcar-pcie is a disaster either.

Let me know how you want to proceed, thanks.

/me has just returned from a bike ride, so it's time for a bike-shed

"PCI: rcar:" for pcie-rcar.c, "PCI: rcar-gen2:" (or "PCI: rcar2"?) for pci-rcar-gen2.c?

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#10 lore raw
Quoted 65 lines · Geert Uytterhoeven

Hi Lorenzo,

Quoted 61 lines · Lorenzo Pieralisi
Quoted 48 lines · Geert Uytterhoeven
Quoted 46 lines · Lorenzo Pieralisi
Quoted 44 lines · Marek Vasut
Quoted 33 lines · Lorenzo Pieralisi
Quoted 32 lines · Marek Vasut
Quoted 22 lines · Lorenzo Pieralisi
Quoted 13 lines · On Sun, Apr 26, 2020 at 02:31:47PM +0200, [email protected] wrote:

From: Marek Vasut <[email protected]>

The PHY initialization function pointer does not change during the lifetime of the driver instance, it is therefore sufficient to get the pointer in .probe(), cache it in driver private data, and just call the function through the cached pointer in .resume().

Cc Bjorn Helgaas <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines

---
NOTE: Based on git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it from pci-rcar-gen2.c

---
 drivers/pci/controller/pcie-rcar.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Quoted 1 line

Squashed in https://patchwork.kernel.org/patch/11438665

Thanks

Quoted 4 lines

Do you want me to rename the $SUBJECT (and the branch name while at it) in the patches in my pci/rcar branch ("PCI: pcie-rcar: ...") to start the commit subject tag renaming from this cycle (and in the interim you send a rename for the drivers files ?)

Quoted 7 lines
Quoted 3 lines

I don't really have a particular preference either way. I can keep marking the drivers with pcie-rcar and pci-rcar tags if that helps discern them.

So:

- "rcar" for the PCIe driver

Wouldn't it be better to mark this rcar-pcie , so it's clear it's the PCIe driver ?

Quoted 7 lines
Quoted 4 lines

All other drivers in drivers/pci/controller are PCIe but don't require an extra tag to clarify it - that's the rationale behind "rcar".

How does that sound ?

Are there any other platforms that have two different drivers for the same platform, one for PCI, and one for PCIe?

I don't think so - nonetheless it's time we agreed on something and be done with it. Bjorn expressed his opinion on this and unless we have a compelling reason not to follow it IMO it'd be better to take it.

Quoted 8 lines
Quoted 3 lines

I don't think using rcar-pcie is a disaster either.

Let me know how you want to proceed, thanks.

/me has just returned from a bike ride, so it's time for a bike-shed

"PCI: rcar:" for pcie-rcar.c, "PCI: rcar-gen2:" (or "PCI: rcar2"?) for pci-rcar-gen2.c?

Fine by me, all agreed ?

Lorenzo

#11 lore raw
Quoted 68 lines · Lorenzo Pieralisi
Quoted 67 lines · Geert Uytterhoeven

Hi Lorenzo,

Quoted 63 lines · Lorenzo Pieralisi
Quoted 48 lines · Geert Uytterhoeven
Quoted 46 lines · Lorenzo Pieralisi
Quoted 44 lines · Marek Vasut
Quoted 33 lines · Lorenzo Pieralisi
Quoted 32 lines · Marek Vasut
Quoted 22 lines · Lorenzo Pieralisi
Quoted 13 lines · On Sun, Apr 26, 2020 at 02:31:47PM +0200, [email protected] wrote:

From: Marek Vasut <[email protected]>

The PHY initialization function pointer does not change during the lifetime of the driver instance, it is therefore sufficient to get the pointer in .probe(), cache it in driver private data, and just call the function through the cached pointer in .resume().

Cc Bjorn Helgaas <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Wolfram Sang <[email protected]>
Quoted 7 lines

---
NOTE: Based on git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git
branch pci/rcar
NOTE: The driver tag is now 'pcie-rcar' to distinguish it from pci-rcar-gen2.c

---
 drivers/pci/controller/pcie-rcar.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Quoted 1 line

Squashed in https://patchwork.kernel.org/patch/11438665

Thanks

Quoted 4 lines

Do you want me to rename the $SUBJECT (and the branch name while at it) in the patches in my pci/rcar branch ("PCI: pcie-rcar: ...") to start the commit subject tag renaming from this cycle (and in the interim you send a rename for the drivers files ?)

Quoted 7 lines
Quoted 3 lines

I don't really have a particular preference either way. I can keep marking the drivers with pcie-rcar and pci-rcar tags if that helps discern them.

So:

- "rcar" for the PCIe driver

Wouldn't it be better to mark this rcar-pcie , so it's clear it's the PCIe driver ?

Quoted 7 lines
Quoted 4 lines

All other drivers in drivers/pci/controller are PCIe but don't require an extra tag to clarify it - that's the rationale behind "rcar".

How does that sound ?

Are there any other platforms that have two different drivers for the same platform, one for PCI, and one for PCIe?

I don't think so - nonetheless it's time we agreed on something and be done with it. Bjorn expressed his opinion on this and unless we have a compelling reason not to follow it IMO it'd be better to take it.

I don't think using rcar-pcie is a disaster either.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

Let me know how you want to proceed, thanks.

/me has just returned from a bike ride, so it's time for a bike-shed

"PCI: rcar:" for pcie-rcar.c, "PCI: rcar-gen2:" (or "PCI: rcar2"?) for pci-rcar-gen2.c?

Fine by me, all agreed ?

Sounds good to me.