Lines Matching refs:para
338 static void mctl_com_init(struct dram_sun9i_para *para) in mctl_com_init() argument
344 writel(((para->chan == 2) ? MCTL_CR_CHANNEL_DUAL : in mctl_com_init()
347 | MCTL_CR_ROW(para->rows) in mctl_com_init()
348 | ((para->bus_width == 32) ? MCTL_CR_BUSW32 : MCTL_CR_BUSW16) in mctl_com_init()
349 | MCTL_CR_PAGE_SIZE(para->page_size) | MCTL_CR_RANK(para->rank), in mctl_com_init()
355 static u32 mctl_channel_init(u32 ch_index, struct dram_sun9i_para *para) in mctl_channel_init() argument
375 const u32 tREFI = NS2CYCLES_FLOOR(para->tREFI); in mctl_channel_init()
376 const u32 tRFC = NS2CYCLES_ROUNDUP(para->tRFC); in mctl_channel_init()
377 const u32 tRCD = PS2CYCLES_ROUNDUP(para->tRCD); in mctl_channel_init()
378 const u32 tRP = PS2CYCLES_ROUNDUP(para->tRP); in mctl_channel_init()
379 const u32 tRC = PS2CYCLES_ROUNDUP(para->tRC); in mctl_channel_init()
380 const u32 tRAS = PS2CYCLES_ROUNDUP(para->tRAS); in mctl_channel_init()
383 const u32 tDLLK = para->tDLLK; in mctl_channel_init()
384 const u32 tRTP = MAX(para->tRTP.ck, PS2CYCLES_ROUNDUP(para->tRTP.ps)); in mctl_channel_init()
385 const u32 tWTR = MAX(para->tWTR.ck, PS2CYCLES_ROUNDUP(para->tWTR.ps)); in mctl_channel_init()
386 const u32 tWR = NS2CYCLES_FLOOR(para->tWR); in mctl_channel_init()
387 const u32 tMRD = para->tMRD; in mctl_channel_init()
388 const u32 tMOD = MAX(para->tMOD.ck, PS2CYCLES_ROUNDUP(para->tMOD.ps)); in mctl_channel_init()
389 const u32 tCCD = para->tCCD; in mctl_channel_init()
390 const u32 tRRD = MAX(para->tRRD.ck, PS2CYCLES_ROUNDUP(para->tRRD.ps)); in mctl_channel_init()
391 const u32 tFAW = PS2CYCLES_ROUNDUP(para->tFAW); in mctl_channel_init()
396 const u32 tZQoper = MAX(para->tZQoper.ck, in mctl_channel_init()
397 PS2CYCLES_ROUNDUP(para->tZQoper.ps)); in mctl_channel_init()
398 const u32 tZQCS = MAX(para->tZQCS.ck, in mctl_channel_init()
399 PS2CYCLES_ROUNDUP(para->tZQCS.ps)); in mctl_channel_init()
406 const u32 tXP = MAX(para->tXP.ck, PS2CYCLES_ROUNDUP(para->tXP.ps)); in mctl_channel_init()
407 const u32 tXPDLL = MAX(para->tXPDLL.ck, in mctl_channel_init()
408 PS2CYCLES_ROUNDUP(para->tXPDLL.ps)); in mctl_channel_init()
409 const u32 tCKE = MAX(para->tCKE.ck, PS2CYCLES_ROUNDUP(para->tCKE.ps)); in mctl_channel_init()
415 const u32 tXS = MAX(para->tXS.ck, PS2CYCLES_ROUNDUP(para->tXS.ps)); in mctl_channel_init()
416 const u32 tXSDLL = para->tXSDLL; in mctl_channel_init()
417 const u32 tCKSRE = MAX(para->tCKSRE.ck, in mctl_channel_init()
418 PS2CYCLES_ROUNDUP(para->tCKSRE.ps)); in mctl_channel_init()
420 const u32 tCKSRX = MAX(para->tCKSRX.ck, in mctl_channel_init()
421 PS2CYCLES_ROUNDUP(para->tCKSRX.ps)); in mctl_channel_init()
424 const u32 tWLMRD = para->tWLMRD; in mctl_channel_init()
426 const u32 tWLO = PS2CYCLES_FLOOR(para->tWLO); in mctl_channel_init()
432 for (i = 0; i < para->cl_cwl_numentries; ++i) { in mctl_channel_init()
435 if ((para->cl_cwl_table[i].tCKmin <= tCK) && in mctl_channel_init()
436 (tCK < para->cl_cwl_table[i].tCKmax)) { in mctl_channel_init()
437 CL = para->cl_cwl_table[i].CL; in mctl_channel_init()
438 CWL = para->cl_cwl_table[i].CWL; in mctl_channel_init()
459 if (para->dram_type == DRAM_TYPE_DDR3) { in mctl_channel_init()
572 if (para->dram_type == DRAM_TYPE_DDR3) { in mctl_channel_init()
592 writel(MCTL_MSTR_DEVICETYPE(para->dram_type) | in mctl_channel_init()
593 MCTL_MSTR_BURSTLENGTH(para->dram_type) | in mctl_channel_init()
594 MCTL_MSTR_ACTIVERANKS(para->rank) | in mctl_channel_init()
598 if (para->dram_type == DRAM_TYPE_DDR3) { in mctl_channel_init()
629 if (para->dram_type != DRAM_TYPE_DDR3) in mctl_channel_init()
663 if (para->dram_type == DRAM_TYPE_DDR3) { in mctl_channel_init()
688 writel(MCTL_DTCR_DEFAULT | MCTL_DTCR_RANKEN(para->rank), in mctl_channel_init()
717 if (para->dram_type == DRAM_TYPE_DDR3) in mctl_channel_init()
749 if (para->dram_type == DRAM_TYPE_DDR3) in mctl_channel_init()
868 struct dram_sun9i_para para = { in sunxi_dram_init() local
942 if (!mctl_channel_init(0, ¶)) in sunxi_dram_init()
946 if (!mctl_channel_init(1, ¶)) { in sunxi_dram_init()
954 mctl_com_init(¶); in sunxi_dram_init()