RE: [PATCH v4 4/5] scsi: ufs-exynos: add UFS host support for Exynos SoCs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> +
> +long exynos_ufs_calc_time_cntr(struct exynos_ufs *ufs, long period)
> +{
> +       const int precise = 10;
> +       long pclk_rate = ufs->pclk_rate;
> +       long clk_period, fraction;
> +
> +       clk_period = UNIPRO_PCLK_PERIOD(ufs);
> +       fraction = ((NSEC_PER_SEC % pclk_rate) * precise) / pclk_rate;
> +
> +       return (period * precise) / ((clk_period * precise) + fraction);
> +}
This helper essentially calculates a factor f, and returns period x f.
Why not do that regardless of period?

> +extern long exynos_ufs_calc_time_cntr(struct exynos_ufs *, long);
Why this factor needed to be exported?




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux