	.file	"extr_mtk_eth_soc.c_mtk_hwlro_rx_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mtk_hwlro_rx_init, @function
mtk_hwlro_rx_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, DWORD PTR MTK_RING_MAX_AGG_CNT_H[rip]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, DWORD PTR MTK_RING_AGE_TIME_L[rip]
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, DWORD PTR MTK_RING_AUTO_LERAN_MODE[rip]
	or	r12d, DWORD PTR MTK_RING_VLD[rip]
	or	r12d, DWORD PTR MTK_RING_AGE_TIME_H[rip]
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	or	r12d, DWORD PTR MTK_RING_MAX_AGG_TIME[rip]
	or	r12d, DWORD PTR MTK_RING_MAX_AGG_CNT_L[rip]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	cmp	DWORD PTR MTK_MAX_RX_RING_NUM[rip], 1
	jle	.L2
	mov	ebx, 1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, ebx
	call	MTK_LRO_CTRL_DW1_CFG@PLT
	mov	esi, r13d
	mov	rdi, rbp
	mov	edx, eax
	call	mtk_w32@PLT
	mov	edi, ebx
	call	MTK_LRO_CTRL_DW2_CFG@PLT
	mov	esi, r12d
	mov	rdi, rbp
	mov	edx, eax
	call	mtk_w32@PLT
	mov	edi, ebx
	add	ebx, 1
	call	MTK_LRO_CTRL_DW3_CFG@PLT
	mov	esi, r14d
	mov	rdi, rbp
	mov	edx, eax
	call	mtk_w32@PLT
	cmp	DWORD PTR MTK_MAX_RX_RING_NUM[rip], ebx
	jg	.L3
.L2:
	mov	edx, DWORD PTR MTK_PDMA_LRO_CTRL_DW2[rip]
	mov	esi, DWORD PTR MTK_HW_LRO_BW_THRE[rip]
	mov	rdi, rbp
	mov	r12d, DWORD PTR MTK_L3_CKS_UPD_EN[rip]
	or	r12d, DWORD PTR MTK_LRO_ALT_PKT_CNT_MODE[rip]
	call	mtk_w32@PLT
	mov	edx, DWORD PTR MTK_PDMA_LRO_ALT_SCORE_DELTA[rip]
	mov	esi, DWORD PTR MTK_HW_LRO_REPLACE_DELTA[rip]
	mov	rdi, rbp
	call	mtk_w32@PLT
	mov	esi, DWORD PTR MTK_HW_LRO_TIMER_UNIT[rip]
	mov	edx, DWORD PTR MTK_PDMA_LRO_ALT_REFRESH_TIMER[rip]
	mov	rdi, rbp
	sal	esi, 16
	or	esi, DWORD PTR MTK_HW_LRO_REFRESH_TIME[rip]
	call	mtk_w32@PLT
	movzx	eax, BYTE PTR MTK_HW_LRO_MAX_AGG_CNT[rip]
	mov	esi, DWORD PTR MTK_ADMA_MODE[rip]
	mov	rdi, rbp
	mov	edx, DWORD PTR MTK_PDMA_LRO_CTRL_DW3[rip]
	or	esi, DWORD PTR MTK_LRO_MIN_RXD_SDL[rip]
	or	esi, eax
	or	r12d, DWORD PTR MTK_LRO_EN[rip]
	call	mtk_w32@PLT
	mov	edx, DWORD PTR MTK_PDMA_LRO_CTRL_DW0[rip]
	mov	esi, r12d
	mov	rdi, rbp
	call	mtk_w32@PLT
	pop	rbx
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mtk_hwlro_rx_init, .-mtk_hwlro_rx_init
	.comm	MTK_RING_VLD,4,4
	.comm	MTK_RING_MAX_AGG_TIME,4,4
	.comm	MTK_RING_MAX_AGG_CNT_L,4,4
	.comm	MTK_RING_MAX_AGG_CNT_H,4,4
	.comm	MTK_RING_AUTO_LERAN_MODE,4,4
	.comm	MTK_RING_AGE_TIME_L,4,4
	.comm	MTK_RING_AGE_TIME_H,4,4
	.comm	MTK_PDMA_LRO_CTRL_DW3,4,4
	.comm	MTK_PDMA_LRO_CTRL_DW2,4,4
	.comm	MTK_PDMA_LRO_CTRL_DW0,4,4
	.comm	MTK_PDMA_LRO_ALT_SCORE_DELTA,4,4
	.comm	MTK_PDMA_LRO_ALT_REFRESH_TIMER,4,4
	.comm	MTK_MAX_RX_RING_NUM,4,4
	.comm	MTK_LRO_MIN_RXD_SDL,4,4
	.comm	MTK_LRO_EN,4,4
	.comm	MTK_LRO_ALT_PKT_CNT_MODE,4,4
	.comm	MTK_L3_CKS_UPD_EN,4,4
	.comm	MTK_HW_LRO_TIMER_UNIT,4,4
	.comm	MTK_HW_LRO_REPLACE_DELTA,4,4
	.comm	MTK_HW_LRO_REFRESH_TIME,4,4
	.comm	MTK_HW_LRO_MAX_AGG_CNT,4,4
	.comm	MTK_HW_LRO_BW_THRE,4,4
	.comm	MTK_ADMA_MODE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_mtk_eth_soc.c_mtk_hwlro_rx_init.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mtk_hwlro_rx_init, %function
