Skip to content

Commit

Permalink
Merge pull request #1098 from notro/timer2708
Browse files Browse the repository at this point in the history
BCM2708: Use brcm,bcm2835-system-timer
  • Loading branch information
pelwell committed Aug 13, 2015
2 parents eaae5d2 + 8a2bd9f commit 6245847
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ config ARCH_BCM2708
bool "Broadcom BCM2708 family"
select CPU_V6
select ARM_AMBA
select CLKSRC_MMIO
select CLKSRC_OF if OF
select HAVE_SCHED_CLOCK
select NEED_MACH_GPIO_H
select NEED_MACH_MEMORY_H
Expand Down
7 changes: 7 additions & 0 deletions arch/arm/boot/dts/bcm2708.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
soc {
ranges = <0x7e000000 0x20000000 0x01000000>;

timer@7e003000 {
compatible = "brcm,bcm2835-system-timer";
reg = <0x7e003000 0x1000>;
interrupts = <1 0>, <1 1>, <1 2>, <1 3>;
clock-frequency = <1000000>;
};

arm-pmu {
compatible = "arm,arm1176-pmu";
};
Expand Down
7 changes: 6 additions & 1 deletion arch/arm/mach-bcm2708/bcm2708.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,6 @@ static void __init bcm2708_dt_init(void)
{
int ret;

of_clk_init(NULL);
ret = of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
if (ret) {
pr_err("of_platform_populate failed: %d\n", ret);
Expand Down Expand Up @@ -1043,6 +1042,12 @@ static struct delay_timer bcm2708_delay_timer = {

static void __init bcm2708_timer_init(void)
{
if (of_have_populated_dt()) {
of_clk_init(NULL);
clocksource_of_init();
return;
}

/* init high res timer */
bcm2708_clocksource_init();

Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-bcm2708/include/mach/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@
#define MAXIRQNUM (32 + 32 + 20)
#define MAXFIQNUM (32 + 32 + 20)

#define MAX_TIMER 2
#define MAX_PERIOD 699050
#define TICKS_PER_uSEC 1

Expand Down
2 changes: 1 addition & 1 deletion drivers/clocksource/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ obj-$(CONFIG_CLKSRC_NOMADIK_MTU) += nomadik-mtu.o
obj-$(CONFIG_CLKSRC_DBX500_PRCMU) += clksrc-dbx500-prcmu.o
obj-$(CONFIG_ARMADA_370_XP_TIMER) += time-armada-370-xp.o
obj-$(CONFIG_ORION_TIMER) += time-orion.o
obj-$(CONFIG_ARCH_BCM2835) += bcm2835_timer.o
obj-$(CONFIG_ARCH_BCM2835)$(CONFIG_ARCH_BCM2708) += bcm2835_timer.o
obj-$(CONFIG_ARCH_CLPS711X) += clps711x-timer.o
obj-$(CONFIG_ARCH_ATLAS7) += timer-atlas7.o
obj-$(CONFIG_ARCH_MOXART) += moxart_timer.o
Expand Down

0 comments on commit 6245847

Please sign in to comment.