Skip to content

Commit

Permalink
clocksource/drivers/fttmr010: Merge Moxa into FTTMR010
Browse files Browse the repository at this point in the history
This merges the Moxa Art timer driver into the Faraday FTTMR010
driver and replaces all Kconfig symbols to use the Faraday
driver instead. We are now so similar that the drivers can
be merged by just adding a few lines to the Faraday timer.

Differences:

- The Faraday driver explicitly sets the counter to count
  upwards for the clocksource, removing the need for the
  clocksource core to invert the value.

- The Faraday driver also handles sched_clock()

On the Aspeed, the counter can only count downwards, so support
the timers in downward-counting mode as well, and flag the
Aspeed to use this mode. This mode was tested on the Gemini so
I have high hopes that it'll work fine on the Aspeed as well.

After this we have one driver for all three SoCs and a generic
Faraday FTTMR010 timer driver, which is nice.

Cc: Joel Stanley <joel@jms.id.au>
Cc: Jonas Jensen <jonas.jensen@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Tested-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
  • Loading branch information
Linus Walleij authored and Daniel Lezcano committed Jun 12, 2017
1 parent b589da8 commit ec14ba1
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 303 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-aspeed/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ menuconfig ARCH_ASPEED
select SRAM
select WATCHDOG
select ASPEED_WATCHDOG
select MOXART_TIMER
select FTTMR010_TIMER
select MFD_SYSCON
select PINCTRL
help
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-moxart/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ menuconfig ARCH_MOXART
select CPU_FA526
select ARM_DMA_MEM_BUFFERABLE
select FARADAY_FTINTC010
select MOXART_TIMER
select FTTMR010_TIMER
select GPIOLIB
select PHYLIB if NETDEVICES
help
Expand Down
7 changes: 0 additions & 7 deletions drivers/clocksource/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,6 @@ config ATLAS7_TIMER
help
Enables support for the Atlas7 timer.

config MOXART_TIMER
bool "Moxart timer driver" if COMPILE_TEST
depends on GENERIC_CLOCKEVENTS
select CLKSRC_MMIO
help
Enables support for the Moxart timer.

config MXS_TIMER
bool "Mxs timer driver" if COMPILE_TEST
depends on GENERIC_CLOCKEVENTS
Expand Down
1 change: 0 additions & 1 deletion drivers/clocksource/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ obj-$(CONFIG_ORION_TIMER) += time-orion.o
obj-$(CONFIG_BCM2835_TIMER) += bcm2835_timer.o
obj-$(CONFIG_CLPS711X_TIMER) += clps711x-timer.o
obj-$(CONFIG_ATLAS7_TIMER) += timer-atlas7.o
obj-$(CONFIG_MOXART_TIMER) += moxart_timer.o
obj-$(CONFIG_MXS_TIMER) += mxs_timer.o
obj-$(CONFIG_CLKSRC_PXA) += pxa_timer.o
obj-$(CONFIG_PRIMA2_TIMER) += timer-prima2.o
Expand Down
256 changes: 0 additions & 256 deletions drivers/clocksource/moxart_timer.c

This file was deleted.

Loading

0 comments on commit ec14ba1

Please sign in to comment.