Lines Matching refs:clk_period
2326 static inline u32 calc_tdvw_max(u32 trp_cnt, u32 clk_period, u32 trhoh_min, in calc_tdvw_max() argument
2330 clk_period /= 2; in calc_tdvw_max()
2332 return (trp_cnt + 1) * clk_period + trhoh_min + in calc_tdvw_max()
2337 static inline u32 calc_tdvw(u32 trp_cnt, u32 clk_period, u32 trhoh_min, in calc_tdvw() argument
2341 clk_period /= 2; in calc_tdvw()
2343 return (trp_cnt + 1) * clk_period + trhoh_min - trea_max; in calc_tdvw()
2356 u32 clk_period = DIV_ROUND_DOWN_ULL(1000000000000ULL, in cadence_nand_setup_interface() local
2383 dqs_sampl_res = clk_period / phony_dqs_mod; in cadence_nand_setup_interface()
2395 if (sdr->tRC_min <= clk_period && in cadence_nand_setup_interface()
2396 sdr->tRP_min <= (clk_period / 2) && in cadence_nand_setup_interface()
2397 sdr->tREH_min <= (clk_period / 2)) { in cadence_nand_setup_interface()
2400 tdvw = calc_tdvw(trp_cnt, clk_period, sdr->tRHOH_min, in cadence_nand_setup_interface()
2402 tdvw_max = calc_tdvw_max(trp_cnt, clk_period, sdr->tRHOH_min, in cadence_nand_setup_interface()
2426 + dqs_sampl_res) / clk_period; in cadence_nand_setup_interface()
2435 trp_cnt = calc_cycl(sdr->tRP_min, clk_period); in cadence_nand_setup_interface()
2436 trh = sdr->tRC_min - ((trp_cnt + 1) * clk_period); in cadence_nand_setup_interface()
2438 trh_cnt = calc_cycl(sdr->tREH_min, clk_period); in cadence_nand_setup_interface()
2440 trh_cnt = calc_cycl(trh, clk_period); in cadence_nand_setup_interface()
2442 tdvw = calc_tdvw(trp_cnt, clk_period, sdr->tRHOH_min, in cadence_nand_setup_interface()
2450 tdvw_max = calc_tdvw_max(trp_cnt, clk_period, in cadence_nand_setup_interface()
2476 + dqs_sampl_res) / clk_period; in cadence_nand_setup_interface()
2480 tdvw_max = calc_tdvw_max(trp_cnt, clk_period, in cadence_nand_setup_interface()
2484 if (sdr->tWC_min <= clk_period && in cadence_nand_setup_interface()
2485 (sdr->tWP_min + if_skew) <= (clk_period / 2) && in cadence_nand_setup_interface()
2486 (sdr->tWH_min + if_skew) <= (clk_period / 2)) { in cadence_nand_setup_interface()
2492 twp_cnt = calc_cycl(sdr->tWP_min + if_skew, clk_period); in cadence_nand_setup_interface()
2493 if ((twp_cnt + 1) * clk_period < (sdr->tALS_min + if_skew)) in cadence_nand_setup_interface()
2495 clk_period); in cadence_nand_setup_interface()
2497 twh = (sdr->tWC_min - (twp_cnt + 1) * clk_period); in cadence_nand_setup_interface()
2501 twh_cnt = calc_cycl(twh + if_skew, clk_period); in cadence_nand_setup_interface()
2511 tadl_cnt = calc_cycl((sdr->tADL_min + if_skew), clk_period); in cadence_nand_setup_interface()
2512 tccs_cnt = calc_cycl((sdr->tCCS_min + if_skew), clk_period); in cadence_nand_setup_interface()
2513 twhr_cnt = calc_cycl((sdr->tWHR_min + if_skew), clk_period); in cadence_nand_setup_interface()
2514 trhw_cnt = calc_cycl((sdr->tRHW_min + if_skew), clk_period); in cadence_nand_setup_interface()
2532 trhz_cnt = calc_cycl(sdr->tRHZ_max, clk_period); in cadence_nand_setup_interface()
2534 twb_cnt = calc_cycl((sdr->tWB_max + board_delay), clk_period); in cadence_nand_setup_interface()
2545 tvdly_cnt = calc_cycl(500000 + if_skew, clk_period); in cadence_nand_setup_interface()
2552 tfeat_cnt = calc_cycl(sdr->tFEAT_max, clk_period); in cadence_nand_setup_interface()
2556 tceh_cnt = calc_cycl(sdr->tCEH_min, clk_period); in cadence_nand_setup_interface()
2557 tcs_cnt = calc_cycl((sdr->tCS_min + if_skew), clk_period); in cadence_nand_setup_interface()