diff mbox series

[5.10,212/717] platform/x86: mlx-platform: Remove PSU EEPROM from MSN274x platform configuration

Message ID 20201228125031.129265421@linuxfoundation.org
State Superseded
Headers show
Series None | expand

Commit Message

Greg Kroah-Hartman Dec. 28, 2020, 12:43 p.m. UTC
From: Vadim Pasternak <vadimp@nvidia.com>

[ Upstream commit 912b341585e302ee44fc5a2733f7bcf505e2c86f ]

Remove PSU EEPROM configuration for systems class equipped with
Mellanox chip Spectrum and ATOM CPU - system types MSN274x. Till now
all the systems from this class used few types of power units, all
equipped with EEPROM device with address space two bytes. Thus, all
these devices have been handled by EEPROM driver "24c02".

There is a new requirement is to support power unit replacement by "off
the shelf" device, matching electrical required parameters. Such device
can be equipped with different EEPROM type, which could be one byte
address space addressing or even could be not equipped with EEPROM.
In such case "24c02" will not work.

Fixes: ef08e14a3 ("platform/x86: mlx-platform: Add support for new msn274x system type")
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20201125101056.174708-3-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/platform/x86/mlx-platform.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Nathan Chancellor Dec. 29, 2020, 7:01 p.m. UTC | #1
On Mon, Dec 28, 2020 at 01:43:30PM +0100, Greg Kroah-Hartman wrote:
> From: Vadim Pasternak <vadimp@nvidia.com>

> 

> [ Upstream commit 912b341585e302ee44fc5a2733f7bcf505e2c86f ]

> 

> Remove PSU EEPROM configuration for systems class equipped with

> Mellanox chip Spectrum and ATOM CPU - system types MSN274x. Till now

> all the systems from this class used few types of power units, all

> equipped with EEPROM device with address space two bytes. Thus, all

> these devices have been handled by EEPROM driver "24c02".

> 

> There is a new requirement is to support power unit replacement by "off

> the shelf" device, matching electrical required parameters. Such device

> can be equipped with different EEPROM type, which could be one byte

> address space addressing or even could be not equipped with EEPROM.

> In such case "24c02" will not work.

> 

> Fixes: ef08e14a3 ("platform/x86: mlx-platform: Add support for new msn274x system type")

> Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>

> Link: https://lore.kernel.org/r/20201125101056.174708-3-vadimp@nvidia.com

> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

> Signed-off-by: Sasha Levin <sashal@kernel.org>

> ---

>  drivers/platform/x86/mlx-platform.c | 6 ++----

>  1 file changed, 2 insertions(+), 4 deletions(-)

> 

> diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c

> index 623e7f737d4ab..598f445587649 100644

> --- a/drivers/platform/x86/mlx-platform.c

> +++ b/drivers/platform/x86/mlx-platform.c

> @@ -601,15 +601,13 @@ static struct mlxreg_core_data mlxplat_mlxcpld_msn274x_psu_items_data[] = {

>  		.label = "psu1",

>  		.reg = MLXPLAT_CPLD_LPC_REG_PSU_OFFSET,

>  		.mask = BIT(0),

> -		.hpdev.brdinfo = &mlxplat_mlxcpld_psu[0],

> -		.hpdev.nr = MLXPLAT_CPLD_PSU_MSNXXXX_NR,

> +		.hpdev.nr = MLXPLAT_CPLD_NR_NONE,

>  	},

>  	{

>  		.label = "psu2",

>  		.reg = MLXPLAT_CPLD_LPC_REG_PSU_OFFSET,

>  		.mask = BIT(1),

> -		.hpdev.brdinfo = &mlxplat_mlxcpld_psu[1],

> -		.hpdev.nr = MLXPLAT_CPLD_PSU_MSNXXXX_NR,

> +		.hpdev.nr = MLXPLAT_CPLD_NR_NONE,

>  	},

>  };

>  

> -- 

> 2.27.0

> 

> 

> 


