[PATCH 2/4] EDAC, altera: update driver to reflect hw/yaml

Matthew Gerlach posted 4 patches 9 months ago
There is a newer version of this series
[PATCH 2/4] EDAC, altera: update driver to reflect hw/yaml
Posted by Matthew Gerlach 9 months ago
The device tree subnodes, and hardware, for the eccmgr are
the same for Arria10, Stratix10, and Agilex. Update driver
to allow the subnodes to be allowed for "altr,socfpga-s10-ecc-manager".

Signed-off-by: Matthew Gerlach <matthew.gerlach@altera.com>
---
 drivers/edac/altera_edac.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index 3e971f902363..895a5beb700f 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -1030,6 +1030,9 @@ static int __init __maybe_unused altr_init_a10_ecc_device_type(char *compat)
 
 	np = of_find_compatible_node(NULL, NULL,
 				     "altr,socfpga-a10-ecc-manager");
+	if (!np)
+		np = of_find_compatible_node(NULL, NULL,
+					     "altr,socfpga-s10-ecc-manager");
 	if (!np) {
 		edac_printk(KERN_ERR, EDAC_DEVICE, "ECC Manager not found\n");
 		return -ENODEV;
-- 
2.35.3
Re: [PATCH 2/4] EDAC, altera: update driver to reflect hw/yaml
Posted by Borislav Petkov 9 months ago
On Thu, Mar 20, 2025 at 09:46:20AM -0700, Matthew Gerlach wrote:
> The device tree subnodes, and hardware, for the eccmgr are
> the same for Arria10, Stratix10, and Agilex. Update driver
> to allow the subnodes to be allowed for "altr,socfpga-s10-ecc-manager".
> 
> Signed-off-by: Matthew Gerlach <matthew.gerlach@altera.com>
> ---
>  drivers/edac/altera_edac.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
> index 3e971f902363..895a5beb700f 100644
> --- a/drivers/edac/altera_edac.c
> +++ b/drivers/edac/altera_edac.c
> @@ -1030,6 +1030,9 @@ static int __init __maybe_unused altr_init_a10_ecc_device_type(char *compat)
>  
>  	np = of_find_compatible_node(NULL, NULL,
>  				     "altr,socfpga-a10-ecc-manager");
> +	if (!np)
> +		np = of_find_compatible_node(NULL, NULL,
> +					     "altr,socfpga-s10-ecc-manager");

Please slap a comment above this here - one can see the difference between the
two calls only after staring at them for a couple of minutes and wonder
where's Waldo.

:-P

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Re: [PATCH 2/4] EDAC, altera: update driver to reflect hw/yaml
Posted by Gerlach, Matthew 8 months, 4 weeks ago
On 3/21/2025 2:12 PM, Borislav Petkov wrote:
> On Thu, Mar 20, 2025 at 09:46:20AM -0700, Matthew Gerlach wrote:
> > The device tree subnodes, and hardware, for the eccmgr are
> > the same for Arria10, Stratix10, and Agilex. Update driver
> > to allow the subnodes to be allowed for "altr,socfpga-s10-ecc-manager".
> > 
> > Signed-off-by: Matthew Gerlach <matthew.gerlach@altera.com>
> > ---
> >  drivers/edac/altera_edac.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
> > index 3e971f902363..895a5beb700f 100644
> > --- a/drivers/edac/altera_edac.c
> > +++ b/drivers/edac/altera_edac.c
> > @@ -1030,6 +1030,9 @@ static int __init __maybe_unused altr_init_a10_ecc_device_type(char *compat)
> >  
> >  	np = of_find_compatible_node(NULL, NULL,
> >  				     "altr,socfpga-a10-ecc-manager");
> > +	if (!np)
> > +		np = of_find_compatible_node(NULL, NULL,
> > +					     "altr,socfpga-s10-ecc-manager");
>
> Please slap a comment above this here - one can see the difference between the
> two calls only after staring at them for a couple of minutes and wonder
> where's Waldo.

Adding a comment is a very good suggestion. On the other hand, Rob 
Herring and Krzysztof Kozlowski pointed out that this change represents 
a change in the ABI which should be avoided. This change won't be part 
of v2.

>
> :-P
>
> Thx.


Thanks for the feedback,

Matthew Gerlach