ppc/85xx: Clean up MPC8569 MDS PCI setup code
[oweals/u-boot.git] / lib_ppc / time.c
index 51e8e8406dc318f69492ac147889d81007fb5e45..29099612db4f4d46d243eed2546a98d997c6597f 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <common.h>
 
-
 /* ------------------------------------------------------------------------- */
 
 /*
@@ -51,15 +50,14 @@ unsigned long usec2ticks(unsigned long usec)
  * microseconds to wait) into a number of time base ticks; then we
  * watch the time base until it has incremented by that amount.
  */
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        ulong ticks = usec2ticks (usec);
-
        wait_ticks (ticks);
 }
 
 /* ------------------------------------------------------------------------- */
-
+#ifndef CONFIG_NAND_SPL
 unsigned long ticks2usec(unsigned long ticks)
 {
        ulong tbclk = get_tbclk();
@@ -75,13 +73,13 @@ unsigned long ticks2usec(unsigned long ticks)
 
        return ((ulong)ticks);
 }
-
+#endif
 /* ------------------------------------------------------------------------- */
 
 int init_timebase (void)
 {
 #if defined(CONFIG_5xx) || defined(CONFIG_8xx)
-       volatile immap_t *immap = (immap_t *) CFG_IMMR;
+       volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
 
        /* unlock */
        immap->im_sitk.sitk_tbk = KAPWR_KEY;