Hi Thomas, On 13 October 2015 at 07:17, Thomas Chou <tho...@wytron.com.tw> wrote: > > > On 10/10/2015 03:16 PM, Thomas Chou wrote: >> >> Implement a Timer uclass to work with lib/time.c. >> >> Signed-off-by: Thomas Chou <tho...@wytron.com.tw> >> Acked-by: Simon Glass <s...@chromium.org> >> --- >> v2 >> fix coding style. >> v3 >> add description to Kconfig as Simon suggested. >> move timer.c code to lib/time.c. >> add dm_timer dev to global data. >> remove timer_init(). >> change API name get_clock. >> v4 >> add comment about timer hardware. >> v5 >> revert to get_rate and use uclass priv to store the clock_rate. >> split gd->dm_timer renewal to anohter patch. >> v6 >> rename to CONFIG_TIMER as Simon suggested. >> v7 >> fix string replacement error in v6 >> v8 >> replace all dm_timer with timer. >> >> drivers/Kconfig | 2 ++ >> drivers/Makefile | 1 + >> drivers/timer/Kconfig | 12 +++++++++ >> drivers/timer/Makefile | 7 ++++++ >> drivers/timer/timer-uclass.c | 42 +++++++++++++++++++++++++++++++ >> include/asm-generic/global_data.h | 3 +++ >> include/dm/uclass-id.h | 1 + >> include/timer.h | 52 >> +++++++++++++++++++++++++++++++++++++++ >> lib/time.c | 49 >> ++++++++++++++++++++++++++++++++++++ >> 9 files changed, 169 insertions(+) >> create mode 100644 drivers/timer/Kconfig >> create mode 100644 drivers/timer/Makefile >> create mode 100644 drivers/timer/timer-uclass.c >> create mode 100644 include/timer.h >> > > Applied to u-boot-nios. >
Please do create a test for this uclass using a fake sandbox timer. Note also time_ut.c which might have some ideas. Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot