提交 d066f144 编写于 作者: V Vadim Pasternak 提交者: Darren Hart (VMware)

platform/x86: mlx-platform: Use define for the channel numbers

Add define for the channels number for mux device, instead of using
hardcoded value inside the code in order to improve code readability.
Signed-off-by: NVadim Pasternak <vadimp@mellanox.com>
Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
上级 502ab004
...@@ -85,6 +85,9 @@ ...@@ -85,6 +85,9 @@
#define MLXPLAT_CPLD_FAN_MASK GENMASK(3, 0) #define MLXPLAT_CPLD_FAN_MASK GENMASK(3, 0)
#define MLXPLAT_CPLD_FAN_NG_MASK GENMASK(5, 0) #define MLXPLAT_CPLD_FAN_NG_MASK GENMASK(5, 0)
/* Number of channels in group */
#define MLXPLAT_CPLD_GRP_CHNL_NUM 8
/* Start channel numbers */ /* Start channel numbers */
#define MLXPLAT_CPLD_CH1 2 #define MLXPLAT_CPLD_CH1 2
#define MLXPLAT_CPLD_CH2 10 #define MLXPLAT_CPLD_CH2 10
...@@ -124,7 +127,7 @@ static const struct resource mlxplat_lpc_resources[] = { ...@@ -124,7 +127,7 @@ static const struct resource mlxplat_lpc_resources[] = {
}; };
/* Platform default channels */ /* Platform default channels */
static const int mlxplat_default_channels[][8] = { static const int mlxplat_default_channels[][MLXPLAT_CPLD_GRP_CHNL_NUM] = {
{ {
MLXPLAT_CPLD_CH1, MLXPLAT_CPLD_CH1 + 1, MLXPLAT_CPLD_CH1 + 2, MLXPLAT_CPLD_CH1, MLXPLAT_CPLD_CH1 + 1, MLXPLAT_CPLD_CH1 + 2,
MLXPLAT_CPLD_CH1 + 3, MLXPLAT_CPLD_CH1 + 4, MLXPLAT_CPLD_CH1 + MLXPLAT_CPLD_CH1 + 3, MLXPLAT_CPLD_CH1 + 4, MLXPLAT_CPLD_CH1 +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册