aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/gpmc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 03595ee72ed3..5a4cc2076a7d 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -111,6 +111,13 @@ unsigned int gpmc_ns_to_ticks(unsigned int time_ns)
111 return (time_ns * 1000 + tick_ps - 1) / tick_ps; 111 return (time_ns * 1000 + tick_ps - 1) / tick_ps;
112} 112}
113 113
114unsigned int gpmc_round_ns_to_ticks(unsigned int time_ns)
115{
116 unsigned long ticks = gpmc_ns_to_ticks(time_ns);
117
118 return ticks * gpmc_get_fclk_period() / 1000;
119}
120
114#ifdef DEBUG 121#ifdef DEBUG
115static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit, 122static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit,
116 int time, const char *name) 123 int time, const char *name)