]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-omap2/gpmc.c
ARM: OMAP: Merge gpmc changes from N800 tree
[karo-tx-linux.git] / arch / arm / mach-omap2 / gpmc.c
index 03595ee72ed38796e8821e4fa514ad5314457ae2..5a4cc2076a7d4cf23c13d97e61f8bb5306b0b2e7 100644 (file)
@@ -111,6 +111,13 @@ unsigned int gpmc_ns_to_ticks(unsigned int time_ns)
        return (time_ns * 1000 + tick_ps - 1) / tick_ps;
 }
 
+unsigned int gpmc_round_ns_to_ticks(unsigned int time_ns)
+{
+       unsigned long ticks = gpmc_ns_to_ticks(time_ns);
+
+       return ticks * gpmc_get_fclk_period() / 1000;
+}
+
 #ifdef DEBUG
 static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit,
                               int time, const char *name)