Please pick up eca6ba20f38c ("platform/x86: mlx-platform: remove an
unused variable") everywhere that this patch was applied to avoid
introducing a new clang warning.

Cheers,
Nathan
Greg Kroah-Hartman Dec. 30, 2020, 9:29 a.m. UTC | #2
On Tue, Dec 29, 2020 at 12:01:44PM -0700, Nathan Chancellor wrote:
> On Mon, Dec 28, 2020 at 01:43:30PM +0100, Greg Kroah-Hartman wrote:

> > From: Vadim Pasternak <vadimp@nvidia.com>

> > 

> > [ Upstream commit 912b341585e302ee44fc5a2733f7bcf505e2c86f ]

> > 

> > Remove PSU EEPROM configuration for systems class equipped with

> > Mellanox chip Spectrum and ATOM CPU - system types MSN274x. Till now

> > all the systems from this class used few types of power units, all

> > equipped with EEPROM device with address space two bytes. Thus, all

> > these devices have been handled by EEPROM driver "24c02".

> > 

> > There is a new requirement is to support power unit replacement by "off

> > the shelf" device, matching electrical required parameters. Such device

> > can be equipped with different EEPROM type, which could be one byte

> > address space addressing or even could be not equipped with EEPROM.

> > In such case "24c02" will not work.

> > 

> > Fixes: ef08e14a3 ("platform/x86: mlx-platform: Add support for new msn274x system type")

> > Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>

> > Link: https://lore.kernel.org/r/20201125101056.174708-3-vadimp@nvidia.com

> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>

> > Signed-off-by: Sasha Levin <sashal@kernel.org>

> > ---

> >  drivers/platform/x86/mlx-platform.c | 6 ++----

> >  1 file changed, 2 insertions(+), 4 deletions(-)

> > 

> > diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c

> > index 623e7f737d4ab..598f445587649 100644

> > --- a/drivers/platform/x86/mlx-platform.c

> > +++ b/drivers/platform/x86/mlx-platform.c

> > @@ -601,15 +601,13 @@ static struct mlxreg_core_data mlxplat_mlxcpld_msn274x_psu_items_data[] = {

> >  		.label = "psu1",

> >  		.reg = MLXPLAT_CPLD_LPC_REG_PSU_OFFSET,

> >  		.mask = BIT(0),

> > -		.hpdev.brdinfo = &mlxplat_mlxcpld_psu[0],

> > -		.hpdev.nr = MLXPLAT_CPLD_PSU_MSNXXXX_NR,

> > +		.hpdev.nr = MLXPLAT_CPLD_NR_NONE,

> >  	},

> >  	{

> >  		.label = "psu2",

> >  		.reg = MLXPLAT_CPLD_LPC_REG_PSU_OFFSET,

> >  		.mask = BIT(1),

> > -		.hpdev.brdinfo = &mlxplat_mlxcpld_psu[1],

> > -		.hpdev.nr = MLXPLAT_CPLD_PSU_MSNXXXX_NR,

> > +		.hpdev.nr = MLXPLAT_CPLD_NR_NONE,

> >  	},

> >  };

> >  

> > -- 

> > 2.27.0

> > 

> > 

> > 

> 

> Please pick up eca6ba20f38c ("platform/x86: mlx-platform: remove an

> unused variable") everywhere that this patch was applied to avoid

> introducing a new clang warning.


Now queued up, thanks.

greg k-h
diff mbox series

Patch

diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index 623e7f737d4ab..598f445587649 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -601,15 +601,13 @@  static struct mlxreg_core_data mlxplat_mlxcpld_msn274x_psu_items_data[] = {
 		.label = "psu1",
 		.reg = MLXPLAT_CPLD_LPC_REG_PSU_OFFSET,
 		.mask = BIT(0),
-		.hpdev.brdinfo = &mlxplat_mlxcpld_psu[0],
-		.hpdev.nr = MLXPLAT_CPLD_PSU_MSNXXXX_NR,
+		.hpdev.nr = MLXPLAT_CPLD_NR_NONE,
 	},
 	{
 		.label = "psu2",
 		.reg = MLXPLAT_CPLD_LPC_REG_PSU_OFFSET,
 		.mask = BIT(1),
-		.hpdev.brdinfo = &mlxplat_mlxcpld_psu[1],
-		.hpdev.nr = MLXPLAT_CPLD_PSU_MSNXXXX_NR,
+		.hpdev.nr = MLXPLAT_CPLD_NR_NONE,
 	},
 };