aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/common.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2014-02-19 01:19:33 -0500
committerOlof Johansson <olof@lixom.net>2014-02-19 01:19:33 -0500
commit11d73c56b96b4297bd96273e9a22b7c72d13f1fa (patch)
tree3edc8cfa1508dabd06a7d3e0d615cea943ba0cca /arch/arm/mach-ixp4xx/common.c
parent6d0abeca3242a88cab8232e4acd7e2bf088f3bc2 (diff)
parentfb3174e4ad2427c6ad90c67093d6ca97f13e8672 (diff)
Merge tag 'dropmachtimexh-v2' of git://git.pengutronix.de/git/ukl/linux into next/cleanup
This cleanup series gets rid of <mach/timex.h> for platforms not using ARCH_MULTIPLATFORM. (For multi-platform code it's already unused since 387798b (ARM: initial multiplatform support).) To make this work some code out of arch/arm needed to be adapted. The respective changes got acks by their maintainers to be taken via armsoc (with Andrew Morton substituting for Alessandro Zummo as rtc maintainer). Compared to the previous pull request there was another patch added that fixes a (non-critical) regression on ixp4xx. Olof Johansson asked to not squash this fix into the original commit to save him from the need to reverify the series. * tag 'dropmachtimexh-v2' of git://git.pengutronix.de/git/ukl/linux: ARM: ixp4xx: fix timer latch calculation ARM: drop <mach/timex.h> for !ARCH_MULTIPLATFORM, too ARM: rpc: stop using <mach/timex.h> ARM: ixp4xx: stop using <mach/timex.h> input: ixp4xx-beeper: don't use symbols from <mach/timex.h> ARM: at91: don't use <mach/timex.h> ARM: ep93xx: stop using mach/timex.h ARM: mmp: stop using mach/timex.h ARM: netx: stop using mach/timex.h ARM: sa1100: stop using mach/timex.h clocksource: sirf/marco+prima2: drop usage of CLOCK_TICK_RATE rtc: pxa: drop unused #define TIMER_FREQ rtc: at91sam9: include <mach/hardware.h> explicitly ARM/serial: at91: switch atmel serial to use gpiolib Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-ixp4xx/common.c')
-rw-r--r--arch/arm/mach-ixp4xx/common.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 6d68aed6548a..dc5d7a0e5d9c 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -23,7 +23,6 @@
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/bitops.h> 24#include <linux/bitops.h>
25#include <linux/time.h> 25#include <linux/time.h>
26#include <linux/timex.h>
27#include <linux/clocksource.h> 26#include <linux/clocksource.h>
28#include <linux/clockchips.h> 27#include <linux/clockchips.h>
29#include <linux/io.h> 28#include <linux/io.h>
@@ -45,6 +44,17 @@
45#include <asm/mach/irq.h> 44#include <asm/mach/irq.h>
46#include <asm/mach/time.h> 45#include <asm/mach/time.h>
47 46
47#define IXP4XX_TIMER_FREQ 66666000
48
49/*
50 * The timer register doesn't allow to specify the two least significant bits of
51 * the timeout value and assumes them being zero. So make sure IXP4XX_LATCH is
52 * the best value with the two least significant bits unset.
53 */
54#define IXP4XX_LATCH DIV_ROUND_CLOSEST(IXP4XX_TIMER_FREQ, \
55 (IXP4XX_OST_RELOAD_MASK + 1) * HZ) * \
56 (IXP4XX_OST_RELOAD_MASK + 1)
57
48static void __init ixp4xx_clocksource_init(void); 58static void __init ixp4xx_clocksource_init(void);
49static void __init ixp4xx_clockevent_init(void); 59static void __init ixp4xx_clockevent_init(void);
50static struct clock_event_device clockevent_ixp4xx; 60static struct clock_event_device clockevent_ixp4xx;
@@ -520,7 +530,7 @@ static void ixp4xx_set_mode(enum clock_event_mode mode,
520 530
521 switch (mode) { 531 switch (mode) {
522 case CLOCK_EVT_MODE_PERIODIC: 532 case CLOCK_EVT_MODE_PERIODIC:
523 osrt = LATCH & ~IXP4XX_OST_RELOAD_MASK; 533 osrt = IXP4XX_LATCH & ~IXP4XX_OST_RELOAD_MASK;
524 opts = IXP4XX_OST_ENABLE; 534 opts = IXP4XX_OST_ENABLE;
525 break; 535 break;
526 case CLOCK_EVT_MODE_ONESHOT: 536 case CLOCK_EVT_MODE_ONESHOT: