	.file	"extr_netxen_nic_main.c_netxen_start_firmware.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"error in init HW init sequence\n"
	.text
	.p2align 4
	.type	netxen_start_firmware, @function
netxen_start_firmware:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r13, QWORD PTR 24[rdi]
	call	nx_set_dma_mask@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L32
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	mov	rdi, rbp
	call	netxen_can_start_firmware@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L1
	jne	.L33
.L4:
	mov	esi, DWORD PTR NETXEN_NIC_PEG_TUNE[rip]
	mov	rdi, rbp
	call	netxen_phantom_init@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L34
	mov	edx, DWORD PTR NX_DEV_READY[rip]
	mov	esi, DWORD PTR NX_CRB_DEV_STATE[rip]
	mov	rdi, rbp
	call	NXWR32@PLT
	mov	rdi, rbp
	call	nx_update_dma_mask@PLT
	mov	rdi, rbp
	call	netxen_check_options@PLT
	mov	QWORD PTR 0[rbp], 0
.L6:
	mov	rdi, rbp
	call	netxen_release_firmware@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	mov	edi, 508
	call	NETXEN_CAM_RAM@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	NXRD32@PLT
	mov	rdi, rbp
	mov	esi, eax
	mov	ebx, eax
	call	netxen_check_hw_init@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L35
	mov	rdi, rbp
	call	netxen_request_firmware@PLT
	mov	rdi, rbp
	call	netxen_need_fw_reset@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L6
	je	.L7
	cmp	ebx, 1431655765
	jne	.L36
