	.file	"extr_tegra-kbc.c_tegra_kbc_start.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	tegra_kbc_start, @function
tegra_kbc_start:
.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
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	edi, DWORD PTR 36[rdi]
	call	clk_prepare_enable@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L8
	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
.L8:
	.cfi_restore_state
	mov	edi, DWORD PTR 32[rbx]
	call	reset_control_assert@PLT
	mov	edi, 100
	call	udelay@PLT
	mov	edi, DWORD PTR 32[rbx]
	call	reset_control_deassert@PLT
	mov	edi, 100
	call	udelay@PLT
	mov	rdi, rbx
	call	tegra_kbc_config_pins@PLT
	xor	esi, esi
	mov	rdi, rbx
	call	tegra_kbc_setup_wakekeys@PLT
	mov	edi, DWORD PTR [rbx]
	mov	rsi, QWORD PTR KBC_RPT_DLY_0[rip]
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	mov	esi, DWORD PTR KBC_MAX_DEBOUNCE_CNT[rip]
	mov	edi, DWORD PTR 28[rbx]
	call	min@PLT
	mov	edi, eax
	call	KBC_DEBOUNCE_CNT_SHIFT@PLT
	mov	edi, 1
	mov	r12d, eax
	call	KBC_FIFO_TH_CNT_SHIFT@PLT
	mov	edi, DWORD PTR KBC_CONTROL_FIFO_CNT_INT_EN[rip]
	or	edi, DWORD PTR KBC_CONTROL_KBC_EN[rip]
	or	edi, r12d
	mov	rsi, QWORD PTR KBC_CONTROL_0[rip]
	add	rsi, QWORD PTR 8[rbx]
	or	edi, eax
	call	writel@PLT
	mov	rdi, QWORD PTR KBC_INIT_DLY_0[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readl@PLT
	and	eax, 1048575
	mov	edi, eax
	sal	edi, 5
	call	usecs_to_jiffies@PLT
	mov	QWORD PTR 16[rbx], 0
	mov	DWORD PTR 24[rbx], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, QWORD PTR KBC_KP_ENT0_0[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readl@PLT
	mov	rdi, QWORD PTR KBC_KP_ENT1_0[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readl@PLT
.L4:
	mov	rdi, QWORD PTR KBC_INT_0[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readl@PLT
	sar	eax, 4
	mov	r12d, eax
	jne	.L9
	mov	rsi, QWORD PTR KBC_INT_0[rip]
	mov	edi, 7
	add	rsi, QWORD PTR 8[rbx]
	call	writel@PLT
	mov	edi, DWORD PTR 4[rbx]
	call	enable_irq@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	tegra_kbc_start, .-tegra_kbc_start
	.comm	KBC_RPT_DLY_0,8,8
	.comm	KBC_MAX_DEBOUNCE_CNT,4,4
	.comm	KBC_KP_ENT1_0,8,8
	.comm	KBC_KP_ENT0_0,8,8
	.comm	KBC_INT_0,8,8
	.comm	KBC_INIT_DLY_0,8,8
	.comm	KBC_CONTROL_KBC_EN,4,4
	.comm	KBC_CONTROL_FIFO_CNT_INT_EN,4,4
	.comm	KBC_CONTROL_0,8,8
	.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_tegra-kbc.c_tegra_kbc_start.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tegra_kbc_start, %function
tegra_kbc_start:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r0, [r0, #28]
	bl	clk_prepare_enable
	subs	r4, r0, #0
	beq	.L7
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	ldr	r0, [r5, #24]
	bl	reset_control_assert
	mov	r0, #100
	bl	udelay
	ldr	r0, [r5, #24]
	bl	reset_control_deassert
	mov	r0, #100
	bl	udelay
	mov	r0, r5
	bl	tegra_kbc_config_pins
	mov	r1, r4
	mov	r0, r5
	bl	tegra_kbc_setup_wakekeys
	ldr	r3, .L9
	ldr	r1, [r5, #8]
	ldr	r3, [r3]
	ldr	r0, [r5]
	add	r1, r1, r3
	bl	writel
	ldr	r3, .L9+4
	ldr	r0, [r5, #20]
	ldr	r1, [r3]
	bl	min
	bl	KBC_DEBOUNCE_CNT_SHIFT
	mov	r6, r0
	mov	r0, #1
	bl	KBC_FIFO_TH_CNT_SHIFT
	ldr	r2, .L9+8
	ldr	r3, .L9+12
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, .L9+16
	orr	r3, r3, r1
	ldr	r2, [r2]
	ldr	r1, [r5, #8]
	orr	r3, r3, r6
	add	r1, r1, r2
	orr	r0, r0, r3
	bl	writel
	ldr	r3, .L9+20
	ldr	r0, [r5, #8]
	ldr	r3, [r3]
	ldr	r6, .L9+24
	add	r0, r0, r3
	bl	readl
	bic	r0, r0, #-16777216
	bic	r0, r0, #15728640
	lsl	r0, r0, #5
	bl	usecs_to_jiffies
	ldr	r8, .L9+28
	ldr	r7, .L9+32
	str	r0, [r5, #16]
	str	r4, [r5, #12]
	b	.L4
.L8:
	ldr	r3, [r8]
	ldr	r0, [r5, #8]
	add	r0, r0, r3
	bl	readl
	ldr	r0, [r5, #8]
	ldr	r3, [r7]
	add	r0, r0, r3
	bl	readl
.L4:
	ldr	r0, [r5, #8]
	ldr	r3, [r6]
	add	r0, r0, r3
	bl	readl
	asrs	r4, r0, #4
	bne	.L8
	ldr	r3, [r6]
	ldr	r1, [r5, #8]
	mov	r0, #7
	add	r1, r1, r3
	bl	writel
	ldr	r0, [r5, #4]
	bl	enable_irq
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	.align	2
.L9:
	.word	KBC_RPT_DLY_0
	.word	KBC_MAX_DEBOUNCE_CNT
	.word	KBC_CONTROL_KBC_EN
	.word	KBC_CONTROL_FIFO_CNT_INT_EN
	.word	KBC_CONTROL_0
	.word	KBC_INIT_DLY_0
	.word	KBC_INT_0
	.word	KBC_KP_ENT0_0
	.word	KBC_KP_ENT1_0
	.size	tegra_kbc_start, .-tegra_kbc_start
	.comm	KBC_RPT_DLY_0,4,4
	.comm	KBC_MAX_DEBOUNCE_CNT,4,4
	.comm	KBC_KP_ENT1_0,4,4
	.comm	KBC_KP_ENT0_0,4,4
	.comm	KBC_INT_0,4,4
	.comm	KBC_INIT_DLY_0,4,4
	.comm	KBC_CONTROL_KBC_EN,4,4
	.comm	KBC_CONTROL_FIFO_CNT_INT_EN,4,4
	.comm	KBC_CONTROL_0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
