	.file	"extr_davinci_mdio.c_davinci_mdio_reset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"davinci mdio revision %d.%d, bus freq %ld\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"detected phy mask %x\n"
.LC2:
	.string	"no live phy, scanning all\n"
	.text
	.p2align 4
	.type	davinci_mdio_reset, @function
davinci_mdio_reset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rbx, QWORD PTR [rdi]
	mov	edi, DWORD PTR 4[rbx]
	call	pm_runtime_get_sync@PLT
	test	eax, eax
	js	.L9
	mov	edi, DWORD PTR [rbx]
	imul	edi, DWORD PTR PHY_MAX_ADDR[rip]
	call	msleep@PLT
	mov	rax, QWORD PTR 16[rbx]
	lea	rdi, 4[rax]
	call	readl@PLT
	mov	edi, DWORD PTR 4[rbx]
	mov	r8d, DWORD PTR 32[rbx]
	lea	rsi, .LC0[rip]
	movzx	ecx, al
	movzx	edx, ah
	xor	eax, eax
	call	dev_info@PLT
	cmp	QWORD PTR 24[rbx], 0
	je	.L10
.L4:
	mov	edi, DWORD PTR 4[rbx]
	xor	r12d, r12d
	call	pm_runtime_mark_last_busy@PLT
	mov	edi, DWORD PTR 4[rbx]
	call	pm_runtime_put_autosuspend@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, QWORD PTR 16[rbx]
	call	readl@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L11
	mov	edi, DWORD PTR 4[rbx]
	lea	rsi, .LC2[rip]
	call	dev_warn@PLT
.L6:
	mov	rax, QWORD PTR 8[rbx]
	mov	DWORD PTR [rax], r12d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, DWORD PTR 4[rbx]
	mov	r12d, eax
	call	pm_runtime_put_noidle@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	not	r12d
	mov	edi, DWORD PTR 4[rbx]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	mov	edx, r12d
	call	dev_info@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	davinci_mdio_reset, .-davinci_mdio_reset
	.comm	PHY_MAX_ADDR,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_davinci_mdio.c_davinci_mdio_reset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"davinci mdio revision %d.%d, bus freq %ld\012\000"
	.align	2
.LC1:
	.ascii	"detected phy mask %x\012\000"
	.align	2
.LC2:
	.ascii	"no live phy, scanning all\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	davinci_mdio_reset, %function
davinci_mdio_reset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r4, [r0]
	sub	sp, sp, #12
	ldr	r0, [r4, #4]
	bl	pm_runtime_get_sync
	subs	r5, r0, #0
	blt	.L9
	ldr	r2, .L12
	ldr	r3, [r4]
	ldr	r0, [r2]
	mul	r0, r3, r0
	bl	msleep
	ldr	r0, [r4, #12]
	add	r0, r0, #4
	bl	readl
	mov	r3, r0
	ldr	r1, [r4, #20]
	asr	r2, r3, #8
	ldr	r0, [r4, #4]
	and	r3, r3, #255
	str	r1, [sp]
	and	r2, r2, #255
	ldr	r1, .L12+4
	bl	dev_info
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L10
.L4:
	mov	r5, #0
	ldr	r0, [r4, #4]
	bl	pm_runtime_mark_last_busy
	ldr	r0, [r4, #4]
	bl	pm_runtime_put_autosuspend
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L10:
	ldr	r0, [r4, #12]
	bl	readl
	subs	r5, r0, #0
	bne	.L11
	ldr	r1, .L12+8
	ldr	r0, [r4, #4]
	bl	dev_warn
.L6:
	ldr	r3, [r4, #8]
	str	r5, [r3]
	b	.L4
.L9:
	ldr	r0, [r4, #4]
	bl	pm_runtime_put_noidle
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L11:
	mvn	r5, r5
	ldr	r1, .L12+12
	mov	r2, r5
	ldr	r0, [r4, #4]
	bl	dev_info
	b	.L6
.L13:
	.align	2
.L12:
	.word	PHY_MAX_ADDR
	.word	.LC0
	.word	.LC2
	.word	.LC1
	.size	davinci_mdio_reset, .-davinci_mdio_reset
	.comm	PHY_MAX_ADDR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
