	.file	"extr_lcdc.c_omap_lcdc_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"lcd_ck"
.LC1:
	.string	"unable to access LCD clock\n"
.LC2:
	.string	"tc_ck"
.LC3:
	.string	"unable to access TC clock\n"
.LC4:
	.string	"failed to adjust LCD rate\n"
.LC5:
	.string	"unable to get IRQ\n"
.LC6:
	.string	"unable to get LCD DMA\n"
.LC7:
	.string	"omapfb: LCDC initialized\n"
	.text
	.p2align 4
	.type	omap_lcdc_init, @function
omap_lcdc_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	mov	DWORD PTR lcdc[rip], esi
	mov	esi, DWORD PTR OMAP_LCDC_CONTROL[rip]
	mov	QWORD PTR lcdc[rip+16], rdi
	xor	edi, edi
	mov	QWORD PTR lcdc[rip+24], 0
	call	omap_writel@PLT
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC0[rip]
	call	clk_get@PLT
	mov	rdi, rax
	mov	QWORD PTR lcdc[rip+8], rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L29
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC2[rip]
	call	clk_get@PLT
	mov	rdi, rax
	mov	r14, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L30
	mov	rdi, r14
	call	clk_get_rate@PLT
	mov	rdi, r14
	mov	r12d, eax
	call	clk_put@PLT
	xor	eax, eax
	call	machine_is_ams_delta@PLT
	test	rax, rax
	je	.L5
	test	r12d, r12d
	lea	esi, 3[r12]
	cmovs	r12d, esi
	sar	r12d, 2
.L5:
	xor	eax, eax
	call	machine_is_omap_h3@PLT
	test	rax, rax
	je	.L6
	movsx	rax, r12d
	sar	r12d, 31
	imul	rax, rax, 1431655766
	shr	rax, 32
	sub	eax, r12d
	mov	r12d, eax
.L6:
	mov	rdi, QWORD PTR lcdc[rip+8]
	mov	esi, r12d
	call	clk_set_rate@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L31
	mov	rdi, QWORD PTR lcdc[rip+8]
	call	clk_enable@PLT
	mov	ecx, DWORD PTR MODULE_NAME[rip]
	mov	r8, rbx
	xor	edx, edx
	mov	esi, DWORD PTR lcdc_irq_handler[rip]
	mov	edi, DWORD PTR OMAP_LCDC_IRQ[rip]
	call	request_irq@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L32
	mov	edi, DWORD PTR lcdc_dma_handler[rip]
	xor	esi, esi
	call	omap_request_lcd_dma@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L33
	mov	edi, ebp
	call	omap_set_lcd_dma_single_transfer@PLT
	mov	edi, ebp
	call	omap_set_lcd_dma_ext_controller@PLT
	test	ebp, ebp
	jne	.L12
	xor	eax, eax
	call	alloc_palette_ram@PLT
	test	eax, eax
	js	.L19
	mov	rdi, r13
	call	setup_fbmem@PLT
	mov	ebx, eax
	test	eax, eax
	jns	.L17
	xor	eax, eax
	mov	r12d, ebx
	call	free_palette_ram@PLT
.L13:
	xor	eax, eax
	call	omap_free_lcd_dma@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L30:
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC3[rip]
	call	dev_err@PLT
	mov	rdi, r14
	call	PTR_ERR@PLT
	mov	r12d, eax
.L4:
	mov	rdi, QWORD PTR lcdc[rip+8]
	call	clk_put@PLT
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L29:
	.cfi_restore_state
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	mov	rdi, QWORD PTR lcdc[rip+8]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	PTR_ERR@PLT
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC5[rip]
	call	dev_err@PLT
.L9:
	mov	rdi, QWORD PTR lcdc[rip+8]
	call	clk_disable@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L31:
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC4[rip]
	call	dev_err@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L33:
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC6[rip]
	call	dev_err@PLT
.L11:
	mov	rsi, QWORD PTR lcdc[rip+16]
	mov	edi, DWORD PTR OMAP_LCDC_IRQ[rip]
	call	free_irq@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdi, r13
	call	setup_fbmem@PLT
	test	eax, eax
	js	.L19
.L17:
	lea	rdi, .LC7[rip]
	call	pr_info@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	r12d, eax
	jmp	.L13
	.cfi_endproc
.LFE0:
	.size	omap_lcdc_init, .-omap_lcdc_init
	.comm	lcdc_irq_handler,4,4
	.comm	lcdc_dma_handler,4,4
	.comm	lcdc,32,32
	.comm	OMAP_LCDC_IRQ,4,4
	.comm	OMAP_LCDC_CONTROL,4,4
	.comm	MODULE_NAME,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_lcdc.c_omap_lcdc_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"lcd_ck\000"
	.align	2
.LC1:
	.ascii	"unable to access LCD clock\012\000"
	.align	2
.LC2:
	.ascii	"tc_ck\000"
	.align	2
.LC3:
	.ascii	"unable to access TC clock\012\000"
	.align	2