.L8:
	mov	esi, DWORD PTR CRB_DMA_SHIFT[rip]
	mov	edx, 1431655765
	mov	rdi, rbp
	call	NXWR32@PLT
	mov	esi, DWORD PTR NETXEN_PEG_HALT_STATUS1[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	NXWR32@PLT
	mov	esi, DWORD PTR NETXEN_PEG_HALT_STATUS2[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	NXWR32@PLT
	mov	edi, DWORD PTR 16[rbp]
	call	NX_IS_REVISION_P3@PLT
	test	rax, rax
	jne	.L37
.L9:
	mov	rdi, rbp
	call	netxen_load_firmware@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L6
	mov	rdi, rbp
	call	netxen_release_firmware@PLT
	mov	edi, DWORD PTR 16[rbp]
	call	NX_IS_REVISION_P2@PLT
	test	rax, rax
	je	.L10
	mov	rax, QWORD PTR NETXEN_NIC_XGBE[rip]
	mov	edx, 30292
	cmp	QWORD PTR 8[rbp], rax
	mov	rdi, rbp
	mov	eax, 251688532
	mov	esi, DWORD PTR NETXEN_MAC_ADDR_CNTL_REG[rip]
	cmove	edx, eax
	call	NXWR32@PLT
.L10:
	mov	rdi, rbp
	call	netxen_init_dummy_dma@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L6
	mov	edx, DWORD PTR _NETXEN_NIC_LINUX_MAJOR[rip]
	mov	eax, DWORD PTR _NETXEN_NIC_LINUX_MINOR[rip]
	mov	rdi, rbp
	mov	esi, DWORD PTR CRB_DRIVER_VERSION[rip]
	sal	edx, 16
	sal	eax, 8
	or	edx, eax
	or	edx, DWORD PTR _NETXEN_NIC_LINUX_SUBVERSION[rip]
	call	NXWR32@PLT
.L7:
	mov	edi, DWORD PTR 16[rbp]
	call	NX_IS_REVISION_P3@PLT
	test	rax, rax
	je	.L4
	mov	rdi, rbp
	call	netxen_pcie_strap_init@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L34:
	mov	rdi, rbp
	call	netxen_free_dummy_dma@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L35:
	lea	rsi, .LC0[rip]
	mov	rdi, r13
	call	dev_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L36:
	mov	esi, DWORD PTR CRB_CMDPEG_STATE[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	NXWR32@PLT
	mov	rdi, rbp
	call	netxen_pinit_from_rom@PLT
	mov	edi, 1
	call	msleep@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L37:
	mov	rdi, rbp
	call	netxen_set_port_mode@PLT
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	netxen_start_firmware, .-netxen_start_firmware
	.comm	_NETXEN_NIC_LINUX_SUBVERSION,4,4
	.comm	_NETXEN_NIC_LINUX_MINOR,4,4
	.comm	_NETXEN_NIC_LINUX_MAJOR,4,4
	.comm	NX_DEV_READY,4,4
	.comm	NX_CRB_DEV_STATE,4,4
	.comm	NETXEN_PEG_HALT_STATUS2,4,4
	.comm	NETXEN_PEG_HALT_STATUS1,4,4
	.comm	NETXEN_NIC_XGBE,8,8
	.comm	NETXEN_NIC_PEG_TUNE,4,4
	.comm	NETXEN_MAC_ADDR_CNTL_REG,4,4
	.comm	CRB_DRIVER_VERSION,4,4
	.comm	CRB_DMA_SHIFT,4,4
	.comm	CRB_CMDPEG_STATE,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_netxen_nic_main.c_netxen_start_firmware.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"error in init HW init sequence\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	netxen_start_firmware, %function
netxen_start_firmware:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r6, [r0, #12]
	bl	nx_set_dma_mask
	subs	r4, r0, #0
	beq	.L26
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L26:
	mov	r0, r5
	bl	netxen_can_start_firmware
	subs	r4, r0, #0
	blt	.L1
	bne	.L27
.L4:
	ldr	r3, .L32
	mov	r0, r5
	ldr	r1, [r3]
	bl	netxen_phantom_init
	subs	r4, r0, #0
	bne	.L28
	ldr	r3, .L32+4
	ldr	r2, .L32+8
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r0, r5
	bl	NXWR32
	mov	r0, r5
	bl	nx_update_dma_mask
	mov	r0, r5
	bl	netxen_check_options
	str	r4, [r5]
.L6:
	mov	r0, r5
	bl	netxen_release_firmware
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L27:
	mov	r0, #508
	bl	NETXEN_CAM_RAM
	mov	r1, r0
	mov	r0, r5
	bl	NXRD32
	mov	r7, r0
	mov	r0, r5
	mov	r1, r7
	bl	netxen_check_hw_init
	subs	r4, r0, #0
	bne	.L29
	mov	r0, r5
	bl	netxen_request_firmware
	mov	r0, r5
	bl	netxen_need_fw_reset
	subs	r4, r0, #0
	blt	.L6
	beq	.L7
	ldr	r3, .L32+12
	cmp	r7, r3
	bne	.L30
.L8:
	ldr	r3, .L32+16
	ldr	r2, .L32+12
	ldr	r1, [r3]
	mov	r0, r5
	bl	NXWR32
	ldr	r3, .L32+20
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r5
	bl	NXWR32
	ldr	r3, .L32+24
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r5
	bl	NXWR32
	ldr	r0, [r5, #8]
	bl	NX_IS_REVISION_P3
	cmp	r0, #0
	bne	.L31
.L9:
	mov	r0, r5
	bl	netxen_load_firmware
	subs	r4, r0, #0
	bne	.L6
	mov	r0, r5
	bl	netxen_release_firmware
	ldr	r0, [r5, #8]
	bl	NX_IS_REVISION_P2
	cmp	r0, #0
	beq	.L10
	ldr	r3, .L32+28
	ldr	ip, [r5, #4]
	ldr	r2, [r3]
	ldr	r0, .L32+32
	ldr	r1, .L32+36
	ldr	r3, .L32+40
	cmp	ip, r2
	movne	r2, r0
	moveq	r2, r1
	mov	r0, r5
	ldr	r1, [r3]
	bl	NXWR32
.L10:
	mov	r0, r5
	bl	netxen_init_dummy_dma
	subs	r4, r0, #0
	bne	.L6
	ldr	r3, .L32+44
	ldr	r1, .L32+48
	ldr	r3, [r3]
	ldr	r2, .L32+52
	ldr	r0, [r1]
	ldr	r2, [r2]
	ldr	r1, .L32+56
	lsl	r3, r3, #8
	orr	r3, r3, r0, lsl #16
	ldr	r1, [r1]
	mov	r0, r5
	orr	r2, r3, r2
	bl	NXWR32
.L7:
	ldr	r0, [r5, #8]
	bl	NX_IS_REVISION_P3
	cmp	r0, #0
	beq	.L4
	mov	r0, r5
	bl	netxen_pcie_strap_init
	b	.L4
.L28:
	mov	r0, r5
	bl	netxen_free_dummy_dma
	b	.L6
.L29:
	mov	r0, r6
	ldr	r1, .L32+60
	bl	dev_err
	b	.L1
.L30:
	ldr	r3, .L32+64
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r5
	bl	NXWR32
	mov	r0, r5
	bl	netxen_pinit_from_rom
	mov	r0, #1
	bl	msleep
	b	.L8
.L31:
	mov	r0, r5
	bl	netxen_set_port_mode
	b	.L9
.L33:
	.align	2
.L32:
	.word	NETXEN_NIC_PEG_TUNE
	.word	NX_CRB_DEV_STATE
	.word	NX_DEV_READY
	.word	1431655765
	.word	CRB_DMA_SHIFT
	.word	NETXEN_PEG_HALT_STATUS1
	.word	NETXEN_PEG_HALT_STATUS2
	.word	NETXEN_NIC_XGBE
	.word	30292
	.word	251688532
	.word	NETXEN_MAC_ADDR_CNTL_REG
	.word	_NETXEN_NIC_LINUX_MINOR
	.word	_NETXEN_NIC_LINUX_MAJOR
	.word	_NETXEN_NIC_LINUX_SUBVERSION
	.word	CRB_DRIVER_VERSION
	.word	.LC0
	.word	CRB_CMDPEG_STATE
	.size	netxen_start_firmware, .-netxen_start_firmware
	.comm	_NETXEN_NIC_LINUX_SUBVERSION,4,4
	.comm	_NETXEN_NIC_LINUX_MINOR,4,4
	.comm	_NETXEN_NIC_LINUX_MAJOR,4,4
	.comm	NX_DEV_READY,4,4
	.comm	NX_CRB_DEV_STATE,4,4
	.comm	NETXEN_PEG_HALT_STATUS2,4,4
	.comm	NETXEN_PEG_HALT_STATUS1,4,4
	.comm	NETXEN_NIC_XGBE,4,4
	.comm	NETXEN_NIC_PEG_TUNE,4,4
	.comm	NETXEN_MAC_ADDR_CNTL_REG,4,4
	.comm	CRB_DRIVER_VERSION,4,4
	.comm	CRB_DMA_SHIFT,4,4
	.comm	CRB_CMDPEG_STATE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
