* [PATCH 1/8] pci-rcar-gen2: add of match table
[not found] <1390754945-28142-1-git-send-email-ben.dooks@codethink.co.uk>
@ 2014-01-26 16:48 ` Ben Dooks
2014-01-27 12:48 ` Sergei Shtylyov
0 siblings, 1 reply; 6+ messages in thread
From: Ben Dooks @ 2014-01-26 16:48 UTC (permalink / raw)
To: linux-kernel
Cc: Ben Dooks, Bjorn Helgaas, Simon Horman, linux-pci, linux-sh,
devicetree
Add OF match table for pci-rcar-gen2 driver for device tree support.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: linux-pci@vger.kernel.org
Cc: linux-sh@vger.kernel.org
Cc: devicetree@vger.kernel.org
---
drivers/pci/host/pci-rcar-gen2.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
index ceec147..ea65bac 100644
--- a/drivers/pci/host/pci-rcar-gen2.c
+++ b/drivers/pci/host/pci-rcar-gen2.c
@@ -311,9 +311,17 @@ static int __init rcar_pci_probe(struct platform_device *pdev)
return rcar_pci_add_controller(priv);
}
+static struct of_device_id rcar_pci_of_match[] = {
+ { .compatible = "renesas,pci-r8a7790", },
+ { },
+};
+
+MODULE_DEVICE_TABLE(of, rcar_pci_of_match);
+
static struct platform_driver rcar_pci_driver = {
.driver = {
.name = "pci-rcar-gen2",
+ .of_match_table = rcar_pci_of_match,
},
};
--
1.8.5.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/8] pci-rcar-gen2: add of match table
2014-01-26 16:48 ` [PATCH 1/8] pci-rcar-gen2: add of match table Ben Dooks
@ 2014-01-27 12:48 ` Sergei Shtylyov
2014-01-27 13:27 ` Ben Dooks
0 siblings, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2014-01-27 12:48 UTC (permalink / raw)
To: Ben Dooks, linux-kernel
Cc: Bjorn Helgaas, Simon Horman, linux-pci, linux-sh, devicetree
Hello.
On 26-01-2014 20:48, Ben Dooks wrote:
> Add OF match table for pci-rcar-gen2 driver for device tree support.
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: linux-pci@vger.kernel.org
> Cc: linux-sh@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> ---
> drivers/pci/host/pci-rcar-gen2.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
> diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
> index ceec147..ea65bac 100644
> --- a/drivers/pci/host/pci-rcar-gen2.c
> +++ b/drivers/pci/host/pci-rcar-gen2.c
> @@ -311,9 +311,17 @@ static int __init rcar_pci_probe(struct platform_device *pdev)
> return rcar_pci_add_controller(priv);
> }
>
> +static struct of_device_id rcar_pci_of_match[] = {
> + { .compatible = "renesas,pci-r8a7790", },
Why only H2 SoC, if the driver is for both Gen2 SoCs?
WBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/8] pci-rcar-gen2: add of match table
2014-01-27 12:48 ` Sergei Shtylyov
@ 2014-01-27 13:27 ` Ben Dooks
2014-01-29 6:17 ` Simon Horman
0 siblings, 1 reply; 6+ messages in thread
From: Ben Dooks @ 2014-01-27 13:27 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: linux-kernel, Bjorn Helgaas, Simon Horman, linux-pci, linux-sh,
devicetree
On 27/01/14 12:48, Sergei Shtylyov wrote:
> Hello.
>
> On 26-01-2014 20:48, Ben Dooks wrote:
>
>> Add OF match table for pci-rcar-gen2 driver for device tree support.
>
>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>> ---
>> Cc: Bjorn Helgaas <bhelgaas@google.com>
>> Cc: Simon Horman <horms@verge.net.au>
>> Cc: linux-pci@vger.kernel.org
>> Cc: linux-sh@vger.kernel.org
>> Cc: devicetree@vger.kernel.org
>> ---
>> drivers/pci/host/pci-rcar-gen2.c | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>
>> diff --git a/drivers/pci/host/pci-rcar-gen2.c
>> b/drivers/pci/host/pci-rcar-gen2.c
>> index ceec147..ea65bac 100644
>> --- a/drivers/pci/host/pci-rcar-gen2.c
>> +++ b/drivers/pci/host/pci-rcar-gen2.c
>> @@ -311,9 +311,17 @@ static int __init rcar_pci_probe(struct
>> platform_device *pdev)
>> return rcar_pci_add_controller(priv);
>> }
>>
>> +static struct of_device_id rcar_pci_of_match[] = {
>> + { .compatible = "renesas,pci-r8a7790", },
>
> Why only H2 SoC, if the driver is for both Gen2 SoCs?
I can add a "renesas,pci-rcar-gen2" as a fallback match however
I've not got anything other than an r8a7790 to test on. Also the
compatible properties are preferably named after the soc.
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/8] pci-rcar-gen2: add of match table
2014-01-27 13:27 ` Ben Dooks
@ 2014-01-29 6:17 ` Simon Horman
2014-01-29 10:06 ` Geert Uytterhoeven
0 siblings, 1 reply; 6+ messages in thread
From: Simon Horman @ 2014-01-29 6:17 UTC (permalink / raw)
To: Ben Dooks
Cc: Sergei Shtylyov, linux-kernel, Bjorn Helgaas, linux-pci, linux-sh,
devicetree
On Mon, Jan 27, 2014 at 01:27:09PM +0000, Ben Dooks wrote:
> On 27/01/14 12:48, Sergei Shtylyov wrote:
> >Hello.
> >
> >On 26-01-2014 20:48, Ben Dooks wrote:
> >
> >>Add OF match table for pci-rcar-gen2 driver for device tree support.
> >
> >>Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> >>---
> >>Cc: Bjorn Helgaas <bhelgaas@google.com>
> >>Cc: Simon Horman <horms@verge.net.au>
> >>Cc: linux-pci@vger.kernel.org
> >>Cc: linux-sh@vger.kernel.org
> >>Cc: devicetree@vger.kernel.org
> >>---
> >> drivers/pci/host/pci-rcar-gen2.c | 8 ++++++++
> >> 1 file changed, 8 insertions(+)
> >
> >>diff --git a/drivers/pci/host/pci-rcar-gen2.c
> >>b/drivers/pci/host/pci-rcar-gen2.c
> >>index ceec147..ea65bac 100644
> >>--- a/drivers/pci/host/pci-rcar-gen2.c
> >>+++ b/drivers/pci/host/pci-rcar-gen2.c
> >>@@ -311,9 +311,17 @@ static int __init rcar_pci_probe(struct
> >>platform_device *pdev)
> >> return rcar_pci_add_controller(priv);
> >> }
> >>
> >>+static struct of_device_id rcar_pci_of_match[] = {
> >>+ { .compatible = "renesas,pci-r8a7790", },
> >
> > Why only H2 SoC, if the driver is for both Gen2 SoCs?
>
> I can add a "renesas,pci-rcar-gen2" as a fallback match however
> I've not got anything other than an r8a7790 to test on. Also the
> compatible properties are preferably named after the soc.
I'm not sure what the "best practice" is here but I propose that
you add both "renesas,pci-rcar-gen2" and "renesas,pci-r8a7790" now.
And that "renesas,pci-r8a7791" can be added once the code has been
integrated and tested on that platform.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/8] pci-rcar-gen2: add of match table
2014-01-29 6:17 ` Simon Horman
@ 2014-01-29 10:06 ` Geert Uytterhoeven
2014-01-29 12:20 ` Simon Horman
0 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-01-29 10:06 UTC (permalink / raw)
To: Simon Horman
Cc: Ben Dooks, Sergei Shtylyov, linux-kernel, Bjorn Helgaas,
linux-pci, Linux-sh list, devicetree@vger.kernel.org
On Wed, Jan 29, 2014 at 7:17 AM, Simon Horman <horms@verge.net.au> wrote:
>> >>+static struct of_device_id rcar_pci_of_match[] = {
>> >>+ { .compatible = "renesas,pci-r8a7790", },
>> >
>> > Why only H2 SoC, if the driver is for both Gen2 SoCs?
>>
>> I can add a "renesas,pci-rcar-gen2" as a fallback match however
>> I've not got anything other than an r8a7790 to test on. Also the
>> compatible properties are preferably named after the soc.
>
> I'm not sure what the "best practice" is here but I propose that
> you add both "renesas,pci-rcar-gen2" and "renesas,pci-r8a7790" now.
To the driver or to the '90 DTS?
If the DTS says
compatible = "renesas,pci-r8a7790", "renesas,pci-rcar-gen2"
then the driver can just live with "renesas,pci-rcar-gen2" for now.
> And that "renesas,pci-r8a7791" can be added once the code has been
> integrated and tested on that platform.
And later we can add
compatible = "renesas,pci-r8a7791", "renesas,pci-rcar-gen2"
to the '91 DTS if it turns out to be compatible.
If the '91 turns out to be incompatible, or partially compatible, the driver
can be updated later to handle both "renesas,pci-r8a7790" and
"renesas,pci-r8a7791" and differentiate between them.
(That's what I was instructed to do with SPI ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/8] pci-rcar-gen2: add of match table
2014-01-29 10:06 ` Geert Uytterhoeven
@ 2014-01-29 12:20 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2014-01-29 12:20 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Ben Dooks, Sergei Shtylyov, linux-kernel, Bjorn Helgaas,
linux-pci, Linux-sh list, devicetree@vger.kernel.org
On Wed, Jan 29, 2014 at 11:06:42AM +0100, Geert Uytterhoeven wrote:
> On Wed, Jan 29, 2014 at 7:17 AM, Simon Horman <horms@verge.net.au> wrote:
> >> >>+static struct of_device_id rcar_pci_of_match[] = {
> >> >>+ { .compatible = "renesas,pci-r8a7790", },
> >> >
> >> > Why only H2 SoC, if the driver is for both Gen2 SoCs?
> >>
> >> I can add a "renesas,pci-rcar-gen2" as a fallback match however
> >> I've not got anything other than an r8a7790 to test on. Also the
> >> compatible properties are preferably named after the soc.
> >
> > I'm not sure what the "best practice" is here but I propose that
> > you add both "renesas,pci-rcar-gen2" and "renesas,pci-r8a7790" now.
>
> To the driver or to the '90 DTS?
>
> If the DTS says
>
> compatible = "renesas,pci-r8a7790", "renesas,pci-rcar-gen2"
>
> then the driver can just live with "renesas,pci-rcar-gen2" for now.
>
> > And that "renesas,pci-r8a7791" can be added once the code has been
> > integrated and tested on that platform.
>
> And later we can add
>
> compatible = "renesas,pci-r8a7791", "renesas,pci-rcar-gen2"
>
> to the '91 DTS if it turns out to be compatible.
>
> If the '91 turns out to be incompatible, or partially compatible, the driver
> can be updated later to handle both "renesas,pci-r8a7790" and
> "renesas,pci-r8a7791" and differentiate between them.
>
> (That's what I was instructed to do with SPI ;-)
Thanks, that is more or less how I thought things work :)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-01-29 12:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1390754945-28142-1-git-send-email-ben.dooks@codethink.co.uk>
2014-01-26 16:48 ` [PATCH 1/8] pci-rcar-gen2: add of match table Ben Dooks
2014-01-27 12:48 ` Sergei Shtylyov
2014-01-27 13:27 ` Ben Dooks
2014-01-29 6:17 ` Simon Horman
2014-01-29 10:06 ` Geert Uytterhoeven
2014-01-29 12:20 ` Simon Horman
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).