	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7620_port_init
_mt7620_port_init:                      ## @mt7620_port_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	24(%rdi), %rax
	movq	(%rax), %r14
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r15
	movq	(%r14), %rax
	movq	_PORT4_EPHY@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	sete	%bl
	orl	$4, %ebx
	movl	(%r15), %edi
	callq	_be32_to_cpu
	cmpl	%ebx, %eax
	jl	LBB0_3
## %bb.2:
	movl	(%r15), %edi
	callq	_be32_to_cpu
	cmpl	$6, %eax
	jl	LBB0_5
LBB0_3:
	movl	(%r12), %r14d
	movl	(%r15), %edi
	callq	_be32_to_cpu
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
LBB0_4:
	movl	(%r12), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
LBB0_5:
	movl	(%r15), %edi
	callq	_be32_to_cpu
	movl	%eax, %ebx
	cmpl	$4, %eax
	sete	-48(%rbp)                       ## 1-byte Folded Spill
	leaq	L_.str.3(%rip), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	callq	_of_get_property
	movq	8(%r13), %rcx
	movq	24(%rcx), %rcx
	movslq	%ebx, %rdx
	movq	%rax, (%rcx,%rdx,8)
	movq	8(%r13), %rax
	movq	24(%rax), %rax
	movq	%rdx, %r15
	cmpq	$0, (%rax,%rdx,8)
	je	LBB0_9
## %bb.6:
	cmpl	$16, -56(%rbp)
	je	LBB0_9
## %bb.7:
	movl	(%r12), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
LBB0_8:
	movq	8(%r13), %rax
	movq	24(%rax), %rax
	movq	$0, (%rax,%r15,8)
	jmp	LBB0_26
LBB0_9:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_of_get_phy_mode
	movl	%eax, %ebx
	addl	$-131, %ebx
	cmpl	$3, %ebx
	jae	LBB0_10
## %bb.11:
	leaq	L_.str.6(%rip), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_of_parse_phandle
	movq	8(%r13), %rcx
	movq	16(%rcx), %rcx
	movq	%r15, %r12
	movq	%rax, (%rcx,%r15,8)
	movq	8(%r13), %rax
	movq	16(%rax), %rcx
	cmpq	$0, (%rcx,%r15,8)
	jne	LBB0_13
## %bb.12:
	movq	24(%rax), %rax
	cmpq	$0, (%rax,%r12,8)
	je	LBB0_26
LBB0_13:
	xorl	%eax, %eax
	movb	-48(%rbp), %cl                  ## 1-byte Reload
	movb	%cl, %al
	leal	(%rax,%rax), %r15d
	addl	$12, %r15d
	movslq	%ebx, %rax
	leaq	l_switch.table.mt7620_port_init(%rip), %rcx
	movl	(%rcx,%rax,4), %ebx
	movq	_SYSC_REG_CFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rt_sysc_r32
	movl	$3, %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	shll	%cl, %ebx
	notl	%edx
	andl	%eax, %edx
	orl	%edx, %ebx
	movq	_SYSC_REG_CFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_rt_sysc_w32
	movq	8(%r13), %rax
	movq	24(%rax), %rcx
	movq	(%rcx,%r12,8), %rbx
	testq	%rbx, %rbx
	movq	%r12, %r15
	je	LBB0_23
## %bb.14:
	leaq	4(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_be32_to_cpup
	movq	8(%r13), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx,%r15,4)
	leaq	8(%rbx), %r12
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_be32_to_cpup
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addq	$12, %rbx
	movq	%r12, %rdi
	callq	_be32_to_cpup
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_be32_to_cpup
	movq	8(%r13), %rcx
	movq	8(%rcx), %rdx
	movl	%eax, (%rdx,%r15,4)
	movq	(%r13), %rax
	movl	$1, (%rax,%r15,4)
	movq	(%rcx), %rax
	movl	(%rax,%r15,4), %edx
	leal	-128(%rdx), %eax
	cmpl	$3, %eax
	jae	LBB0_15
## %bb.16:
	movl	$130, %edi
	subl	%edx, %edi
	callq	_PMCR_SPEED
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	testl	%ebx, %ebx
	je	LBB0_18
## %bb.17:
	movq	_PMCR_TX_FC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_18:
	testl	%r12d, %r12d
	je	LBB0_20
