	.file	"extr_ddr.c_ddr_setup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ddr_setup
	.type	ddr_setup, @function
ddr_setup:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edx, DWORD PTR C_BLKEN_DDR_ON[rip]
	mov	rax, QWORD PTR C_DDR_BLKEN_REG[rip]
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	ebp, edi
	lea	rdi, C_TP_DDR2_25_CL6_1GB[rip]
	mov	DWORD PTR [rax], edx
	call	ddr_timing_initialisation@PLT
	mov	esi, ebp
	lea	rdi, C_CP_DDR2_25_CL6[rip]
	call	ddr_normal_initialisation@PLT
	mov	ecx, DWORD PTR DDR_ROUTE_CPU0_WRDATA_SHIFT[rip]
	mov	edx, 3
	mov	esi, 2
	mov	eax, edx
	sal	eax, cl
	mov	ecx, DWORD PTR DDR_ROUTE_CPU0_RDDATA_SHIFT[rip]
	bts	eax, ecx
	mov	ecx, DWORD PTR DDR_ROUTE_CPU1_INSTR_SHIFT[rip]
	sal	esi, cl
	mov	ecx, DWORD PTR DDR_ROUTE_CPU1_RDDATA_SHIFT[rip]
	or	eax, esi
	mov	esi, edx
	sal	esi, cl
	mov	ecx, DWORD PTR DDR_ROUTE_CPU1_WRDATA_SHIFT[rip]
	or	eax, esi
	sal	edx, cl
	or	eax, edx
	mov	rdx, QWORD PTR C_DDR_TRANSACTION_ROUTING[rip]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR C_BLKEN_DDR_ON[rip]
	mov	rdx, QWORD PTR C_DDR_BLKEN_REG[rip]
	add	eax, 65535
	mov	DWORD PTR [rdx], eax
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ddr_setup, .-ddr_setup
	.comm	DDR_ROUTE_CPU1_WRDATA_SHIFT,4,4
	.comm	DDR_ROUTE_CPU1_RDDATA_SHIFT,4,4
	.comm	DDR_ROUTE_CPU1_INSTR_SHIFT,4,4
	.comm	DDR_ROUTE_CPU0_WRDATA_SHIFT,4,4
	.comm	DDR_ROUTE_CPU0_RDDATA_SHIFT,4,4
	.comm	DDR_ROUTE_CPU0_INSTR_SHIFT,4,4
	.comm	C_TP_DDR2_25_CL6_1GB,4,4
	.comm	C_DDR_TRANSACTION_ROUTING,8,8
	.comm	C_DDR_BLKEN_REG,8,8
	.comm	C_CP_DDR2_25_CL6,4,4
	.comm	C_BLKEN_DDR_ON,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_ddr.c_ddr_setup.c"
	.text
	.align	2
	.global	ddr_setup
	.syntax unified
	.arm
	.fpu softvfp
	.type	ddr_setup, %function
ddr_setup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r5, .L4
	ldr	r6, .L4+4
	ldr	r3, [r5]
	ldr	r2, [r6]
	ldr	r0, .L4+8
	str	r2, [r3]
	bl	ddr_timing_initialisation
	mov	r1, r4
	ldr	r0, .L4+12
	bl	ddr_normal_initialisation
	mov	r1, #3
	mov	lr, #1
	mov	ip, #2
	ldr	r2, .L4+16
	ldr	r3, .L4+20
	ldr	r2, [r2]
	ldr	r0, .L4+24
	ldr	r3, [r3]
	ldr	r0, [r0]
	lsl	r2, r1, r2
	orr	r3, r2, lr, lsl r3
	ldr	r2, .L4+28
	orr	r3, r3, ip, lsl r0
	ldr	r0, .L4+32
	ldr	ip, [r2]
	ldr	r2, .L4+36
	ldr	r0, [r0]
	ldr	r2, [r2]
	orr	r3, r3, r1, lsl ip
	orr	r3, r3, r1, lsl r0
	str	r3, [r2]
	ldr	r3, [r6]
	ldr	r2, [r5]
	add	r3, r3, #65280
	add	r3, r3, #255
	str	r3, [r2]
	pop	{r4, r5, r6, pc}
.L5:
	.align	2
.L4:
	.word	C_DDR_BLKEN_REG
	.word	C_BLKEN_DDR_ON
	.word	C_TP_DDR2_25_CL6_1GB
	.word	C_CP_DDR2_25_CL6
	.word	DDR_ROUTE_CPU0_WRDATA_SHIFT
	.word	DDR_ROUTE_CPU0_RDDATA_SHIFT
	.word	DDR_ROUTE_CPU1_INSTR_SHIFT
	.word	DDR_ROUTE_CPU1_RDDATA_SHIFT
	.word	DDR_ROUTE_CPU1_WRDATA_SHIFT
	.word	C_DDR_TRANSACTION_ROUTING
	.size	ddr_setup, .-ddr_setup
	.comm	DDR_ROUTE_CPU1_WRDATA_SHIFT,4,4
	.comm	DDR_ROUTE_CPU1_RDDATA_SHIFT,4,4
	.comm	DDR_ROUTE_CPU1_INSTR_SHIFT,4,4
	.comm	DDR_ROUTE_CPU0_WRDATA_SHIFT,4,4
	.comm	DDR_ROUTE_CPU0_RDDATA_SHIFT,4,4
	.comm	DDR_ROUTE_CPU0_INSTR_SHIFT,4,4
	.comm	C_TP_DDR2_25_CL6_1GB,4,4
	.comm	C_DDR_TRANSACTION_ROUTING,4,4
	.comm	C_DDR_BLKEN_REG,4,4
	.comm	C_CP_DDR2_25_CL6,4,4
	.comm	C_BLKEN_DDR_ON,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
