summaryrefslogtreecommitdiffstats
path: root/drivers/timer/timer-uclass.c
Commit message (Collapse)AuthorAgeFilesLines
* dm: Use uclass_first_device_err() where it is usefulSimon Glass2016-03-141-3/+1
| | | | | | Use this new function in places where it simplifies the code. Signed-off-by: Simon Glass <sjg@chromium.org>
* timer: Support tracing fullySimon Glass2016-02-261-3/+3
| | | | | | | A few of the functions in the timer uclass are not marked with 'notrace'. Fix this so that tracing can be used with CONFIG_TRACE. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: timer: refuse timers with zero clock_rateStephen Warren2016-01-201-0/+11
| | | | | | | | | If a timer has a zero clock_rate, get_tbclk() will return zero for it, which will cause tick_to_time() to perform a division-by-zero, which will crash U-Boot. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: timer: uclass: Add flag to control sequence numberingMugunthan V N2016-01-201-0/+1
| | | | | | | | | | | | Like SPI and I2C, timer devices also have multiple chip instances. This patch adds the flag 'DM_UC_FLAG_SEQ_ALIAS' in timer_uclass driver to control device sequence numbering. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: timer: uclass: add timer init in uclass driver to add timer deviceMugunthan V N2016-01-201-0/+44
| | | | | | | | | | 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>
* dm: timer: Support 64-bit counterBin Meng2015-12-011-3/+12
| | | | | | | | | | | | 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>
* dm: timer: Implement pre_probe()Bin Meng2015-12-011-0/+13
| | | | | | | | | | Every timer device needs to have a valid clock frequency and it can be specified in the device tree. Use pre_probe() to get this in the timer uclass driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Simon Glass <sjg@chromium.org>
* dm: timer: Fix several nitsBin Meng2015-12-011-2/+2
| | | | | | | | This changes 'Timer' to 'timer' at several places. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: implement a Timer uclassThomas Chou2015-10-231-0/+42
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>
OpenPOWER on IntegriCloud