]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sc520: Allow boards to override udelay
authorGraeme Russ <graeme.russ@gmail.com>
Fri, 23 Apr 2010 14:05:50 +0000 (00:05 +1000)
committerWolfgang Denk <wd@denx.de>
Wed, 5 May 2010 22:17:37 +0000 (00:17 +0200)
If the board has a high precision mico-second timer, it maked sense to use
it instead of the on-chip one

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
arch/i386/cpu/sc520/sc520_timer.c
arch/i386/include/asm/ic/sc520.h

index eca48e0c1277a855dba434d25a5cde629cf44fff..d5617e91f6e154a1360f2a6a850e022a8df0aa66 100644 (file)
@@ -69,7 +69,11 @@ int timer_init(void)
        return 0;
 }
 
+/* Allow boards to override udelay implementation */
 void __udelay(unsigned long usec)
+       __attribute__((weak, alias("sc520_udelay")));
+
+void sc520_udelay(unsigned long usec)
 {
        int m = 0;
        long u;
index 57c990442249be3eddfacff1172d7abccb11fb2d..20384a4a8c603b6411eb446a07f177ea61acab61 100644 (file)
@@ -28,6 +28,7 @@
 
 void init_sc520(void);
 unsigned long init_sc520_dram(void);
+void sc520_udelay(unsigned long usec);
 
 /* Memory mapped configuration registers */
 typedef struct sc520_mmcr {