| #
9fb34b01 |
| 22-May-2017 |
Simon Glass <sjg@chromium.org> |
bootstage: Provide a default timer function
If CONFIG_SYS_TIMER_COUNTER is used we can provide a default microsecond timer implementation.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
| #
5bc516ed |
| 27-Dec-2016 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
delay: collect {m, n, u}delay declarations to include/linux/delay.h
Currently, mdelay() and udelay() are declared in include/common.h, while ndelay() in include/linux/compat.h. It would be nice to
delay: collect {m, n, u}delay declarations to include/linux/delay.h
Currently, mdelay() and udelay() are declared in include/common.h, while ndelay() in include/linux/compat.h. It would be nice to collect them into include/linux/delay.h like Linux.
While we are here, fix the ndelay() implementation; I used the DIV_ROUND_UP() instead of (x)/1000 because it must wait *longer* than the given period of time.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
d5c6144f |
| 26-Feb-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
c95fec31 |
| 24-Feb-2016 |
Simon Glass <sjg@chromium.org> |
timer: Provide an early timer
In some cases the timer must be accessible before driver model is active. Examples include when using CONFIG_TRACE to trace U-Boot's execution before driver model is se
timer: Provide an early timer
In some cases the timer must be accessible before driver model is active. Examples include when using CONFIG_TRACE to trace U-Boot's execution before driver model is set up. Enable this option to use an early timer. These functions must be supported by your timer driver: timer_early_get_count() and timer_early_get_rate().
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
6905f4d3 |
| 21-Jan-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
c8336975 |
| 16-Jan-2016 |
Mugunthan V N <mugunthanvnm@ti.com> |
dm: timer: uclass: add timer init in uclass driver to add timer device
Adding timer init function in timer-uclass driver to create and initialize the timer device on platforms where u-boot,dm-pre-re
dm: timer: uclass: add timer init in uclass driver to add timer device
Adding timer init function in timer-uclass driver to create and initialize the timer device on platforms where u-boot,dm-pre-reloc is not used. Since there will be multiple timer devices in the system, adding a tick-timer node in chosen node to know which timer device to be used as tick timer in u-boot.
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
show more ...
|
| #
9ca07ebb |
| 24-Nov-2015 |
Bin Meng <bmeng.cn@gmail.com> |
dm: timer: Support 64-bit counter
There are timers with a 64-bit counter value but current timer uclass driver assumes a 32-bit one. Modify timer_get_count() to ask timer driver to always return a 6
dm: timer: Support 64-bit counter
There are timers with a 64-bit counter value but current timer uclass driver assumes a 32-bit one. Modify timer_get_count() to ask timer driver to always return a 64-bit counter value, and provide an inline helper function timer_conv_64() to handle the 32-bit/64-bit conversion automatically.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
e573bdb3 |
| 30-Oct-2015 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
c8a7ba9e |
| 09-Oct-2015 |
Thomas Chou <thomas@wytron.com.tw> |
dm: implement a Timer uclass
Implement a Timer uclass to work with lib/time.c.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Simon Glass <sjg@chromium.org>
|
| #
19ea4678 |
| 15-Oct-2014 |
Simon Glass <sjg@chromium.org> |
Use uint64_t for time types
Unfortunately 'unsigned long long' and 'uint64_t' are not necessarily compatible on 64-bit machines. Use the correct typedef instead of writing the supposed type out in f
Use uint64_t for time types
Unfortunately 'unsigned long long' and 'uint64_t' are not necessarily compatible on 64-bit machines. Use the correct typedef instead of writing the supposed type out in full.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
8c688bc4 |
| 23-Oct-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
kconfig: move CONFIG_SYS_HZ to lib/Kconfig
CONFIG_SYS_HZ is always defined as 1000 in config_fallbacks.h (but some boards still have redundant definitions).
This commit moves the definition and the
kconfig: move CONFIG_SYS_HZ to lib/Kconfig
CONFIG_SYS_HZ is always defined as 1000 in config_fallbacks.h (but some boards still have redundant definitions).
This commit moves the definition and the document in README to Kconfig. Since lib/Kconfig can assure that CONFIG_SYS_HZ is 1000, the sanity check in lib/time.c should be removed.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Marek Vasut <marex@denx.de>
show more ...
|
| #
c23154aa |
| 08-Aug-2014 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot-arm
|
| #
fccacd3b |
| 13-Jul-2014 |
Pavel Machek <pavel@denx.de> |
lib/time.c cleanups
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, an
lib/time.c cleanups
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: Pavel Machek <pavel@denx.de>
show more ...
|
| #
17998eff |
| 11-Feb-2014 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot-arm
|
| #
707acd01 |
| 26-Jan-2014 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot-arm
|
| #
de351d6b |
| 19-Dec-2013 |
Darwin Rambo <drambo@broadcom.com> |
lib: time: add weak timer_init() function
If timer_init() is made a weak stub function, then it allows us to remove several empty timer_init functions for those boards that already have a timer init
lib: time: add weak timer_init() function
If timer_init() is made a weak stub function, then it allows us to remove several empty timer_init functions for those boards that already have a timer initialized when u-boot starts. Architectures that use the timer framework may also remove the need for timer.c.
Signed-off-by: Darwin Rambo <drambo@broadcom.com> Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
show more ...
|
| #
2cd1b572 |
| 05-Dec-2013 |
Stephen Warren <swarren@nvidia.com> |
time: fix usec_to_tick()
Commit 8dfafdde88eb ("Introduce common timer functions") created a common definition of usec_to_tick() which had a couple problems:
static unsigned long long usec_to_tick(u
time: fix usec_to_tick()
Commit 8dfafdde88eb ("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: Stephen Warren <swarren@nvidia.com> Acked-by: Rob Herring <rob.herring@calxeda.com>
show more ...
|
| #
f15ea6e1 |
| 10-Dec-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge branch 'u-boot/master' into 'u-boot-arm/master'
Conflicts: arch/arm/cpu/armv7/rmobile/Makefile doc/README.scrapyard
Needed manual fix: arch/arm/cpu/armv7/omap-common/Makefile board/compul
Merge branch 'u-boot/master' into 'u-boot-arm/master'
Conflicts: arch/arm/cpu/armv7/rmobile/Makefile doc/README.scrapyard
Needed manual fix: arch/arm/cpu/armv7/omap-common/Makefile board/compulab/cm_t335/u-boot.lds
show more ...
|
| #
d770f396 |
| 08-Nov-2013 |
Daniel Schwierzeck <daniel.schwierzeck@gmail.com> |
time: fix gcc warnings on MIPS64
Commit 8dfafdde88eb3e71d5569846396ae67a91017232 introduced new gcc warnings on MIPS64:
time.c: In function 'tick_to_time': time.c:59:2: warning: comparison of disti
time: fix gcc warnings on MIPS64
Commit 8dfafdde88eb3e71d5569846396ae67a91017232 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: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
show more ...
|
| #
65ba7add |
| 08-Nov-2013 |
Rob Herring <rob.herring@calxeda.com> |
time: add weak annotation to timer_read_counter declaration
A weak annotation is needed in order to prevent link errors when get_ticks is overridden. This fixes sandbox build.
Signed-off-by: Rob He
time: add weak annotation to timer_read_counter declaration
A weak annotation is needed in order to prevent link errors when get_ticks is overridden. This fixes sandbox build.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
show more ...
|
| #
8dfafdde |
| 04-Oct-2013 |
Rob Herring <rob.herring@calxeda.com> |
Introduce common timer functions
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 requi
Introduce common timer functions
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: Rob Herring <rob.herring@calxeda.com>
show more ...
|
| #
2108f4c4 |
| 04-Oct-2013 |
Rob Herring <rob.herring@calxeda.com> |
config: consolidate CONFIG_SYS_HZ definition
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, prov
config: consolidate CONFIG_SYS_HZ definition
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: Rob Herring <rob.herring@calxeda.com>
show more ...
|
| #
326ea986 |
| 31-Jul-2013 |
Stefano Babic <sbabic@denx.de> |
Merge git://git.denx.de/u-boot-arm
Conflicts: board/freescale/mx6qsabrelite/Makefile board/freescale/mx6qsabrelite/mx6qsabrelite.c include/configs/mx6qsabrelite.h
Signed-off-by: Stefano Babic <s
Merge git://git.denx.de/u-boot-arm
Conflicts: board/freescale/mx6qsabrelite/Makefile board/freescale/mx6qsabrelite/mx6qsabrelite.c include/configs/mx6qsabrelite.h
Signed-off-by: Stefano Babic <sbabic@denx.de>
show more ...
|
| #
8b485ba1 |
| 25-Jul-2013 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge branch 'u-boot/master' into u-boot-arm/master
|
| #
1a459660 |
| 08-Jul-2013 |
Wolfgang Denk <wd@denx.de> |
Add GPL-2.0+ SPDX-License-Identifier to source files
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
|