Commit 7d428ce2 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'dw_apb_timer_of' of git://github.com/mmind/linux-rockchip into next/drivers

From Heiko Stuebner, enhancements for dw_apb_timer:
- use DECLARE_CLOCKSOURCE_OF and convert its users
- handle the sptimer not being present as sched_clock
- add optional handling of timer clocks

* tag 'dw_apb_timer_of' of git://github.com/mmind/linux-rockchip:
  clocksource: dw_apb_timer_of: use clocksource_of_init
  clocksource: dw_apb_timer_of: select DW_APB_TIMER
  clocksource: dw_apb_timer_of: add clock-handling
  clocksource: dw_apb_timer_of: enable the use the clocksource as sched clock
parents 6f39ef57 10021488
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -5,9 +5,20 @@ Required properties:
- reg: physical base address of the controller and length of memory mapped
  region.
- interrupts: IRQ line for the timer.
- either clocks+clock-names or clock-frequency properties

Optional properties:
- clocks	: list of clock specifiers, corresponding to entries in
		  the clock-names property;
- clock-names	: should contain "timer" and "pclk" entries, matching entries
		  in the clocks property.
- clock-frequency: The frequency in HZ of the timer.
- clock-freq: For backwards compatibility with picoxcell

If using the clock specifiers, the pclk clock is optional, as not all
systems may use one.


Example:

		timer1: timer@ffc09000 {
@@ -23,3 +34,11 @@ Example:
				clock-frequency = <200000000>;
				reg = <0xffd00000 0x1000>;
			};

		timer3: timer@ffe00000 {
				compatible = "snps,dw-apb-timer-osc";
				interrupts = <0 170 4>;
				reg = <0xffe00000 0x1000>;
				clocks = <&timer_clk>, <&timer_pclk>;
				clock-names = "timer", "pclk";
			};
+0 −1
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@ config ARCH_PICOXCELL
	select ARM_PATCH_PHYS_VIRT
	select ARM_VIC
	select CPU_V6K
	select DW_APB_TIMER
	select DW_APB_TIMER_OF
	select GENERIC_CLOCKEVENTS
	select HAVE_TCM
+0 −2
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/dw_apb_timer.h>

#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -88,7 +87,6 @@ DT_MACHINE_START(PICOXCELL, "Picochip picoXcell")
	.map_io		= picoxcell_map_io,
	.nr_irqs	= NR_IRQS_LEGACY,
	.init_irq	= irqchip_init,
	.init_time	= dw_apb_timer_init,
	.init_machine	= picoxcell_init_machine,
	.dt_compat	= picoxcell_dt_match,
	.restart	= picoxcell_wdt_restart,
+0 −1
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@ config ARCH_SOCFPGA
	select CLKDEV_LOOKUP
	select COMMON_CLK
	select CPU_V7
	select DW_APB_TIMER
	select DW_APB_TIMER_OF
	select GENERIC_CLOCKEVENTS
	select GPIO_PL061 if GPIOLIB
+0 −2
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include <linux/dw_apb_timer.h>
#include <linux/clk-provider.h>
#include <linux/irqchip.h>
#include <linux/of_address.h>
@@ -120,7 +119,6 @@ DT_MACHINE_START(SOCFPGA, "Altera SOCFPGA")
	.smp		= smp_ops(socfpga_smp_ops),
	.map_io		= socfpga_map_io,
	.init_irq	= socfpga_init_irq,
	.init_time	= dw_apb_timer_init,
	.init_machine	= socfpga_cyclone5_init,
	.restart	= socfpga_cyclone5_restart,
	.dt_compat	= altera_dt_match,
Loading