/* Find NAND Timing. 
This function determines the NAND Timing parameter which is given in units of GPMI cycles. The GPMI period is used to determine how many cycles fit into the NAND parameter. */
uint32_t gpmi_find_cycles_ceiling(uint64_t u32NandTime_ns, uint32_t u32GpmiPeriod_ns, uint32_t u32MinVal)
/* Find NAND Timing. 
This function determines the NAND Timing parameter which is given in units of GPMI cycles. The GPMI period is used to determine how many cycles fit into the NAND parameter. */
uint32_t gpmi_find_cycles_ceiling(uint64_t u32NandTime_ns, uint32_t u32GpmiPeriod_ns, uint32_t u32MinVal)
{
    uint32_t retVal = ((u32NandTime_ns + (u32GpmiPeriod_ns - 1)) / u32GpmiPeriod_ns);
    return std::max(retVal, u32MinVal);
}