-
Notifications
You must be signed in to change notification settings - Fork 180
[202012]Add config3 register which is used to get COMEX CPU board version #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
patch/0153-platform-mellanox-Add-config3-register-support.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
From bf9905c1e297307b86d87a809bd42f343bd20cf6 Mon Sep 17 00:00:00 2001 | ||
From: Oleksandr Shamray <[email protected]> | ||
Date: Mon, 20 Jun 2022 16:02:14 +0300 | ||
Subject: [PATCH] platform: mellanox: Add config3 register support | ||
|
||
Add config3 register which is using to get COMEX CPU board version | ||
|
||
Signed-off-by: Oleksandr Shamray <[email protected]> | ||
--- | ||
drivers/platform/x86/mlx-platform.c | 9 +++++++++ | ||
1 file changed, 9 insertions(+) | ||
|
||
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c | ||
index defa87b44..ee4f8c7c6 100644 | ||
--- a/drivers/platform/x86/mlx-platform.c | ||
+++ b/drivers/platform/x86/mlx-platform.c | ||
@@ -105,6 +105,7 @@ | ||
#define MLXPLAT_CPLD_LPC_REG_PSU_I2C_CAP_OFFSET 0xf9 | ||
#define MLXPLAT_CPLD_LPC_REG_CONFIG1_OFFSET 0xfb | ||
#define MLXPLAT_CPLD_LPC_REG_CONFIG2_OFFSET 0xfc | ||
+#define MLXPLAT_CPLD_LPC_REG_CONFIG3_OFFSET 0xfd | ||
#define MLXPLAT_CPLD_LPC_IO_RANGE 0x100 | ||
#define MLXPLAT_CPLD_LPC_I2C_CH1_OFF 0xdb | ||
#define MLXPLAT_CPLD_LPC_I2C_CH2_OFF 0xda | ||
@@ -1806,6 +1807,12 @@ static struct mlxreg_core_data mlxplat_mlxcpld_default_ng_regs_io_data[] = { | ||
.bit = GENMASK(7, 0), | ||
.mode = 0444, | ||
}, | ||
+ { | ||
+ .label = "config3", | ||
+ .reg = MLXPLAT_CPLD_LPC_REG_CONFIG3_OFFSET, | ||
+ .bit = GENMASK(7, 0), | ||
+ .mode = 0444, | ||
+ }, | ||
{ | ||
.label = "ufm_version", | ||
.reg = MLXPLAT_CPLD_LPC_REG_UFM_VERSION_OFFSET, | ||
@@ -2267,6 +2274,7 @@ static bool mlxplat_mlxcpld_readable_reg(struct device *dev, unsigned int reg) | ||
case MLXPLAT_CPLD_LPC_REG_PSU_I2C_CAP_OFFSET: | ||
case MLXPLAT_CPLD_LPC_REG_CONFIG1_OFFSET: | ||
case MLXPLAT_CPLD_LPC_REG_CONFIG2_OFFSET: | ||
+ case MLXPLAT_CPLD_LPC_REG_CONFIG3_OFFSET: | ||
case MLXPLAT_CPLD_LPC_REG_UFM_VERSION_OFFSET: | ||
return true; | ||
} | ||
@@ -2350,6 +2358,7 @@ static bool mlxplat_mlxcpld_volatile_reg(struct device *dev, unsigned int reg) | ||
case MLXPLAT_CPLD_LPC_REG_PSU_I2C_CAP_OFFSET: | ||
case MLXPLAT_CPLD_LPC_REG_CONFIG1_OFFSET: | ||
case MLXPLAT_CPLD_LPC_REG_CONFIG2_OFFSET: | ||
+ case MLXPLAT_CPLD_LPC_REG_CONFIG3_OFFSET: | ||
case MLXPLAT_CPLD_LPC_REG_UFM_VERSION_OFFSET: | ||
return true; | ||
} | ||
-- | ||
2.20.1 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see this change in Linus’ master branch. Please mention the upstream status.