timer: fttmr010: return a previously deleted driver now ported to DM
PATCH 1/1 timer: fttmr010: return a previously deleted driver now ported to DM
The fttmr010 timer driver was deleted by
commit 29fc6f24926e ("ARM: remove a320evb board support") The original source file was: arch/arm/cpu/arm920t/a320/timer.c
Return the driver to the codebase in a DM compatible form. A platform using fttmr010 will be submitted later.
This hardware is described in the datasheet [1], starting from page 348. According to the datasheet, there is a Revision Register at offset 0x3C, which is not present in 'struct fttmr010'. Add it and debug() print revision in probe function.
[1]
https://bitbucket.org/Kasreyn/mkrom-uc7112lx/src/master/documents/FIC8120_DS_v1.2.pdf
--- drivers/timer/Kconfig | 7 +++ drivers/timer/Makefile | 1 + drivers/timer/fttmr010_timer.c | 92 ++++++++++++++++++++++++++++++++++ include/faraday/fttmr010.h | 1 + 4 files changed, 101 insertions(+) create mode 100644 drivers/timer/fttmr010_timer.c
drivers/timer/Kconfig +7 -0
@@ -145,6 +145,13 @@ config DESIGNWARE_APB_TIMER Enables support for the Designware APB Timer driver. This timer is present on Altera SoCFPGA SoCs. +config FTTMR010_TIMER + bool "Faraday Technology timer support" + depends on TIMER + help + Select this to enable support for the timer found on + devices using Faraday Technology's IP. + config GXP_TIMER bool "HPE GXP Timer" depends on TIMER
drivers/timer/Makefile +1 -0
@@ -13,6 +13,7 @@ obj-$(CONFIG_$(SPL_)ATMEL_PIT_TIMER) += atmel_pit_timer.o obj-$(CONFIG_$(SPL_)ATMEL_TCB_TIMER) += atmel_tcb_timer.o obj-$(CONFIG_CADENCE_TTC_TIMER) += cadence-ttc.o obj-$(CONFIG_DESIGNWARE_APB_TIMER) += dw-apb-timer.o +obj-$(CONFIG_FTTMR010_TIMER) += fttmr010_timer.o obj-$(CONFIG_GXP_TIMER) += gxp-timer.o obj-$(CONFIG_MPC83XX_TIMER) += mpc83xx_timer.o obj-$(CONFIG_NOMADIK_MTU_TIMER) += nomadik-mtu-timer.o
drivers/timer/fttmr010_timer.c new file +92 -0
92 lines not on this page · raw message
include/faraday/fttmr010.h +1 -0
@@ -26,6 +26,7 @@ struct fttmr010 {unsigned int cr;/* 0x30 */ unsigned int interrupt_state;/* 0x34 */ unsigned int interrupt_mask;/* 0x38 */ +unsigned int revision;/* 0x3c */ };/*
Signature · 1 line
2.34.1
Quoted 12 lines · Sergei Antonov
The fttmr010 timer driver was deleted by
commit29fc6f24926e("ARM: remove a320evb board support") The original source file was:arch/arm/cpu/arm920t/a320/timer.cReturn the driver to the codebase in a DM compatible form. A platform using fttmr010 will be submitted later.
This hardware is described in the datasheet [1], starting from page 348. According to the datasheet, there is a Revision Register at offset
0x3C, which is not present in 'struct fttmr010'. Add it anddebug()print revision in probe function.
Quoted 4 lines
[1]
https://bitbucket.org/Kasreyn/mkrom-uc7112lx/src/master/documents/FIC8120_DS_v1.2.pdfSigned-off-by Sergei Antonov <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom