
From: Rob Herring rob.herring@calxeda.com
Much of the timer code is re-implemented for each platform/arch yet it is all pretty much the same code.
This series introduces a common implementation of timer functions and simplifies the platform code down to 2 or 3 config defines or 2 simple functions. It is intended for platforms with 32-bit freerunning timers. I've converted SH and a couple of ARM platforms as an example, but there are many more still that can be converted. This probably could be extended to work with 16-bit timers as well.
I've compiled on ARM, SH4, and PPC.
v2: - Make timer code common for all architectures - Convert SH timer to common code - Drop mx27 due to include mess. - Add converting versatile to common code
Rob
Rob Herring (9): examples: enable gc-sections option Introduce common timer functions sh: convert to common timer code ARM: highbank: convert to common timer code ARM: mx25: convert to common timer code ARM: vexpress: convert to common timer code ARM: socfpga: convert to common timer code ARM: tegra: convert to common timer code ARM: versatile: convert to common timer code
arch/arm/cpu/arm926ejs/mx25/timer.c | 117 ------------------------------- arch/arm/cpu/arm926ejs/versatile/timer.c | 116 ------------------------------ arch/arm/cpu/armv7/highbank/timer.c | 83 ---------------------- arch/arm/cpu/armv7/socfpga/timer.c | 72 ------------------- arch/arm/cpu/tegra-common/Makefile | 2 +- arch/arm/cpu/tegra-common/timer.c | 95 ------------------------- arch/sh/lib/time.c | 61 +--------------- board/armltd/vexpress/vexpress_common.c | 71 ------------------- examples/api/Makefile | 2 +- include/asm-generic/global_data.h | 2 + include/configs/highbank.h | 4 ++ include/configs/mx25pdk.h | 4 ++ include/configs/socfpga_cyclone5.h | 5 +- include/configs/tegra-common.h | 3 + include/configs/tx25.h | 5 +- include/configs/versatile.h | 9 ++- include/configs/vexpress_common.h | 4 ++ include/configs/zmx25.h | 6 ++ lib/time.c | 73 +++++++++++++++++++ 19 files changed, 111 insertions(+), 623 deletions(-) delete mode 100644 arch/arm/cpu/tegra-common/timer.c