	.file	"extr_rfbi.c_rfbi_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"can't ioremap RFBI\n"
.LC1:
	.string	"can't get DISPC irq\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"omapfb: RFBI version %d.%d initialized\n"
	.text
	.p2align 4
	.type	rfbi_init, @function
rfbi_init:
.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	QWORD PTR rfbi[rip+16], rdi
	mov	esi, DWORD PTR SZ_1K[rip]
	mov	edi, DWORD PTR RFBI_BASE[rip]
	call	ioremap@PLT
	mov	DWORD PTR rfbi[rip+8], eax
	test	eax, eax
	je	.L10
	xor	eax, eax
	call	rfbi_get_clocks@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L1
	mov	edi, 1
	call	rfbi_enable_clocks@PLT
	mov	edi, DWORD PTR rfbi[rip+4]
	call	clk_get_rate@PLT
	mov	edi, DWORD PTR RFBI_SYSCONFIG[rip]
	mov	esi, 2
	mov	edx, eax
	cdqe
	imul	rax, rax, 274877907
	sar	edx, 31
	sar	rax, 38
	sub	eax, edx
	mov	DWORD PTR rfbi[rip], eax
	call	rfbi_write_reg@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, DWORD PTR RFBI_SYSSTATUS[rip]
	call	rfbi_read_reg@PLT
	test	al, 1
	je	.L4
	mov	edi, DWORD PTR RFBI_SYSCONFIG[rip]
	call	rfbi_read_reg@PLT
	mov	edi, DWORD PTR RFBI_SYSCONFIG[rip]
	or	eax, 17
	mov	esi, eax
	call	rfbi_write_reg@PLT
	mov	edi, DWORD PTR RFBI_CONFIG0[rip]
	mov	esi, 3146019
	call	rfbi_write_reg@PLT
	mov	edi, DWORD PTR RFBI_DATA_CYCLE1_0[rip]
	mov	esi, 16
	call	rfbi_write_reg@PLT
	mov	edi, DWORD PTR RFBI_CONTROL[rip]
	call	rfbi_read_reg@PLT
	mov	edi, DWORD PTR RFBI_CONTROL[rip]
	mov	esi, 4
	call	rfbi_write_reg@PLT
	mov	esi, DWORD PTR rfbi_dma_callback[rip]
	mov	edi, DWORD PTR DISPC_IRQ_FRAMEMASK[rip]
	xor	edx, edx
	call	omap_dispc_request_irq@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L11
	mov	edi, DWORD PTR RFBI_REVISION[rip]
	xor	r12d, r12d
	call	rfbi_read_reg@PLT
	lea	rdi, .LC2[rip]
	mov	edx, eax
	sar	eax, 4
	and	eax, 15
	and	edx, 15
	mov	esi, eax
	call	pr_info@PLT
	xor	edi, edi
	call	rfbi_enable_clocks@PLT
.L1:
	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	edi, DWORD PTR [rbx]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	xor	edi, edi
	call	rfbi_enable_clocks@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	rfbi_init, .-rfbi_init
	.comm	rfbi_dma_callback,4,4
	.comm	rfbi,24,16
	.comm	SZ_1K,4,4
	.comm	RFBI_SYSSTATUS,4,4
	.comm	RFBI_SYSCONFIG,4,4
	.comm	RFBI_REVISION,4,4
	.comm	RFBI_DATA_CYCLE1_0,4,4
	.comm	RFBI_CONTROL,4,4
	.comm	RFBI_CONFIG0,4,4
	.comm	RFBI_BASE,4,4
	.comm	ENOMEM,4,4
	.comm	DISPC_IRQ_FRAMEMASK,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_rfbi.c_rfbi_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"can't ioremap RFBI\012\000"
	.align	2
.LC1:
	.ascii	"can't get DISPC irq\012\000"
	.align	2
.LC2:
	.ascii	"omapfb: RFBI version %d.%d initialized\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rfbi_init, %function
rfbi_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r2, .L12
	ldr	r3, .L12+4
	ldr	r6, .L12+8
	ldr	r1, [r2]
	ldr	r0, [r3]
	str	r5, [r6, #12]
	bl	ioremap
	cmp	r0, #0
	str	r0, [r6, #8]
	beq	.L10
	bl	rfbi_get_clocks
	subs	r4, r0, #0
	blt	.L1
	mov	r0, #1
	bl	rfbi_enable_clocks
	ldr	r0, [r6, #4]
	bl	clk_get_rate
	ldr	r3, .L12+12
	ldr	r7, .L12+16
	smull	r2, r3, r0, r3
	asr	r0, r0, #31
	rsb	r3, r0, r3, asr #6
	mov	r1, #2
	ldr	r0, [r7]
	str	r3, [r6]
	bl	rfbi_write_reg
	ldr	r4, .L12+20
.L4:
	ldr	r0, [r4]
	bl	rfbi_read_reg
	tst	r0, #1
	beq	.L4
	ldr	r0, [r7]
	bl	rfbi_read_reg
	mov	r1, r0
	ldr	r0, [r7]
	orr	r1, r1, #17
	bl	rfbi_write_reg
	ldr	r3, .L12+24
	ldr	r1, .L12+28
	ldr	r0, [r3]
	bl	rfbi_write_reg
	ldr	r3, .L12+32
	ldr	r4, .L12+36
	ldr	r0, [r3]
	mov	r1, #16
	bl	rfbi_write_reg
	ldr	r0, [r4]
	bl	rfbi_read_reg
	mov	r1, #4
	ldr	r0, [r4]
	bl	rfbi_write_reg
	ldr	r2, .L12+40
	ldr	r3, .L12+44
	ldr	r1, [r2]
	ldr	r0, [r3]
	mov	r2, #0
	bl	omap_dispc_request_irq
	subs	r4, r0, #0
	blt	.L11
	ldr	r3, .L12+48
	mov	r4, #0
	ldr	r0, [r3]
	bl	rfbi_read_reg
	asr	r1, r0, #4
	and	r2, r0, #15
	and	r1, r1, #15
	ldr	r0, .L12+52
	bl	pr_info
	mov	r0, r4
	bl	rfbi_enable_clocks
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	ldr	r0, [r5]
	ldr	r1, .L12+56
	bl	dev_err
	ldr	r3, .L12+60
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r1, .L12+64
	ldr	r0, [r5]
	bl	dev_err
	mov	r0, #0
	bl	rfbi_enable_clocks
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	.align	2
.L12:
	.word	SZ_1K
	.word	RFBI_BASE
	.word	rfbi
	.word	274877907
	.word	RFBI_SYSCONFIG
	.word	RFBI_SYSSTATUS
	.word	RFBI_CONFIG0
	.word	3146019
	.word	RFBI_DATA_CYCLE1_0
	.word	RFBI_CONTROL
	.word	rfbi_dma_callback
	.word	DISPC_IRQ_FRAMEMASK
	.word	RFBI_REVISION
	.word	.LC2
	.word	.LC0
	.word	ENOMEM
	.word	.LC1
	.size	rfbi_init, .-rfbi_init
	.comm	rfbi_dma_callback,4,4
	.comm	rfbi,16,4
	.comm	SZ_1K,4,4
	.comm	RFBI_SYSSTATUS,4,4
	.comm	RFBI_SYSCONFIG,4,4
	.comm	RFBI_REVISION,4,4
	.comm	RFBI_DATA_CYCLE1_0,4,4
	.comm	RFBI_CONTROL,4,4
	.comm	RFBI_CONFIG0,4,4
	.comm	RFBI_BASE,4,4
	.comm	ENOMEM,4,4
	.comm	DISPC_IRQ_FRAMEMASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
