]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Merge gpmc changes from N800 tree
authorKai Svahn <kai.svahn@nokia.com>
Fri, 26 Jan 2007 20:29:40 +0000 (12:29 -0800)
committerTony Lindgren <tony@atomide.com>
Wed, 4 Apr 2007 14:32:01 +0000 (10:32 -0400)
This patch merges gpmc changes from N800 tree.

Signed-off-by: Kai Svahn <kai.svahn@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/gpmc.c
include/asm-arm/arch-omap/gpmc.h

index a3f31f0212a3aef563a59d1ed664df88adfa180f..b6b47f2a4ae307e85d050fc25f1b264087f94b25 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)
index 434672df702f380ac74b7117e8c5be2aa75279a5..0fe920ac901723b64c647082888e5564a3731486 100644 (file)
@@ -81,6 +81,7 @@ struct gpmc_timings {
 };
 
 extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns);
+extern unsigned int gpmc_round_ns_to_ticks(unsigned int time_ns);
 
 extern void gpmc_cs_write_reg(int cs, int idx, u32 val);
 extern u32 gpmc_cs_read_reg(int cs, int idx);