Skip to content

Commit 6245847

Browse files
committed
Merge pull request #1098 from notro/timer2708
BCM2708: Use brcm,bcm2835-system-timer
2 parents eaae5d2 + 8a2bd9f commit 6245847

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

arch/arm/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ config ARCH_BCM2708
320320
bool "Broadcom BCM2708 family"
321321
select CPU_V6
322322
select ARM_AMBA
323+
select CLKSRC_MMIO
324+
select CLKSRC_OF if OF
323325
select HAVE_SCHED_CLOCK
324326
select NEED_MACH_GPIO_H
325327
select NEED_MACH_MEMORY_H

arch/arm/boot/dts/bcm2708.dtsi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
soc {
1313
ranges = <0x7e000000 0x20000000 0x01000000>;
1414

15+
timer@7e003000 {
16+
compatible = "brcm,bcm2835-system-timer";
17+
reg = <0x7e003000 0x1000>;
18+
interrupts = <1 0>, <1 1>, <1 2>, <1 3>;
19+
clock-frequency = <1000000>;
20+
};
21+
1522
arm-pmu {
1623
compatible = "arm,arm1176-pmu";
1724
};

arch/arm/mach-bcm2708/bcm2708.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,6 @@ static void __init bcm2708_dt_init(void)
843843
{
844844
int ret;
845845

846-
of_clk_init(NULL);
847846
ret = of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
848847
if (ret) {
849848
pr_err("of_platform_populate failed: %d\n", ret);
@@ -1043,6 +1042,12 @@ static struct delay_timer bcm2708_delay_timer = {
10431042

10441043
static void __init bcm2708_timer_init(void)
10451044
{
1045+
if (of_have_populated_dt()) {
1046+
of_clk_init(NULL);
1047+
clocksource_of_init();
1048+
return;
1049+
}
1050+
10461051
/* init high res timer */
10471052
bcm2708_clocksource_init();
10481053

arch/arm/mach-bcm2708/include/mach/platform.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@
183183
#define MAXIRQNUM (32 + 32 + 20)
184184
#define MAXFIQNUM (32 + 32 + 20)
185185

186-
#define MAX_TIMER 2
187186
#define MAX_PERIOD 699050
188187
#define TICKS_PER_uSEC 1
189188

drivers/clocksource/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ obj-$(CONFIG_CLKSRC_NOMADIK_MTU) += nomadik-mtu.o
1919
obj-$(CONFIG_CLKSRC_DBX500_PRCMU) += clksrc-dbx500-prcmu.o
2020
obj-$(CONFIG_ARMADA_370_XP_TIMER) += time-armada-370-xp.o
2121
obj-$(CONFIG_ORION_TIMER) += time-orion.o
22-
obj-$(CONFIG_ARCH_BCM2835) += bcm2835_timer.o
22+
obj-$(CONFIG_ARCH_BCM2835)$(CONFIG_ARCH_BCM2708) += bcm2835_timer.o
2323
obj-$(CONFIG_ARCH_CLPS711X) += clps711x-timer.o
2424
obj-$(CONFIG_ARCH_ATLAS7) += timer-atlas7.o
2525
obj-$(CONFIG_ARCH_MOXART) += moxart_timer.o

0 commit comments

Comments
 (0)