.LC4:
	.ascii	"failed to adjust LCD rate\012\000"
	.align	2
.LC5:
	.ascii	"unable to get IRQ\012\000"
	.align	2
.LC6:
	.ascii	"unable to get LCD DMA\012\000"
	.align	2
.LC7:
	.ascii	"omapfb: LCDC initialized\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	omap_lcdc_init, %function
omap_lcdc_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r5, r0
	mov	r7, r1
	ldr	r1, .L34
	ldr	r4, .L34+4
	mov	r0, r3
	sub	sp, sp, #12
	ldr	r1, [r1]
	mov	r8, r2
	str	r3, [r4, #12]
	str	r5, [r4, #8]
	str	r7, [r4]
	bl	omap_writel
	ldr	r1, .L34+8
	ldr	r0, [r5]
	bl	clk_get
	str	r0, [r4, #4]
	bl	IS_ERR
	cmp	r0, #0
	bne	.L29
	ldr	r1, .L34+12
	ldr	r0, [r5]
	bl	clk_get
	mov	r9, r0
	bl	IS_ERR
	cmp	r0, #0
	bne	.L30
	mov	r0, r9
	bl	clk_get_rate
	mov	r6, r0
	mov	r0, r9
	bl	clk_put
	bl	machine_is_ams_delta
	cmp	r0, #0
	beq	.L5
	add	r1, r6, #3
	cmp	r6, #0
	movlt	r6, r1
	asr	r6, r6, #2
.L5:
	bl	machine_is_omap_h3
	cmp	r0, #0
	ldrne	r3, .L34+16
	ldr	r0, [r4, #4]
	smullne	r2, r3, r6, r3
	subne	r6, r3, r6, asr #31
	mov	r1, r6
	bl	clk_set_rate
	subs	r6, r0, #0
	bne	.L31
	ldr	r0, [r4, #4]
	bl	clk_enable
	ldr	r9, .L34+20
	ldr	r3, .L34+24
	ldr	r1, .L34+28
	str	r5, [sp]
	mov	r2, r6
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r0, [r9]
	bl	request_irq
	subs	r6, r0, #0
	bne	.L32
	ldr	r3, .L34+32
	mov	r1, r6
	ldr	r0, [r3]
	bl	omap_request_lcd_dma
	subs	r6, r0, #0
	bne	.L33
	mov	r0, r7
	bl	omap_set_lcd_dma_single_transfer
	mov	r0, r7
	bl	omap_set_lcd_dma_ext_controller
	cmp	r7, #0
	bne	.L12
	bl	alloc_palette_ram
	cmp	r0, #0
	blt	.L19
	mov	r0, r8
	bl	setup_fbmem
	subs	r5, r0, #0
	bge	.L17
	bl	free_palette_ram
	mov	r6, r5
.L13:
	bl	omap_free_lcd_dma
	b	.L11
.L30:
	ldr	r1, .L34+36
	ldr	r0, [r5]
	bl	dev_err
	mov	r0, r9
	bl	PTR_ERR
	mov	r6, r0
.L4:
	ldr	r0, [r4, #4]
	bl	clk_put
.L1:
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L29:
	ldr	r0, [r5]
	ldr	r1, .L34+40
	bl	dev_err
	ldr	r0, [r4, #4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, lr}
	b	PTR_ERR
.L32:
	ldr	r0, [r5]
	ldr	r1, .L34+44
	bl	dev_err
.L9:
	ldr	r0, [r4, #4]
	bl	clk_disable
	b	.L4
.L31:
	ldr	r0, [r5]
	ldr	r1, .L34+48
	bl	dev_err
	b	.L4
.L33:
	ldr	r0, [r5]
	ldr	r1, .L34+52
	bl	dev_err
.L11:
	ldr	r0, [r9]
	ldr	r1, [r4, #8]
	bl	free_irq
	b	.L9
.L12:
	mov	r0, r8
	bl	setup_fbmem
	cmp	r0, #0
	blt	.L19
.L17:
	ldr	r0, .L34+56
	bl	pr_info
	b	.L1
.L19:
	mov	r6, r0
	b	.L13
.L35:
	.align	2
.L34:
	.word	OMAP_LCDC_CONTROL
	.word	lcdc
	.word	.LC0
	.word	.LC2
	.word	1431655766
	.word	OMAP_LCDC_IRQ
	.word	MODULE_NAME
	.word	lcdc_irq_handler
	.word	lcdc_dma_handler
	.word	.LC3
	.word	.LC1
	.word	.LC5
	.word	.LC4
	.word	.LC6
	.word	.LC7
	.size	omap_lcdc_init, .-omap_lcdc_init
	.comm	lcdc_irq_handler,4,4
	.comm	lcdc_dma_handler,4,4
	.comm	lcdc,16,4
	.comm	OMAP_LCDC_IRQ,4,4
	.comm	OMAP_LCDC_CONTROL,4,4
	.comm	MODULE_NAME,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