## %bb.19:
	movq	_PMCR_RX_FC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
LBB0_20:
	movq	_PMCR_LINK@GOTPCREL(%rip), %rcx
	movq	_PMCR_BACKPRES@GOTPCREL(%rip), %rdi
	movq	_PMCR_BACKOFF@GOTPCREL(%rip), %rdx
	movq	_PMCR_RX_EN@GOTPCREL(%rip), %r8
	movq	_PMCR_TX_EN@GOTPCREL(%rip), %r11
	movq	_PMCR_FORCE@GOTPCREL(%rip), %r10
	movq	_PMCR_MAC_MODE@GOTPCREL(%rip), %r9
	movq	8(%r13), %rsi
	movq	8(%rsi), %rsi
	movl	(%rsi,%r15,4), %esi
	testl	%esi, %esi
	je	LBB0_22
## %bb.21:
	movq	_PMCR_DUPLEX@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
LBB0_22:
	orl	(%rcx), %eax
	orl	(%rdi), %eax
	orl	(%rdx), %eax
	orl	(%r8), %eax
	orl	(%r11), %eax
	orl	(%r10), %eax
	orl	(%r9), %eax
	movq	_PMCR_IPG@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	orl	%r12d, %ebx
	orl	%esi, %ebx
	orl	%eax, %ebx
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_GSW_REG_PORT_PMCR
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mtk_switch_w32
	movl	20(%r13), %edi
	leaq	L_.str.8(%rip), %rsi
	callq	_dev_info
	jmp	LBB0_26
LBB0_10:
	movl	20(%r13), %edi
	leaq	L_.str.5(%rip), %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_dev_err
LBB0_26:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movq	16(%rax), %rax
	movq	(%rax,%r15,8), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_26
