Compile U-boot with PBI DDR initialization T1042

cancel
Showing results for 
Search instead for 
Did you mean: 

Compile U-boot with PBI DDR initialization T1042

128 Views
Contributor I

I have custom t1042 board. I use QSCV to get PBI comands to configure DDR controller and save them to T104x_pbi.cfg. How to compile uboot to prevent DDR reinitialisation?  

0 Kudos
3 Replies

38 Views
Contributor I

Thansk! It work..

phys_size_t dram_size =0x80000000;

..............
//dram_size = fsl_ddr_sdram();
.......
//dram_size = fsl_ddr_sdram_size();
......

0 Kudos

38 Views
NXP TechSupport
NXP TechSupport

Please refer to the following function in board/freescale/t104xrdb/ddr.c in u-boot source code, you need to disable invoking function fsl_ddr_sdram and fsl_ddr_sdram_size.

phys_size_t initdram(int board_type)
{
phys_size_t dram_size;

#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_RAMBOOT_PBL)
puts("Initializing....using SPD\n");
dram_size = fsl_ddr_sdram();
#else
dram_size = fsl_ddr_sdram_size();
#endif
dram_size = setup_ddr_tlbs(dram_size / 0x100000);
dram_size *= 0x100000;

#if defined(CONFIG_DEEP_SLEEP) && !defined(CONFIG_SPL_BUILD)
fsl_dp_resume();
#endif

return dram_size;
}

0 Kudos

38 Views
Contributor I

i have 4 Gb memory:

phys_size_t dram_size =0x100000000;

PBI initialise only 2GB memory:

# LAW15 to DDR (Memory Complex 1) - 2GB
mem [CCSR_ADDR 0xcf0] = 0x00000000
mem [CCSR_ADDR 0xcf4] = 0x00000000
mem [CCSR_ADDR 0xcf8] = 0x8100001E

2 Gb left unmapped. and linux does not start with errors:

Switched to clocksource timebase
NET: Registered protocol family 2
Machine check in kernel mode.
Caused by (from MCSR=8000): Load Error Report
Oops: Machine check, sig: 7 [#1]
SMP NR_CPUS=8 CoreNet Generic
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.1.8-rt8+gbd51baf #1
task: e8047910 ti: effd6000 task.ti: e8048000
NIP: c0107494 LR: c05c1b90 CTR: c0647ef0
REGS: effd7f10 TRAP: 0204 Not tainted (4.1.8-rt8+gbd51baf)
MSR: 00021002 <CE,ME> CR: 24ad2e48 XER: 00000000
DEAR: ffbf1000 ESR: 00800000
GPR00: c05c1b90 e8049ca0 e8047910 e83645c0 000000d0 000000d0 c09956b0 00000000
GPR08: 2d62f000 d25aa3e0 c09a1df0 00000000 24adbe84 00000000 c0002700 00000000
GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 c0a11388 00000001
GPR24: c08b888c c08b7f78 00000001 c09934c0 00029002 e83645c0 c09956b0 000000d0
NIP [c0107494] kmem_cache_alloc+0x44/0x120
LR [c05c1b90] sk_prot_alloc.isra.37+0x30/0x110
Call Trace:
[e8049cc0] [c05c1b90] sk_prot_alloc.isra.37+0x30/0x110
[e8049ce0] [c05c1c94] sk_alloc+0x24/0x80
[e8049d00] [c0647fd8] inet_create+0xe8/0x310
[e8049d50] [c05bd34c] __sock_create+0x10c/0x1c0
[e8049d80] [c06477a8] inet_ctl_sock_create+0x28/0x70
[e8049da0] [c0937654] igmp_net_init+0x84/0xd4
[e8049dc0] [c05d0750] ops_init.constprop.19+0xe0/0x160
[e8049de0] [c05d0854] register_pernet_operations.isra.14+0x84/0x110
[e8049df0] [c05d0910] register_pernet_subsys+0x30/0x60
[e8049e00] [c09376c4] igmp_mc_init+0x20/0x5c
[e8049e20] [c09374a8] inet_init+0x16c/0x294
[e8049e40] [c0001f80] do_one_initcall+0x90/0x1f0
[e8049eb0] [c0909b3c] kernel_init_freeable+0x138/0x208
[e8049f30] [c0002714] kernel_init+0x14/0x110
[e8049f40] [c000f278] ret_from_kernel_thread+0x5c/0x64
Instruction dump:

How to initialize all 4Gb of memory in PBI?

0 Kudos