	.file	"extr_tegra20-emc.c_emc_setup_hw.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"bootloader didn't specify DRAM auto-suspend mode\n"
	.text
	.p2align 4
	.type	emc_setup_hw, @function
emc_setup_hw:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rdi, QWORD PTR EMC_CFG_2[rip]
	add	rdi, QWORD PTR [rbx]
	mov	ebp, DWORD PTR EMC_REFRESH_OVERFLOW_INT[rip]
	or	ebp, DWORD PTR EMC_CLKCHANGE_COMPLETE_INT[rip]
	call	readl_relaxed@PLT
	mov	edx, DWORD PTR EMC_CLKCHANGE_PD_ENABLE[rip]
	or	edx, DWORD PTR EMC_CLKCHANGE_SR_ENABLE[rip]
	test	edx, eax
	je	.L6
	or	eax, DWORD PTR EMC_CLKCHANGE_REQ_ENABLE[rip]
	mov	rsi, QWORD PTR EMC_CFG_2[rip]
	mov	edi, eax
	add	rsi, QWORD PTR [rbx]
	call	writel_relaxed@PLT
	mov	edi, ebp
	mov	rsi, QWORD PTR EMC_INTMASK[rip]
	add	rsi, QWORD PTR [rbx]
	call	writel_relaxed@PLT
	mov	rsi, QWORD PTR EMC_INTSTATUS[rip]
	mov	edi, ebp
	add	rsi, QWORD PTR [rbx]
	call	writel_relaxed@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	edi, DWORD PTR 8[rbx]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	emc_setup_hw, .-emc_setup_hw
	.comm	EMC_REFRESH_OVERFLOW_INT,4,4
	.comm	EMC_INTSTATUS,8,8
	.comm	EMC_INTMASK,8,8
	.comm	EMC_CLKCHANGE_SR_ENABLE,4,4
	.comm	EMC_CLKCHANGE_REQ_ENABLE,4,4
	.comm	EMC_CLKCHANGE_PD_ENABLE,4,4
	.comm	EMC_CLKCHANGE_COMPLETE_INT,4,4
	.comm	EMC_CFG_2,8,8
	.comm	EINVAL,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_tegra20-emc.c_emc_setup_hw.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"bootloader didn't specify DRAM auto-suspend mode\012"
	.ascii	"\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	emc_setup_hw, %function
emc_setup_hw:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, .L7
	ldr	r1, .L7+4
	ldr	r3, .L7+8
	ldr	r2, [r6]
	mov	r4, r0
	ldr	r0, [r0]
	ldr	r3, [r3]
	ldr	r5, [r1]
	add	r0, r0, r2
	orr	r5, r5, r3
	bl	readl_relaxed
	ldr	r3, .L7+12
	ldr	r2, .L7+16
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r2
	tst	r3, r0
	beq	.L6
	ldr	r3, .L7+20
	ldr	r2, [r6]
	ldr	r1, [r4]
	ldr	r3, [r3]
	add	r1, r1, r2
	orr	r0, r0, r3
	bl	writel_relaxed
	ldr	r3, .L7+24
	ldr	r1, [r4]
	ldr	r3, [r3]
	mov	r0, r5
	add	r1, r1, r3
	bl	writel_relaxed
	ldr	r3, .L7+28
	ldr	r1, [r4]
	ldr	r3, [r3]
	mov	r0, r5
	add	r1, r1, r3
	bl	writel_relaxed
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L6:
	ldr	r0, [r4, #4]
	ldr	r1, .L7+32
	bl	dev_err
	ldr	r3, .L7+36
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, pc}
.L8:
	.align	2
.L7:
	.word	EMC_CFG_2
	.word	EMC_REFRESH_OVERFLOW_INT
	.word	EMC_CLKCHANGE_COMPLETE_INT
	.word	EMC_CLKCHANGE_PD_ENABLE
	.word	EMC_CLKCHANGE_SR_ENABLE
	.word	EMC_CLKCHANGE_REQ_ENABLE
	.word	EMC_INTMASK
	.word	EMC_INTSTATUS
	.word	.LC0
	.word	EINVAL
	.size	emc_setup_hw, .-emc_setup_hw
	.comm	EMC_REFRESH_OVERFLOW_INT,4,4
	.comm	EMC_INTSTATUS,4,4
	.comm	EMC_INTMASK,4,4
	.comm	EMC_CLKCHANGE_SR_ENABLE,4,4
	.comm	EMC_CLKCHANGE_REQ_ENABLE,4,4
	.comm	EMC_CLKCHANGE_PD_ENABLE,4,4
	.comm	EMC_CLKCHANGE_COMPLETE_INT,4,4
	.comm	EMC_CFG_2,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
