Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfda5901 authored by Dinh Nguyen's avatar Dinh Nguyen Committed by Arnd Bergmann
Browse files

clocksource: dw_apb_timer: Add common DTS glue for dw_apb_timer



Make a common device tree glue for clocksource/dw_apb_timer.
Move mach-picoxcell/time.c to be a generic device tree application
of the dw_apb_timer.

Configure mach-picoxcell to use the dw_apb_timer_of device tree
implementation in drivers/clocksource.

Signed-off-by: default avatarPavel Machek <pavel@denx.de>
Signed-off-by: default avatarDinh Nguyen <dinguyen@altera.com>
Acked-by: default avatarJamie Iles <jamie@jamieiles.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent bd0a521e
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
* Designware APB timer

Required properties:
- compatible: "snps,dw-apb-timer-sp" or "snps,dw-apb-timer-osc"
- reg: physical base address of the controller and length of memory mapped
  region.
- interrupts: IRQ line for the timer.
- clock-frequency: The frequency in HZ of the timer.
- clock-freq: For backwards compatibility with picoxcell

Example:

		timer1: timer@ffc09000 {
				compatible = "snps,dw-apb-timer-sp";
				interrupts = <0 168 4>;
				clock-frequency = <200000000>;
				reg = <0xffc09000 0x1000>;
			};

		timer2: timer@ffd00000 {
				compatible = "snps,dw-apb-timer-osc";
				interrupts = <0 169 4>;
				clock-frequency = <200000000>;
				reg = <0xffd00000 0x1000>;
			};
+1 −0
Original line number Diff line number Diff line
@@ -658,6 +658,7 @@ config ARCH_PICOXCELL
	select ARM_VIC
	select CPU_V6K
	select DW_APB_TIMER
	select DW_APB_TIMER_OF
	select GENERIC_CLOCKEVENTS
	select GENERIC_GPIO
	select HAVE_TCM
+0 −1
Original line number Diff line number Diff line
obj-y	:= common.o
obj-y	+= time.o
+2 −1
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#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/hardware/vic.h>
@@ -97,7 +98,7 @@ DT_MACHINE_START(PICOXCELL, "Picochip picoXcell")
	.nr_irqs	= NR_IRQS_LEGACY,
	.init_irq	= picoxcell_init_irq,
	.handle_irq	= vic_handle_irq,
	.timer		= &picoxcell_timer,
	.timer		= &dw_apb_timer,
	.init_machine	= picoxcell_init_machine,
	.dt_compat	= picoxcell_dt_match,
	.restart	= picoxcell_wdt_restart,
+1 −1
Original line number Diff line number Diff line
@@ -12,6 +12,6 @@

#include <asm/mach/time.h>

extern struct sys_timer picoxcell_timer;
extern struct sys_timer dw_apb_timer;

#endif /* __PICOXCELL_COMMON_H__ */
Loading