Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Commit

Permalink
kernel-3.x.x: Ralink system tick counter: use clockevents_config_and_…
Browse files Browse the repository at this point in the history
…register
  • Loading branch information
andy-padavan committed Aug 28, 2016
1 parent 4433a98 commit c642dc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions trunk/linux-3.0.x/arch/mips/rt2880/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ static int ra_systick_clockevent_init(void)

cd->features = CLOCK_EVT_FEAT_ONESHOT;
cd->name = "Ralink System Tick Counter";
clockevent_set_clock(cd, 50000);
cd->max_delta_ns = clockevent_delta2ns(0x7fff, cd);
cd->min_delta_ns = clockevent_delta2ns(0x3, cd);
#if defined (CONFIG_RALINK_MT7621) && defined (CONFIG_MIPS_GIC_IPI)
/* must be lower than MIPS original cd rating(300) to activate "broadcast mode" */
cd->rating = 250;
Expand All @@ -218,7 +215,7 @@ static int ra_systick_clockevent_init(void)
setup_irq(irq, &ra_systick_irqaction);
}

clockevents_register_device(cd);
clockevents_config_and_register(cd, 50000, 0x3, 0x7fff);

/* Enable ralink system count register */
(*((volatile u32 *)(RALINK_MCNT_CFG))) = 0x3;
Expand Down
5 changes: 1 addition & 4 deletions trunk/linux-3.4.x/arch/mips/rt2880/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ static int ra_systick_clockevent_init(void)

cd->features = CLOCK_EVT_FEAT_ONESHOT;
cd->name = "Ralink System Tick Counter";
clockevent_set_clock(cd, 50000);
cd->max_delta_ns = clockevent_delta2ns(0x7fff, cd);
cd->min_delta_ns = clockevent_delta2ns(0x3, cd);
#if defined (CONFIG_RALINK_MT7621) && defined (CONFIG_MIPS_GIC_IPI)
/* must be lower than MIPS original cd rating(300) to activate "broadcast mode" */
cd->rating = 250;
Expand All @@ -218,7 +215,7 @@ static int ra_systick_clockevent_init(void)
setup_irq(irq, &ra_systick_irqaction);
}

clockevents_register_device(cd);
clockevents_config_and_register(cd, 50000, 0x3, 0x7fff);

/* Enable ralink system count register */
(*((volatile u32 *)(RALINK_MCNT_CFG))) = 0x3;
Expand Down

0 comments on commit c642dc3

Please sign in to comment.