am64x/am243x: hdsl: Add versioning in firmware

- Update the version to 0.2
- Use the VERSION and VERSION2 register
- Remove the hardcoding from driver

Fixes: PINDSW-6518

Signed-off-by: Dhaval Khandla <dhavaljk@ti.com>
This commit is contained in:
Dhaval Khandla 2023-08-22 11:58:30 +05:30
parent 7605041284
commit 36a591f12b
4 changed files with 31 additions and 14 deletions

View File

@ -1283,7 +1283,6 @@ static void hdsl_configure_register_if(HDSL_Handle hdslHandle)
hdslHandle->hdslInterface->MAXDEV_L = 0x0; hdslHandle->hdslInterface->MAXDEV_L = 0x0;
hdslHandle->hdslInterface->MAXDEV_H_THRES = 0xFF; hdslHandle->hdslInterface->MAXDEV_H_THRES = 0xFF;
hdslHandle->hdslInterface->MAXDEV_L_THRES = 0xFF; hdslHandle->hdslInterface->MAXDEV_L_THRES = 0xFF;
hdslHandle->hdslInterface->VERSION = 0x41;
hdslHandle->hdslInterface->ACC_ERR_CNT_THRES = 0x1F; hdslHandle->hdslInterface->ACC_ERR_CNT_THRES = 0x1F;
HW_WR_REG32(((uint32_t)(hdslHandle->baseMemAddr) + 0xac), 0x4cc8115d); HW_WR_REG32(((uint32_t)(hdslHandle->baseMemAddr) + 0xac), 0x4cc8115d);

View File

@ -70,6 +70,12 @@ datalink_reset:
.else .else
TX_CLK_DIV CLKDIV_NORMAL, REG_TMP0 TX_CLK_DIV CLKDIV_NORMAL, REG_TMP0
.endif .endif
; set the VERSION and VERSION2 register
ldi REG_TMP0.b0, ICSS_FIRMWARE_RELEASE
sbco &REG_TMP0.b0, MASTER_REGS_CONST, VERSION, 1
sbco &REG_TMP0.b0, MASTER_REGS_CONST, VERSION2, 1
zero &H_FRAME, (4*2) zero &H_FRAME, (4*2)
;init transport layer here ;init transport layer here
CALL transport_init CALL transport_init

View File

@ -30,6 +30,15 @@
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
; ;
;Firmware version
FIRMWARE_VERSION_CODING .set 0x1
; bit5..4 major number
FIRMWARE_VERSION_MAJOR .set 0x0
; bit3..0 minor number
FIRMWARE_VERSION_MINOR .set 0x2
ICSS_FIRMWARE_RELEASE .set ((FIRMWARE_VERSION_CODING << 6) | (FIRMWARE_VERSION_MAJOR << 4) | (FIRMWARE_VERSION_MINOR << 0))
;number of cycles for 1 bit ;number of cycles for 1 bit
.if $defined("FREERUN_300_MHZ") .if $defined("FREERUN_300_MHZ")
;number of cycles for 1 bit ;number of cycles for 1 bit

View File

@ -55,7 +55,7 @@
*/ */
const unsigned int Hiperface_DSL2_0[]= { const unsigned int Hiperface_DSL2_0[]= {
0x21067a00, 0x21067d00,
0x24000125, 0x24000125,
0x2eff818f, 0x2eff818f,
0x24001d8d, 0x24001d8d,
@ -530,7 +530,7 @@ const unsigned int Hiperface_DSL2_0[]= {
0x511f0d03, 0x511f0d03,
0x51190d02, 0x51190d02,
0x79000003, 0x79000003,
0x230641d1, 0x230644d1,
0x7900001a, 0x7900001a,
0xd104ff00, 0xd104ff00,
0xd703ffff, 0xd703ffff,
@ -933,7 +933,7 @@ const unsigned int Hiperface_DSL2_0[]= {
0x24003001, 0x24003001,
0xd1066b0e, 0xd1066b0e,
0x2400010d, 0x2400010d,
0x23066cd1, 0x23066fd1,
0x68ab8d45, 0x68ab8d45,
0x13803b3b, 0x13803b3b,
0x913d1880, 0x913d1880,
@ -946,7 +946,7 @@ const unsigned int Hiperface_DSL2_0[]= {
0x81531800, 0x81531800,
0x7900003b, 0x7900003b,
0x2400020d, 0x2400020d,
0x23066cd1, 0x23066fd1,
0x688b8d38, 0x688b8d38,
0x8137184b, 0x8137184b,
0x13803b3b, 0x13803b3b,
@ -989,7 +989,7 @@ const unsigned int Hiperface_DSL2_0[]= {
0x1d09c4c4, 0x1d09c4c4,
0x2400040d, 0x2400040d,
0x24003001, 0x24003001,
0x23066cd1, 0x23066fd1,
0x15ff8d9c, 0x15ff8d9c,
0x69005c34, 0x69005c34,
0x51009c33, 0x51009c33,
@ -1339,6 +1339,9 @@ const unsigned int Hiperface_DSL2_0[]= {
0x81080580, 0x81080580,
0x24001fc0, 0x24001fc0,
0x810605c0, 0x810605c0,
0x24004200,
0x810b1800,
0x81441800,
0x2eff8383, 0x2eff8383,
0x23027c9d, 0x23027c9d,
0x24000866, 0x24000866,
@ -1370,7 +1373,7 @@ const unsigned int Hiperface_DSL2_0[]= {
0x9101185b, 0x9101185b,
0x51005b0e, 0x51005b0e,
0x7900000d, 0x7900000d,
0x230629d1, 0x23062cd1,
0x91dc388c, 0x91dc388c,
0x240000e2, 0x240000e2,
0x91e21882, 0x91e21882,
@ -1378,7 +1381,7 @@ const unsigned int Hiperface_DSL2_0[]= {
0x100c0c2a, 0x100c0c2a,
0x106c6c4a, 0x106c6c4a,
0x102c2c6a, 0x102c2c6a,
0x230629d1, 0x23062cd1,
0x0b01e2e2, 0x0b01e2e2,
0x0501e2e2, 0x0501e2e2,
0x4f00e2ff, 0x4f00e2ff,
@ -1501,7 +1504,7 @@ const unsigned int Hiperface_DSL2_0[]= {
0x0b077200, 0x0b077200,
0x12001313, 0x12001313,
0x0901f2f2, 0x0901f2f2,
0x230635d1, 0x230638d1,
0x510e6506, 0x510e6506,
0x6f010df6, 0x6f010df6,
0x10656546, 0x10656546,
@ -1534,22 +1537,22 @@ const unsigned int Hiperface_DSL2_0[]= {
0x813d1800, 0x813d1800,
0xc9022002, 0xc9022002,
0x2400269f, 0x2400269f,
0x7f000030, 0x7f00002d,
0x24000925, 0x24000925,
0xd104ff00, 0xd104ff00,
0xd703ffff, 0xd703ffff,
0x24001b8d, 0x24001b8d,
0x23016a9d, 0x23016a9d,
0x2305fb9d, 0x2305fe9d,
0x230635d1, 0x230638d1,
0x6f010dea, 0x6f010dea,
0x05012525, 0x05012525,
0x4f0025f8, 0x4f0025f8,
0x24001025, 0x24001025,
0x24001c8d, 0x24001c8d,
0x23016a9d, 0x23016a9d,
0x2305fb9d, 0x2305fe9d,
0x230635d1, 0x230638d1,
0x6f010dd6, 0x6f010dd6,
0x05012525, 0x05012525,
0x4f0025fa, 0x4f0025fa,