timer: imx-gpt: Add timer support for i.MX SoCs family
PATCH v5 1/1 timer: imx-gpt: Add timer support for i.MX SoCs family
From: Jesse Taube <[email protected]>
This timer driver is using GPT Timer (General Purpose Timer) available on most i.MX SoCs.
Since this driver is only meant to provide u-boot's timer and counter, and most of the i.MX* SoCs use a 24Mhz crystal,
let's focus on that specific source.
Signed-off-by Giulio Benetti <[email protected]>
Signed-off-by Jesse Taube <[email protected]>
---V1->V2:
* Fixed indentation
* Fixed capitals
* Made timer work on only 24MHz clockV2->V3:
* Fixed indentation
* Made implementation imatate the Linux kernel
* Fix wrong definitionV3->V4:
* Fixed indentation
* Made bit manipluation into its own function.V4->V5:
* Fixed indentation
* Made commit message 75 char
* Moved prescaler code into sub funcions
drivers/timer/Kconfig | 7 ++ drivers/timer/Makefile | 1 + drivers/timer/imx-gpt-timer.c | 160 ++++++++++++++++++++++++++++++++++ 3 files changed, 168 insertions(+) create mode 100644 drivers/timer/imx-gpt-timer.c
drivers/timer/Kconfig +7 -0
@@ -227,4 +227,11 @@ config MCHP_PIT64B_TIMER Select this to enable support for Microchip 64-bit periodic interval timer. +config IMX_GPT_TIMER + bool "NXP i.MX GPT timer support" + depends on TIMER + help + Select this to enable support for the timer found on + NXP i.MX devices. + endmenu
drivers/timer/Makefile +1 -0
@@ -25,3 +25,4 @@ obj-$(CONFIG_STM32_TIMER) += stm32_timer.o obj-$(CONFIG_X86_TSC_TIMER) += tsc_timer.o obj-$(CONFIG_MTK_TIMER) += mtk_timer.o obj-$(CONFIG_MCHP_PIT64B_TIMER) += mchp-pit64b-timer.o +obj-$(CONFIG_IMX_GPT_TIMER) += imx-gpt-timer.o
drivers/timer/imx-gpt-timer.c new file +160 -0
160 lines not on this page · raw message
Signature · 1 line
2.30.0