summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 01094b7)
raw | patch | inline | side by side (parent: 01094b7)
author | Vitaly Andrianov <vitalya@ti.com> | |
Wed, 5 Jun 2019 14:01:22 +0000 (10:01 -0400) | ||
committer | Tinku Mannan <a0868410@ti.com> | |
Wed, 5 Jun 2019 16:26:49 +0000 (11:26 -0500) |
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
firmware/icss_dualmac/src/rxl2_txl2.asm | patch | blob | history | |
firmware/icss_dualmac/src/tx.h | patch | blob | history | |
firmware/icss_dualmac/src/xfr2vbus_widget.h | patch | blob | history |
index 3cc0090fd8095f26c27fe76f7616a4580e7a315c..31fb033c2e11a49e949c7510da522106a9c59022 100644 (file)
; need to see what else needs to be done
RXTX_ERR:
flip_tx_r0_r23
+ qbne rx_err?, GRegs.tx.b.state, TX_S_ERR
+ ; wait DMA ir complete
+ qbbs $3, TxRegs.ds_flags, 4
+$1: xin XFR2VBUS_XID_READ0, &r18, 4
+ qbeq $2, r18.w0, 0x5
+ qbeq $2, r18, 0
+ qba $1
+$2: nop
+ XFR2VBUS_CANCEL_READ_AUTO_64_CMD XFR2VBUS_XID_READ0
+ nop
+ XFR2VBUS_READ64_RESULT XFR2VBUS_XID_READ0
+ SPIN_SET_LOCK_LOC PRU_RTU_EOD_P_FLAG
+ SPIN_CLR_LOCK_LOC PRU_RTU_EOD_P_FLAG
+ jmp $5
+$3: xin XFR2VBUS_XID_READ1, &r18, 4
+ qbeq $4, r18.w0, 0x5
+ qbeq $4, r18, 0
+ qba $3
+$4: nop
+ XFR2VBUS_CANCEL_READ_AUTO_64_CMD XFR2VBUS_XID_READ1
+ nop
+ XFR2VBUS_READ64_RESULT XFR2VBUS_XID_READ1
+ SPIN_SET_LOCK_LOC PRU_RTU_EOD_E_FLAG
+ SPIN_CLR_LOCK_LOC PRU_RTU_EOD_E_FLAG
+$5:
+ set r31.t30; TX_RESET
+ nop
+ nop
+ ;set TX to TX_S_IDLE
+ ldi GRegs.tx.b.state, TX_S_IDLE
+ qba rxtx_err_exit
+rx_err?
+ qbne $6, GRegs.tx.b.state, TX_S_ACTIVE
+$6:
ldi r11.b3, 0x80
xout 22, &r11, 4
set r31.t22 ; clear rx eof (why isnt it bit 20?)
;for now assume it is the RXL1 overflowing for next frame
;todo: how to check to see if it is for this frame??
ldi GRegs.rx.b.state, RX_STATE_OVER0
+rxtx_err_exit:
TM_YIELD
flip_tx_r0_r23
loop_here
index 5434e7c8dcca7871bcf1ac2b50b8ffad5f3750a1..078272e1b71df51ca07124d63d3662174cf37fc7 100644 (file)
;read in data (now in r2 -r17) [note: on eop some of this may be garbage]
qbbs $2, TxRegs.ds_flags, 4 ; TxRegs.ds_flags.f_desc_read_unit
qbge $4, GRegs.tx.b.len, 64
+ XFR2VBUS_WAIT4READY runit
XFR2VBUS_READ64_RESULT runit
wait1?: xin TXL2, &r19, 4
qbne wait1?, r19.b2, 0
jmp $3
$2:
qbge $5, GRegs.tx.b.len, 64
+ XFR2VBUS_WAIT4READY (runit + 1)
XFR2VBUS_READ64_RESULT (runit+1)
wait2?: xin TXL2, &r19, 4
qbne wait2?, r19.b2, 0
jmp $9
$4: ;eop, unit a
+ XFR2VBUS_WAIT4READY runit
XFR2VBUS_CANCEL_READ_AUTO_64_CMD (runit)
+ nop
XFR2VBUS_READ64_RESULT (runit)
BN_TX_N GRegs.tx.b.len
SPIN_SET_LOCK_LOC PRU_RTU_EOD_P_FLAG
SPIN_CLR_LOCK_LOC PRU_RTU_EOD_P_FLAG
jmp $6
$5: ;eop, unit b
+ XFR2VBUS_WAIT4READY (runit + 1)
XFR2VBUS_CANCEL_READ_AUTO_64_CMD (runit+1)
+ nop
XFR2VBUS_READ64_RESULT (runit+1)
BN_TX_N GRegs.tx.b.len
SPIN_SET_LOCK_LOC PRU_RTU_EOD_E_FLAG
diff --git a/firmware/icss_dualmac/src/xfr2vbus_widget.h b/firmware/icss_dualmac/src/xfr2vbus_widget.h
index 10c34601eddd277e86fe621628ea0a112dc4e492..3e050872d6bfbc26f459f37d277638199c46d057 100644 (file)
xin rnum, &r2, 64
.endm
+XFR2VBUS_WAIT4READY .macro rnum
+$1: xin rnum, &r18, 4
+ qbeq $2, r18.w0, 0x5
+$2:
+ .endm
+
;read in data8
; fills in r2-r3
XFR2VBUS_READ8_RESULT .macro rnum