powerpc/common/vsc3316: remove const from vsc3316_config parameter define
PATCH v2 1/1 powerpc/common/vsc3316: remove const from vsc3316_config parameter define
Since the parameters need to be modified according to different Serdes protocols at runtime, the const will block this. Also remove const from arrays define used by vsc3316_config.
---
changes for V2:
1. changed subject;
2. fix broken on B4xxx boards;
board/freescale/b4860qds/b4860qds_crossbar_con.h | 12 ++++++------ board/freescale/common/vsc3316_3308.c | 2 +- board/freescale/common/vsc3316_3308.h | 2 +- board/freescale/t4qds/t4qds.c | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-)
board/freescale/b4860qds/b4860qds_crossbar_con.h +6 -6
@@ -13,10 +13,10 @@static const int8_t vsc16_tx_amc[8 ][2 ] = { {15 ,3 }, {0 ,2 }, {7 ,4 }, {9 ,10 }, {5 ,11 }, {4 ,5 }, {2 ,6 }, {12 ,9 } }; -static const int8_t vsc16_tx_sfp[8 ][2 ] = { {15 ,7 }, {0 ,1 }, {7 ,8 }, {9 ,0 }, +static int8_t vsc16_tx_sfp[8 ][2 ] = { {15 ,7 }, {0 ,1 }, {7 ,8 }, {9 ,0 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 } }; -static const int8_t vsc16_tx_4sfp_sgmii_12_56[8 ][2 ] = { {15 ,7 }, {0 ,1 }, +static int8_t vsc16_tx_4sfp_sgmii_12_56[8 ][2 ] = { {15 ,7 }, {0 ,1 }, {7 ,8 }, {9 ,0 }, {2 ,14 }, {12 ,15 }, {-1 ,-1 }, {-1 ,-1 } };
@@ -25,7 +25,7 @@ static const int8_t vsc16_tx_4sfp_sgmii_34[8][2] = { {15, 7}, {0, 1}, {-1, -1}, {-1, -1} };#ifdef CONFIG_PPC_B4420 -static const int8_t vsc16_tx_sgmii_lane_cd[8 ][2 ] = { {5 ,14 }, {4 ,15 }, +static int8_t vsc16_tx_sgmii_lane_cd[8 ][2 ] = { {5 ,14 }, {4 ,15 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 } };#endif
@@ -35,10 +35,10 @@ static const int8_t vsc16_tx_aurora[8][2] = { {2, 13}, {12, 12}, {-1, -1},static const int8_t vsc16_rx_amc[8 ][2 ] = { {3 ,15 }, {2 ,1 }, {4 ,8 }, {10 ,9 }, {11 ,11 }, {5 ,10 }, {6 ,3 }, {9 ,12 } }; -static const int8_t vsc16_rx_sfp[8 ][2 ] = { {8 ,15 }, {0 ,1 }, {7 ,8 }, {1 ,9 }, +static int8_t vsc16_rx_sfp[8 ][2 ] = { {8 ,15 }, {0 ,1 }, {7 ,8 }, {1 ,9 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 } }; -static const int8_t vsc16_rx_4sfp_sgmii_12_56[8 ][2 ] = { {8 ,15 }, {0 ,1 }, +static int8_t vsc16_rx_4sfp_sgmii_12_56[8 ][2 ] = { {8 ,15 }, {0 ,1 }, {7 ,8 }, {1 ,9 }, {14 ,3 }, {15 ,12 }, {-1 ,-1 }, {-1 ,-1 } };
@@ -47,7 +47,7 @@ static const int8_t vsc16_rx_4sfp_sgmii_34[8][2] = { {8, 15}, {0, 1}, {-1, -1}, {-1, -1} };#ifdef CONFIG_PPC_B4420 -static const int8_t vsc16_rx_sgmii_lane_cd[8 ][2 ] = { {14 ,11 }, {15 ,10 }, +static int8_t vsc16_rx_sgmii_lane_cd[8 ][2 ] = { {14 ,11 }, {15 ,10 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 } };#endif
board/freescale/common/vsc3316_3308.c +1 -1
@@ -31,7 +31,7 @@ int vsc_if_enable(unsigned int vsc_addr)return i2c_write (vsc_addr,INTERFACE_MODE_REG ,1 , &data,1 ); } -int vsc3316_config (unsigned int vsc_addr,const int8_t con_arr[][2 ], +int vsc3316_config (unsigned int vsc_addr,int8_t con_arr[][2 ],unsigned int num_con) {unsigned int i;
board/freescale/common/vsc3316_3308.h +1 -1
@@ -12,7 +12,7 @@#include <errno.h> int vsc_if_enable (unsigned int vsc_addr); -int vsc3316_config (unsigned int vsc_addr,const int8_t con_arr[][2 ], +int vsc3316_config (unsigned int vsc_addr,int8_t con_arr[][2 ],unsigned int num_con);int vsc3308_config (unsigned int vsc_addr,const int8_t con_arr[][2 ],unsigned int num_con);
board/freescale/t4qds/t4qds.c +4 -4
@@ -26,16 +26,16 @@DECLARE_GLOBAL_DATA_PTR ; -static const int8_t vsc3316_fsm1_tx[8 ][2 ] = { {0 ,0 }, {1 ,1 }, {6 ,6 }, {7 ,7 }, +static int8_t vsc3316_fsm1_tx[8 ][2 ] = { {0 ,0 }, {1 ,1 }, {6 ,6 }, {7 ,7 }, {8 ,8 }, {9 ,9 }, {14 ,14 }, {15 ,15 } }; -static const int8_t vsc3316_fsm2_tx[8 ][2 ] = { {2 ,2 }, {3 ,3 }, {4 ,4 }, {5 ,5 }, +static int8_t vsc3316_fsm2_tx[8 ][2 ] = { {2 ,2 }, {3 ,3 }, {4 ,4 }, {5 ,5 }, {10 ,10 }, {11 ,11 }, {12 ,12 }, {13 ,13 } }; -static const int8_t vsc3316_fsm1_rx[8 ][2 ] = { {2 ,12 }, {3 ,13 }, {4 ,5 }, {5 ,4 }, +static int8_t vsc3316_fsm1_rx[8 ][2 ] = { {2 ,12 }, {3 ,13 }, {4 ,5 }, {5 ,4 }, {10 ,11 }, {11 ,10 }, {12 ,2 }, {13 ,3 } }; -static const int8_t vsc3316_fsm2_rx[8 ][2 ] = { {0 ,15 }, {1 ,14 }, {6 ,7 }, {7 ,6 }, +static int8_t vsc3316_fsm2_rx[8 ][2 ] = { {0 ,15 }, {1 ,14 }, {6 ,7 }, {7 ,6 }, {8 ,9 }, {9 ,8 }, {14 ,1 }, {15 ,0 } };int checkboard (void )
Signature · 1 line
1.8.0
PATCH v2 1/1 powerpc/common/vsc3316: remove const from vsc3316_config parameter define
Quoted 6 lines · Shaohui Xie
Since the parameters need to be modified according to different Serdes protocols at runtime, the const will block this. Also remove const from arrays define used by
vsc3316_config.Signed-off-by Shaohui Xie <[email protected]>---
Tom,
I am trying to search for this and other patches we received through the list on patchwork, but I couldn't find them. Actually I couldn't find any patch sent by Shaohui recently.
York
PATCH v2 1/1 powerpc/common/vsc3316: remove const from vsc3316_config parameter define
In reply to Shaohui XieQuoted 106 lines · Shaohui Xie
Since the parameters need to be modified according to different Serdes protocols at runtime, the const will block this. Also remove const from arrays define used by
vsc3316_config.Signed-off-by Shaohui Xie <[email protected]>---
changes for V2:
1. changed subject;
2. fix broken on B4xxx boards;board/freescale/b4860qds/b4860qds_crossbar_con.h | 12 ++++++------ board/freescale/common/vsc3316_3308.c | 2 +- board/freescale/common/vsc3316_3308.h | 2 +- board/freescale/t4qds/t4qds.c | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-)board/freescale/b4860qds/b4860qds_crossbar_con.h +6
-6@@ -13,10 +13,10 @@static const int8_t vsc16_tx_amc[8 ][2 ] = { {15 ,3 }, {0 ,2 }, {7 ,4 }, {9 ,10 }, {5 ,11 }, {4 ,5 }, {2 ,6 }, {12 ,9 } }; -static const int8_t vsc16_tx_sfp[8 ][2 ] = { {15 ,7 }, {0 ,1 }, {7 ,8 }, {9 ,0 }, +static int8_t vsc16_tx_sfp[8 ][2 ] = { {15 ,7 }, {0 ,1 }, {7 ,8 }, {9 ,0 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 } }; -static const int8_t vsc16_tx_4sfp_sgmii_12_56[8 ][2 ] = { {15 ,7 }, {0 ,1 }, +static int8_t vsc16_tx_4sfp_sgmii_12_56[8 ][2 ] = { {15 ,7 }, {0 ,1 }, {7 ,8 }, {9 ,0 }, {2 ,14 }, {12 ,15 }, {-1 ,-1 }, {-1 ,-1 } };@@ -25,7 +25,7 @@ static const int8_t vsc16_tx_4sfp_sgmii_34[8][2] = { {15, 7}, {0, 1}, {-1, -1}, {-1, -1} };#ifdef CONFIG_PPC_B4420 -static const int8_t vsc16_tx_sgmii_lane_cd[8 ][2 ] = { {5 ,14 }, {4 ,15 }, +static int8_t vsc16_tx_sgmii_lane_cd[8 ][2 ] = { {5 ,14 }, {4 ,15 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 } };#endif @@ -35,10 +35,10 @@ static const int8_t vsc16_tx_aurora[8][2] = { {2, 13}, {12, 12}, {-1, -1},static const int8_t vsc16_rx_amc[8 ][2 ] = { {3 ,15 }, {2 ,1 }, {4 ,8 }, {10 ,9 }, {11 ,11 }, {5 ,10 }, {6 ,3 }, {9 ,12 } }; -static const int8_t vsc16_rx_sfp[8 ][2 ] = { {8 ,15 }, {0 ,1 }, {7 ,8 }, {1 ,9 }, +static int8_t vsc16_rx_sfp[8 ][2 ] = { {8 ,15 }, {0 ,1 }, {7 ,8 }, {1 ,9 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 } }; -static const int8_t vsc16_rx_4sfp_sgmii_12_56[8 ][2 ] = { {8 ,15 }, {0 ,1 }, +static int8_t vsc16_rx_4sfp_sgmii_12_56[8 ][2 ] = { {8 ,15 }, {0 ,1 }, {7 ,8 }, {1 ,9 }, {14 ,3 }, {15 ,12 }, {-1 ,-1 }, {-1 ,-1 } };@@ -47,7 +47,7 @@ static const int8_t vsc16_rx_4sfp_sgmii_34[8][2] = { {8, 15}, {0, 1}, {-1, -1}, {-1, -1} };#ifdef CONFIG_PPC_B4420 -static const int8_t vsc16_rx_sgmii_lane_cd[8 ][2 ] = { {14 ,11 }, {15 ,10 }, +static int8_t vsc16_rx_sgmii_lane_cd[8 ][2 ] = { {14 ,11 }, {15 ,10 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 }, {-1 ,-1 } };#endif board/freescale/common/vsc3316_3308.c +1
-1@@ -31,7 +31,7 @@ int vsc_if_enable(unsigned int vsc_addr)return i2c_write (vsc_addr,INTERFACE_MODE_REG ,1 , &data,1 ); } -int vsc3316_config (unsigned int vsc_addr,const int8_t con_arr[][2 ], +int vsc3316_config (unsigned int vsc_addr,int8_t con_arr[][2 ],unsigned int num_con) {unsigned int i;board/freescale/common/vsc3316_3308.h +1
-1@@ -12,7 +12,7 @@#include <errno.h> int vsc_if_enable (unsigned int vsc_addr); -int vsc3316_config (unsigned int vsc_addr,const int8_t con_arr[][2 ], +int vsc3316_config (unsigned int vsc_addr,int8_t con_arr[][2 ],unsigned int num_con);int vsc3308_config (unsigned int vsc_addr,const int8_t con_arr[][2 ],unsigned int num_con);board/freescale/t4qds/t4qds.c +2
-2@@ -26,16 +26,16 @@DECLARE_GLOBAL_DATA_PTR ; -static const int8_t vsc3316_fsm1_tx[8 ][2 ] = { {0 ,0 }, {1 ,1 }, {6 ,6 }, {7 ,7 }, +static int8_t vsc3316_fsm1_tx[8 ][2 ] = { {0 ,0 }, {1 ,1 }, {6 ,6 }, {7 ,7 }, {8 ,8 }, {9 ,9 }, {14 ,14 }, {15 ,15 } }; -static const int8_t vsc3316_fsm2_tx[8 ][2 ] = { {2 ,2 }, {3 ,3 }, {4 ,4 }, {5 ,5 }, +static int8_t vsc3316_fsm2_tx[8 ][2 ] = { {2 ,2 }, {3 ,3 }, {4 ,4 }, {5 ,5 }, {10 ,10 }, {11 ,11 }, {12 ,12 }, {13 ,13 } };
board/freescale/t4qds/t4qds.c line 41
Quoted 10 lines
board/freescale/t4qds/t4qds.c +2
-2-static const int8_t vsc3316_fsm1_rx[8 ][2 ] = { {2 ,12 }, {3 ,13 }, {4 ,5 }, {5 ,4 }, +static int8_t vsc3316_fsm1_rx[8 ][2 ] = { {2 ,12 }, {3 ,13 }, {4 ,5 }, {5 ,4 }, {10 ,11 }, {11 ,10 }, {12 ,2 }, {13 ,3 } }; -static const int8_t vsc3316_fsm2_rx[8 ][2 ] = { {0 ,15 }, {1 ,14 }, {6 ,7 }, {7 ,6 }, +static int8_t vsc3316_fsm2_rx[8 ][2 ] = { {0 ,15 }, {1 ,14 }, {6 ,7 }, {7 ,6 }, {8 ,9 }, {9 ,8 }, {14 ,1 }, {15 ,0 } };int checkboard (void )
Shaohui,
Please rebase your patch to latest master branch.
(I keep the whole patch in this replay, hoping patchwork can catch it this time)
York