## %bb.24:
	movq	%rax, %r12
	movl	16(%r13), %ebx
	movq	%rax, %rdi
	callq	_be32_to_cpup
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_mdiobus_get_phy
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	movq	_PMCR_BACKPRES@GOTPCREL(%rip), %rax
	movq	_PMCR_BACKOFF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_PMCR_RX_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_PMCR_TX_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_PMCR_MAC_MODE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_PMCR_IPG@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	callq	_GSW_REG_PORT_PMCR
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mtk_switch_w32
	movq	8(%r13), %rax
	movq	16(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rsi
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_fe_connect_phy_node
	movq	%r12, %rdi
	callq	_be32_to_cpup
	movq	%rax, %rdi
	callq	_BIT
	orl	%eax, 8(%r14)
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_mt7620_auto_poll
	jmp	LBB0_26
LBB0_15:
	movl	20(%r13), %edi
	leaq	L_.str.7(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_err
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reg"

	.comm	_PORT4_EPHY,8,3                 ## @PORT4_EPHY
L_.str.1:                               ## @.str.1
	.asciz	"%s: invalid port id %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: invalid port id\n"

L_.str.3:                               ## @.str.3
	.asciz	"mediatek,fixed-link"

L_.str.4:                               ## @.str.4
	.asciz	"%s: invalid fixed link property\n"

L_.str.5:                               ## @.str.5
	.asciz	"port %d - invalid phy mode\n"

L_.str.6:                               ## @.str.6
	.asciz	"phy-handle"

	.comm	_SYSC_REG_CFG1,4,2              ## @SYSC_REG_CFG1
L_.str.7:                               ## @.str.7
	.asciz	"invalid link speed: %d\n"

	.comm	_PMCR_LINK,4,2                  ## @PMCR_LINK
	.comm	_PMCR_BACKPRES,4,2              ## @PMCR_BACKPRES
	.comm	_PMCR_BACKOFF,4,2               ## @PMCR_BACKOFF
	.comm	_PMCR_RX_EN,4,2                 ## @PMCR_RX_EN
	.comm	_PMCR_TX_EN,4,2                 ## @PMCR_TX_EN
	.comm	_PMCR_FORCE,4,2                 ## @PMCR_FORCE
	.comm	_PMCR_MAC_MODE,4,2              ## @PMCR_MAC_MODE
	.comm	_PMCR_IPG,4,2                   ## @PMCR_IPG
	.comm	_PMCR_TX_FC,4,2                 ## @PMCR_TX_FC
	.comm	_PMCR_RX_FC,4,2                 ## @PMCR_RX_FC
	.comm	_PMCR_DUPLEX,4,2                ## @PMCR_DUPLEX
L_.str.8:                               ## @.str.8
	.asciz	"using fixed link parameters\n"

	.no_dead_strip	_mt7620_port_init
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.mt7620_port_init
l_switch.table.mt7620_port_init:
	.long	2                               ## 0x2
	.long	0                               ## 0x0
	.long	1                               ## 0x1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7620_port_init
_mt7620_port_init:                      ; @mt7620_port_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x1
	mov	x19, x0
	ldr	x8, [x0, #24]
	ldr	x20, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_5
; %bb.1:
	mov	x21, x0
Lloh2:
	adrp	x8, _PORT4_EPHY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PORT4_EPHY@GOTPAGEOFF]
	ldr	x9, [x20]
Lloh4:
	ldr	x8, [x8]
	cmp	x9, x8
	mov	w8, #4
	cinc	w23, w8, eq
	ldr	w0, [x0]
	bl	_be32_to_cpu
	cmp	w0, w23
	b.lt	LBB0_3
; %bb.2:
	ldr	w0, [x21]
	bl	_be32_to_cpu
	cmp	w0, #6
	b.lt	LBB0_6
LBB0_3:
	ldr	w19, [x22]
	ldr	w0, [x21]
	bl	_be32_to_cpu
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_pr_err
LBB0_4:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_5:
	ldr	w1, [x22]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_pr_err
LBB0_6:
	ldr	w0, [x21]
	bl	_be32_to_cpu
	mov	x23, x0
	mov	w8, #12
	mov	w9, #14
	cmp	w0, #4
	csel	w24, w9, w8, eq
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x2, sp, #12
	mov	x0, x22
	bl	_of_get_property
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #24]
	sxtw	x21, w23
	sbfiz	x9, x23, #3, #32
	str	x0, [x8, x9]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #24]
	ldr	x8, [x8, x9]
	ldr	w9, [sp, #12]
	cmp	x8, #0
	ccmp	w9, #16, #4, ne
	b.ne	LBB0_13
; %bb.7:
	mov	x0, x22
	bl	_of_get_phy_mode
	sub	w23, w0, #131
	cmp	w23, #3
	b.hs	LBB0_15
; %bb.8:
Lloh11:
	adrp	x1, l_.str.6@PAGE
Lloh12:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x22
	mov	w2, #0
	bl	_of_parse_phandle
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #16]
	lsl	x9, x21, #3
	str	x0, [x8, x9]
	ldr	x8, [x19, #8]
	ldr	x10, [x8, #16]
	ldr	x9, [x10, x9]
	cbnz	x9, LBB0_10
; %bb.9:
	ldr	x8, [x8, #24]
	ldr	x8, [x8, x21, lsl #3]
	cbz	x8, LBB0_4
LBB0_10:
Lloh13:
	adrp	x8, l_switch.table.mt7620_port_init@PAGE
Lloh14:
	add	x8, x8, l_switch.table.mt7620_port_init@PAGEOFF
	ldr	w22, [x8, w23, sxtw #2]
Lloh15:
	adrp	x23, _SYSC_REG_CFG1@GOTPAGE
Lloh16:
	ldr	x23, [x23, _SYSC_REG_CFG1@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_rt_sysc_r32
	mov	w8, #3
	lsl	w8, w8, w24
	bic	w8, w0, w8
	lsl	w9, w22, w24
	orr	w0, w8, w9
	ldr	w1, [x23]
	bl	_rt_sysc_w32
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #24]
	ldr	x23, [x9, x21, lsl #3]
	cbz	x23, LBB0_16
; %bb.11:
	add	x22, x23, #4
	mov	x0, x23
	bl	_be32_to_cpup
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	lsl	x26, x21, #2
	str	w0, [x8, x26]
	add	x24, x23, #8
	mov	x0, x22
	bl	_be32_to_cpup
	mov	x22, x0
	add	x25, x23, #12
	mov	x0, x24
	bl	_be32_to_cpup
	mov	x23, x0
	mov	x0, x25
	bl	_be32_to_cpup
	ldp	x9, x8, [x19]
	ldp	x8, x10, [x8]
	str	w0, [x10, x26]
	mov	w10, #1
	str	w10, [x9, x26]
	ldr	w2, [x8, x26]
	sub	w8, w2, #128
	cmp	w8, #3
	b.hs	LBB0_19
; %bb.12:
	mov	w8, #130
	sub	w0, w8, w2
	bl	_PMCR_SPEED
Lloh17:
	adrp	x8, _PMCR_LINK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PMCR_LINK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _PMCR_BACKPRES@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PMCR_BACKPRES@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
Lloh23:
	adrp	x10, _PMCR_BACKOFF@GOTPAGE
Lloh24:
	ldr	x10, [x10, _PMCR_BACKOFF@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
Lloh26:
	adrp	x11, _PMCR_RX_EN@GOTPAGE
Lloh27:
	ldr	x11, [x11, _PMCR_RX_EN@GOTPAGEOFF]
Lloh28:
	ldr	w11, [x11]
Lloh29:
	adrp	x12, _PMCR_TX_EN@GOTPAGE
Lloh30:
	ldr	x12, [x12, _PMCR_TX_EN@GOTPAGEOFF]
Lloh31:
	ldr	w12, [x12]
Lloh32:
	adrp	x13, _PMCR_FORCE@GOTPAGE
Lloh33:
	ldr	x13, [x13, _PMCR_FORCE@GOTPAGEOFF]
Lloh34:
	ldr	w13, [x13]
Lloh35:
	adrp	x14, _PMCR_MAC_MODE@GOTPAGE
Lloh36:
	ldr	x14, [x14, _PMCR_MAC_MODE@GOTPAGEOFF]
Lloh37:
	ldr	w14, [x14]
Lloh38:
	adrp	x15, _PMCR_IPG@GOTPAGE
Lloh39:
	ldr	x15, [x15, _PMCR_IPG@GOTPAGEOFF]
Lloh40:
	ldr	w15, [x15]
Lloh41:
	adrp	x16, _PMCR_TX_FC@GOTPAGE
Lloh42:
	ldr	x16, [x16, _PMCR_TX_FC@GOTPAGEOFF]
Lloh43:
	ldr	w16, [x16]
Lloh44:
	adrp	x17, _PMCR_RX_FC@GOTPAGE
Lloh45:
	ldr	x17, [x17, _PMCR_RX_FC@GOTPAGEOFF]
	cmp	w22, #0
	csel	w16, wzr, w16, eq
Lloh46:
	ldr	w17, [x17]
	cmp	w23, #0
	csel	w17, wzr, w17, eq
	ldr	x1, [x19, #8]
	ldr	x1, [x1, #8]
	ldr	w1, [x1, x21, lsl #2]
Lloh47:
	adrp	x2, _PMCR_DUPLEX@GOTPAGE
Lloh48:
	ldr	x2, [x2, _PMCR_DUPLEX@GOTPAGEOFF]
Lloh49:
	ldr	w2, [x2]
	cmp	w1, #0
	csel	w1, wzr, w2, eq
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w8, w8, w12
	orr	w8, w8, w13
	orr	w8, w8, w14
	orr	w8, w8, w15
	orr	w8, w8, w16
	orr	w8, w8, w17
	orr	w22, w8, w1
	mov	x0, x21
	bl	_GSW_REG_PORT_PMCR
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_mtk_switch_w32
	ldr	w0, [x19, #20]
Lloh50:
	adrp	x1, l_.str.8@PAGE
Lloh51:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_dev_info
	b	LBB0_4
LBB0_13:
	ldr	w1, [x22]
Lloh52:
	adrp	x0, l_.str.4@PAGE
Lloh53:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_err
LBB0_14:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #24]
	str	xzr, [x8, x21, lsl #3]
	b	LBB0_4
LBB0_15:
	ldr	w0, [x19, #20]
Lloh54:
	adrp	x1, l_.str.5@PAGE
Lloh55:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	b	LBB0_4
LBB0_16:
	ldr	x8, [x8, #16]
	ldr	x0, [x8, x21, lsl #3]
Lloh56:
	adrp	x1, l_.str@PAGE
Lloh57:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_4
; %bb.17:
	mov	x22, x0
	ldr	w23, [x19, #16]
	bl	_be32_to_cpup
	mov	x1, x0
	mov	x0, x23
	bl	_mdiobus_get_phy
	cbz	x0, LBB0_4
; %bb.18:
Lloh58:
	adrp	x8, _PMCR_BACKPRES@GOTPAGE
Lloh59:
	ldr	x8, [x8, _PMCR_BACKPRES@GOTPAGEOFF]
Lloh60:
	ldr	w8, [x8]
Lloh61:
	adrp	x9, _PMCR_BACKOFF@GOTPAGE
Lloh62:
	ldr	x9, [x9, _PMCR_BACKOFF@GOTPAGEOFF]
Lloh63:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh64:
	adrp	x9, _PMCR_RX_EN@GOTPAGE
Lloh65:
	ldr	x9, [x9, _PMCR_RX_EN@GOTPAGEOFF]
Lloh66:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh67:
	adrp	x9, _PMCR_TX_EN@GOTPAGE
Lloh68:
	ldr	x9, [x9, _PMCR_TX_EN@GOTPAGEOFF]
Lloh69:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh70:
	adrp	x9, _PMCR_MAC_MODE@GOTPAGE
Lloh71:
	ldr	x9, [x9, _PMCR_MAC_MODE@GOTPAGEOFF]
Lloh72:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh73:
	adrp	x9, _PMCR_IPG@GOTPAGE
Lloh74:
	ldr	x9, [x9, _PMCR_IPG@GOTPAGEOFF]
Lloh75:
	ldr	w9, [x9]
	orr	w23, w8, w9
	mov	x0, x21
	bl	_GSW_REG_PORT_PMCR
	mov	x2, x0
	mov	x0, x20
	mov	x1, x23
	bl	_mtk_switch_w32
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #16]
	ldr	x1, [x8, x21, lsl #3]
	mov	x0, x19
	mov	x2, x21
	bl	_fe_connect_phy_node
	mov	x0, x22
	bl	_be32_to_cpup
	bl	_BIT
	ldr	w8, [x20, #8]
	orr	w8, w8, w0
	str	w8, [x20, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_mt7620_auto_poll
	b	LBB0_4
LBB0_19:
	ldr	w0, [x19, #20]
Lloh76:
	adrp	x1, l_.str.7@PAGE
Lloh77:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_err
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpAdd	Lloh76, Lloh77
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reg"

	.comm	_PORT4_EPHY,8,3                 ; @PORT4_EPHY
l_.str.1:                               ; @.str.1
	.asciz	"%s: invalid port id %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: invalid port id\n"

l_.str.3:                               ; @.str.3
	.asciz	"mediatek,fixed-link"

l_.str.4:                               ; @.str.4
	.asciz	"%s: invalid fixed link property\n"

l_.str.5:                               ; @.str.5
	.asciz	"port %d - invalid phy mode\n"

l_.str.6:                               ; @.str.6
	.asciz	"phy-handle"

	.comm	_SYSC_REG_CFG1,4,2              ; @SYSC_REG_CFG1
l_.str.7:                               ; @.str.7
	.asciz	"invalid link speed: %d\n"

	.comm	_PMCR_LINK,4,2                  ; @PMCR_LINK
	.comm	_PMCR_BACKPRES,4,2              ; @PMCR_BACKPRES
	.comm	_PMCR_BACKOFF,4,2               ; @PMCR_BACKOFF
	.comm	_PMCR_RX_EN,4,2                 ; @PMCR_RX_EN
	.comm	_PMCR_TX_EN,4,2                 ; @PMCR_TX_EN
	.comm	_PMCR_FORCE,4,2                 ; @PMCR_FORCE
	.comm	_PMCR_MAC_MODE,4,2              ; @PMCR_MAC_MODE
	.comm	_PMCR_IPG,4,2                   ; @PMCR_IPG
	.comm	_PMCR_TX_FC,4,2                 ; @PMCR_TX_FC
	.comm	_PMCR_RX_FC,4,2                 ; @PMCR_RX_FC
	.comm	_PMCR_DUPLEX,4,2                ; @PMCR_DUPLEX
l_.str.8:                               ; @.str.8
	.asciz	"using fixed link parameters\n"

	.no_dead_strip	_mt7620_port_init
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.mt7620_port_init
l_switch.table.mt7620_port_init:
	.long	2                               ; 0x2
	.long	0                               ; 0x0
	.long	1                               ; 0x1

.subsections_via_symbols