mtk_hwlro_rx_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r1, .L7
	ldr	r2, .L7+4
	ldr	r3, .L7+8
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r6, [r1]
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, .L7+12
	ldr	r9, .L7+16
	orr	r6, r6, r1
	ldr	r2, [r2]
	orr	r6, r6, r3
	ldr	r1, .L7+20
	ldr	r3, [r9]
	orr	r6, r6, r2
	ldr	r1, [r1]
	ldr	r2, .L7+24
	cmp	r3, #1
	ldr	r3, .L7+28
	mov	r5, r0
	ldr	r7, [r2]
	ldr	r8, [r3]
	orr	r6, r6, r1
	ble	.L2
	mov	r4, #1
.L3:
	mov	r0, r4
	bl	MTK_LRO_CTRL_DW1_CFG
	mov	r1, r7
	mov	r2, r0
	mov	r0, r5
	bl	mtk_w32
	mov	r0, r4
	bl	MTK_LRO_CTRL_DW2_CFG
	mov	r1, r6
	mov	r2, r0
	mov	r0, r5
	bl	mtk_w32
	mov	r0, r4
	bl	MTK_LRO_CTRL_DW3_CFG
	mov	r1, r8
	mov	r2, r0
	mov	r0, r5
	bl	mtk_w32
	ldr	r3, [r9]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L3
.L2:
	ldr	r0, .L7+32
	ldr	r3, .L7+36
	ldr	r2, .L7+40
	ldr	r1, .L7+44
	ldr	r4, [r0]
	ldr	r3, [r3]
	mov	r0, r5
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r4, r4, r3
	bl	mtk_w32
	ldr	r3, .L7+48
	ldr	r2, .L7+52
	ldr	r1, [r3]
	mov	r0, r5
	ldr	r2, [r2]
	bl	mtk_w32
	ldr	r2, .L7+56
	ldr	r3, .L7+60
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L7+64
	orr	r1, r2, r1, lsl #16
	mov	r0, r5
	ldr	r2, [r3]
	bl	mtk_w32
	ldr	r3, .L7+68
	ldr	r2, .L7+72
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, .L7+76
	ldr	r0, .L7+80
	orr	r3, r3, r2
	ldrb	r1, [r1]	@ zero_extendqisi2
	ldr	r2, .L7+84
	ldr	ip, [r0]
	orr	r1, r3, r1
	mov	r0, r5
	ldr	r2, [r2]
	orr	r4, r4, ip
	bl	mtk_w32
	ldr	r3, .L7+88
	mov	r1, r4
	mov	r0, r5
	ldr	r2, [r3]
	bl	mtk_w32
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	.align	2
.L7:
	.word	MTK_RING_AUTO_LERAN_MODE
	.word	MTK_RING_VLD
	.word	MTK_RING_AGE_TIME_H
	.word	MTK_RING_MAX_AGG_TIME
	.word	MTK_MAX_RX_RING_NUM
	.word	MTK_RING_MAX_AGG_CNT_L
	.word	MTK_RING_AGE_TIME_L
	.word	MTK_RING_MAX_AGG_CNT_H
	.word	MTK_L3_CKS_UPD_EN
	.word	MTK_LRO_ALT_PKT_CNT_MODE
	.word	MTK_PDMA_LRO_CTRL_DW2
	.word	MTK_HW_LRO_BW_THRE
	.word	MTK_HW_LRO_REPLACE_DELTA
	.word	MTK_PDMA_LRO_ALT_SCORE_DELTA
	.word	MTK_HW_LRO_TIMER_UNIT
	.word	MTK_HW_LRO_REFRESH_TIME
	.word	MTK_PDMA_LRO_ALT_REFRESH_TIMER
	.word	MTK_ADMA_MODE
	.word	MTK_LRO_MIN_RXD_SDL
	.word	MTK_HW_LRO_MAX_AGG_CNT
	.word	MTK_LRO_EN
	.word	MTK_PDMA_LRO_CTRL_DW3
	.word	MTK_PDMA_LRO_CTRL_DW0
	.size	mtk_hwlro_rx_init, .-mtk_hwlro_rx_init
	.comm	MTK_RING_VLD,4,4
	.comm	MTK_RING_MAX_AGG_TIME,4,4
	.comm	MTK_RING_MAX_AGG_CNT_L,4,4
	.comm	MTK_RING_MAX_AGG_CNT_H,4,4
	.comm	MTK_RING_AUTO_LERAN_MODE,4,4
	.comm	MTK_RING_AGE_TIME_L,4,4
	.comm	MTK_RING_AGE_TIME_H,4,4
	.comm	MTK_PDMA_LRO_CTRL_DW3,4,4
	.comm	MTK_PDMA_LRO_CTRL_DW2,4,4
	.comm	MTK_PDMA_LRO_CTRL_DW0,4,4
	.comm	MTK_PDMA_LRO_ALT_SCORE_DELTA,4,4
	.comm	MTK_PDMA_LRO_ALT_REFRESH_TIMER,4,4
	.comm	MTK_MAX_RX_RING_NUM,4,4
	.comm	MTK_LRO_MIN_RXD_SDL,4,4
	.comm	MTK_LRO_EN,4,4
	.comm	MTK_LRO_ALT_PKT_CNT_MODE,4,4
	.comm	MTK_L3_CKS_UPD_EN,4,4
	.comm	MTK_HW_LRO_TIMER_UNIT,4,4
	.comm	MTK_HW_LRO_REPLACE_DELTA,4,4
	.comm	MTK_HW_LRO_REFRESH_TIME,4,4
	.comm	MTK_HW_LRO_MAX_AGG_CNT,4,4
	.comm	MTK_HW_LRO_BW_THRE,4,4
	.comm	MTK_ADMA_MODE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
