1. 27 Oct, 2014 1 commit
  2. 23 Oct, 2014 1 commit
  3. 22 Jul, 2014 1 commit
    • Pavel Machek's avatar
      lib/time.c cleanups · fccacd3b
      Pavel Machek authored
      As I initially suspected overflow in time handling, I took a detailed
      look at lib/time.c. This adds comments about units being used, reduces
      amount of type casting being done, and makes __udelay() always wait at
      least one tick. (Current code could do no delaying at all for short
      delays).
      Signed-off-by: default avatarPavel Machek <pavel@denx.de>
      fccacd3b
  4. 24 Jan, 2014 1 commit
  5. 13 Dec, 2013 1 commit
    • Stephen Warren's avatar
      time: fix usec_to_tick() · 2cd1b572
      Stephen Warren authored
      Commit 8dfafdde ("Introduce common timer functions") created a
      common definition of usec_to_tick() which had a couple problems:
      
      static unsigned long long usec_to_tick(unsigned long usec)
      {
             uint64_t tick = usec * get_tbclk();
      
      That likely overflows.
      
             usec *= get_tbclk();
      
      That was an attempt to fix it by performing the multiply after the
      promotion of usec to 64-bit, but was applied to the wrong variable,
      which was never used.
      
      This patch fixes these issues. A user-visible symptom of the problem was
      the e.g. "dhcp zImage" using an ASIX USB Ethernet dongle would print:
      
      Waiting for Ethernet connection... unable to connect.
      
      ... with no delay before "unable to connect". There are likely other
      symptoms.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarRob Herring <rob.herring@calxeda.com>
      2cd1b572
  6. 11 Nov, 2013 1 commit
    • Daniel Schwierzeck's avatar
      time: fix gcc warnings on MIPS64 · d770f396
      Daniel Schwierzeck authored
      Commit 8dfafdde introduced
      new gcc warnings on MIPS64:
      
      time.c: In function 'tick_to_time':
      time.c:59:2: warning: comparison of distinct pointer types lacks a cast [enabled by default]
      time.c:59:2: warning: passing argument 1 of '__div64_32' from incompatible pointer type [enabled by default]
      In file included from time.c:10:0:
      ./u-boot-mips/include/div64.h:22:17: note: expected 'uint64_t *' but argument is of type 'long long unsigned int *'
      time.c: In function 'usec_to_tick':
      time.c:76:2: warning: comparison of distinct pointer types lacks a cast [enabled by default]
      time.c:76:2: warning: passing argument 1 of '__div64_32' from incompatible pointer type [enabled by default]
      In file included from time.c:10:0:
      ./u-boot-mips/include/div64.h:22:17: note: expected 'uint64_t *' but argument is of type 'long long unsigned int *'
      Signed-off-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      d770f396
  7. 08 Nov, 2013 1 commit
  8. 04 Nov, 2013 2 commits
    • Rob Herring's avatar
      Introduce common timer functions · 8dfafdde
      Rob Herring authored
      Many platforms duplicate pretty much the same timer code yet they all have
      a 32-bit freerunning counter register. Create a common implementation that
      minimally requires 2 or 3 defines to add timer support:
      
      CONFIG_SYS_TIMER_RATE - Clock rate of the timer counter
      CONFIG_SYS_TIMER_COUNTER - Address of 32-bit counter
      CONFIG_SYS_TIMER_COUNTS_DOWN - Define if counter counts down
      
      All functions are weak or ifdef'ed so they can still be overriden by any
      platform.
      Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
      8dfafdde
    • Rob Herring's avatar
      config: consolidate CONFIG_SYS_HZ definition · 2108f4c4
      Rob Herring authored
      According to the README, CONFIG_SYS_HZ must be 1000 and most platforms
      follow that. In preparation to remove CONFIG_SYS_HZ from all these
      platforms, provide a common definition. The platforms which use a value
      other than 1000 will get build warning now. These configs are:
      
      include/configs/M5271EVB.h:#define CONFIG_SYS_HZ                        1000000
      include/configs/balloon3.h:#define      CONFIG_SYS_HZ                   3250000         /* Timer @ 3250000 Hz */
      include/configs/idmr.h:#define CONFIG_SYS_HZ                    (50000000 / 64)
      include/configs/mini2440.h:#define CONFIG_SYS_HZ                        1562500
      include/configs/mx1ads.h:#define CONFIG_SYS_HZ                  3686400
      include/configs/omap3_zoom2.h:#define CONFIG_SYS_HZ                     ((V_SCLK) / (2 << CONFIG_SYS_PTV))
      include/configs/omap730p2.h:#define CONFIG_SYS_HZ                       ((CONFIG_SYS_CLK_FREQ)/(2 << CONFIG_SYS_PTV))
      include/configs/palmld.h:#define        CONFIG_SYS_HZ                   3250000         /* Timer @ 3250000 Hz */
      include/configs/palmtc.h:#define        CONFIG_SYS_HZ                   3686400         /* Timer @ 3686400 Hz */
      include/configs/rsk7203.h:#define CONFIG_SYS_HZ                 (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER)
      include/configs/rsk7264.h:#define CONFIG_SYS_HZ         (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER)
      include/configs/rsk7269.h:#define CONFIG_SYS_HZ         (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER)
      include/configs/scb9328.h:#define CONFIG_SYS_HZ                 3686400      /* incrementer freq: 3.6864 MHz */
      include/configs/versatile.h:#define CONFIG_SYS_HZ                       (1000000 / 256)
      include/configs/zipitz2.h:#define       CONFIG_SYS_HZ                   3250000         /* Timer @ 3250000 Hz */
      Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
      2108f4c4
  9. 24 Jul, 2013 1 commit
  10. 10 Apr, 2012 1 commit
  11. 18 Mar, 2012 1 commit
    • Simon Glass's avatar
      bootstage: Define an optional microsecond timer · 5ff55390
      Simon Glass authored
      Define timer_get_boot_us() which returns the number of microseconds
      since boot. If undefined then we use get_timer() * 1000.
      
      We can fit this in a 32-bit register which keeps everyone happy on
      the efficiency side. It will wrap around after about an hour. If we
      are still looking at it after an hour then we had better not be
      timing the boot.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      5ff55390
  12. 21 Oct, 2011 1 commit
  13. 13 Apr, 2010 1 commit
  14. 05 Dec, 2009 1 commit
    • Ingo van Lil's avatar
      Generic udelay() with watchdog support · 3eb90bad
      Ingo van Lil authored
      According to the PPC reference implementation the udelay() function is
      responsible for resetting the watchdog timer as frequently as needed.
      Most other architectures do not meet that requirement, so long-running
      operations might result in a watchdog reset.
      
      This patch adds a generic udelay() function which takes care of
      resetting the watchdog before calling an architecture-specific
      __udelay().
      Signed-off-by: default avatarIngo van Lil <inguin@gmx.de>
      3eb90bad
  15. 09 Jan, 2005 1 commit
    • wdenk's avatar
      * Patches by Richard Woodruff, 01 Oct 2004: · 8ed96046
      wdenk authored
        add support for the TI OMAP2420 processor and its H4 reference
        board
      
      * Patch by Christian Pellegrin, 24 Sep 2004:
        Added support for NE2000 compatible (DP8390, DP83902) NICs.
      8ed96046
  16. 08 Sep, 2002 1 commit
  17. 14 Dec, 2000 1 commit
  18. 12 Nov, 2000 1 commit