Skip to contentSkip to conversation

ARM: Remove LATCH reference for time-acorn.c

PATCH New Deepak Saxena 6 participants 20 messages Aug 4, 2011 – Aug 5, 2011 1 message not in the archive

Subsystems (24)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/12 ARM: Remove LATCH reference for time-acorn.c

As part of work to remove the global CLOCK_TICK_RATE symbol, this patch defines a sub-arch local value for use by the time-acorn.c file. This is only used when mach-rpc is built and the tick rate was taken from that sub-arch's timex.h header.

---
 arch/arm/common/time-acorn.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
arch/arm/common/time-acorn.c +9 -6
index deeed56..0cc3a0d 100644
@@ -24,6 +24,9 @@
 
 #include <asm/mach/time.h>
 
+#define ACORN_TICK_RATE         2000000
+#define ACORN_TIMER_LATCH	((CLOCK_TICK_RATE + HZ/2) / HZ)
+
 unsigned long ioc_timer_gettimeoffset(void)
 {
 	unsigned int count1, count2, status;
@@ -46,23 +49,23 @@ unsigned long ioc_timer_gettimeoffset(void)
 		 * and count2.
 		 */
 		if (status & (1 << 5))
-			offset -= LATCH;
+			offset -= ACORN_TIMER_LATCH;
 	} else if (count2 > count1) {
 		/*
 		 * We have just had another interrupt between reading
 		 * count1 and count2.
 		 */
-		offset -= LATCH;
+		offset -= ACORN_TIMER_LATCH;
 	}
 
-	offset = (LATCH - offset) * (tick_nsec / 1000);
-	return (offset + LATCH/2) / LATCH;
+	offset = (ACORN_TIMER_LATCH - offset) * (tick_nsec / 1000);
+	return (offset + ACORN_TIMER_LATCH/2) / ACORN_TIMER_LATCH;
 }
 
 void __init ioctime_init(void)
 {
-	ioc_writeb(LATCH & 255, IOC_T0LTCHL);
-	ioc_writeb(LATCH >> 8, IOC_T0LTCHH);
+	ioc_writeb(ACORN_TIMER_LATCH & 255, IOC_T0LTCHL);
+	ioc_writeb(ACORN_TIMER_LATCH >> 8, IOC_T0LTCHH);
 	ioc_writeb(0, IOC_T0GO);
 }
 
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 1/12 ARM: Remove LATCH reference for time-acorn.c

Quoted 16 lines · Deepak Saxena

As part of work to remove the global CLOCK_TICK_RATE symbol, this patch defines a sub-arch local value for use by the time-acorn.c file. This is only used when mach-rpc is built and the tick rate was taken from that sub-arch's timex.h header.

---
 arch/arm/common/time-acorn.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
arch/arm/common/time-acorn.c +0 -0
index deeed56..0cc3a0d 100644

arch/arm/common/time-acorn.c line 28

Quoted 5 lines
arch/arm/common/time-acorn.c +2 -0
@@ -24,6 +24,9 @@
 
 #include <asm/mach/time.h>
 
+#define ACORN_TICK_RATE         2000000
+#define ACORN_TIMER_LATCH	((CLOCK_TICK_RATE + HZ/2) / HZ)

Shouldn't this be ACORN_TICK_RATE ?

#3 lore raw

PATCH 1/12 ARM: Remove LATCH reference for time-acorn.c

In reply to Deepak Saxena

arch/arm/common/time-acorn.c line 28

Quoted 2 lines · Deepak Saxena
arch/arm/common/time-acorn.c +2 -0
+#define ACORN_TICK_RATE         2000000
+#define ACORN_TIMER_LATCH	((CLOCK_TICK_RATE + HZ/2) / HZ)

And also these should all be DIV_ROUND_CLOSEST(xxx_TICK_RATE, HZ)

#4 lore raw

PATCH 1/12 ARM: Remove LATCH reference for time-acorn.c

On Aug 05 2011, at 10:23, Russell King - ARM Linux was caught saying:

Quoted 5 lines · Deepak Saxena

arch/arm/common/time-acorn.c line 28

Quoted 2 lines
arch/arm/common/time-acorn.c +2 -0
+#define ACORN_TICK_RATE         2000000
+#define ACORN_TIMER_LATCH	((CLOCK_TICK_RATE + HZ/2) / HZ)

And also these should all be DIV_ROUND_CLOSEST(xxx_TICK_RATE, HZ)

Ack. Will update all patches and post an updated version with some other fixes.

~Deepak

Signature · 3 lines
"People think all we need to fix our predicament is a free source of
energy, but I think we need to change out behaviour. More energy would
just deplete the Earth's lifeblood faster." - Janine Benyius
#5 lore raw

PATCH 2/12 ARM: at91: Remove LATCH and CLOCK_TICK_RATE dependency

In reply to a message not in the archive

As part of work to remove the global CLOCK_TICK_RATE symbol, this patch defines a sub-arch local value for use by the at91 code. Once all LATCH and CLOCK_TICK_RATE references are removed, we will remove all the definitions across sub-arches.

---
 arch/arm/mach-at91/at91rm9200_time.c      |    6 +-
 arch/arm/mach-at91/include/mach/at91_st.h |   63 +++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+), 3 deletions(-)
arch/arm/mach-at91/at91rm9200_time.c +3 -3
index 1dd69c8..61a6d0c 100644
@@ -74,8 +74,8 @@ static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id)
 	if (sr & AT91_ST_PITS) {
 		u32	crtr = read_CRTR();
 
-		while (((crtr - last_crtr) & AT91_ST_CRTV) >= LATCH) {
-			last_crtr += LATCH;
+		while (((crtr - last_crtr) & AT91_ST_CRTV) >= AT91_TIMER_LATCH) {
+			last_crtr += AT91_TIMER_LATCH;
 			clkevt.event_handler(&clkevt);
 		}
 		return IRQ_HANDLED;
@@ -116,7 +116,7 @@ clkevt32k_mode(enum clock_event_mode mode, struct clock_event_device *dev)
 	case CLOCK_EVT_MODE_PERIODIC:
 		/* PIT for periodic irqs; fixed rate of 1/HZ */
 		irqmask = AT91_ST_PITS;
-		at91_sys_write(AT91_ST_PIMR, LATCH);
+		at91_sys_write(AT91_ST_PIMR, AT91_TIMER_LATCH);
 		break;
 	case CLOCK_EVT_MODE_ONESHOT:
 		/* ALM for oneshot irqs, set by next_event()
arch/arm/mach-at91/include/mach/at91_st.h +63 -0

67 lines not on this page · raw message

Signature · 1 line
1.7.4.1
#6 lore raw

PATCH 3/12 ARM: unicore32: Remove depency on LATCH

In reply to a message not in the archive

As part of work to remove the global CLOCK_TICK_RATE symbol, this patch defines a sub-arch local value for use by the at91 code. Once all LATCH and CLOCK_TICK_RATE references are removed, we will remove all the definitions across sub-arches.

---
 arch/unicore32/include/asm/timex.h |    2 ++
 arch/unicore32/kernel/time.c       |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)
arch/unicore32/include/asm/timex.h +2 -0
index faf16ba..e0fed26 100644
@@ -29,6 +29,8 @@
 
 #endif
 
+#define TIMER_LATCH  ((CLOCK_TICK_RATE + HZ/2) / HZ)
+
 #include <asm-generic/timex.h>
 
 #endif
arch/unicore32/kernel/time.c +1 -1
index 080710c..3ed4ef9 100644
@@ -134,7 +134,7 @@ void puv3_timer_resume(void)
 	/*
 	 * OSMR0 is the system timer: make sure OSCR is sufficiently behind
 	 */
-	writel(readl(OST_OSMR0) - LATCH, OST_OSCR);
+	writel(readl(OST_OSMR0) - TIMER_LATCH, OST_OSCR);
 }
 #else
 void puv3_timer_suspend(void) { };
Signature · 1 line
1.7.4.1
#7 lore raw

PATCH 3/12 ARM: unicore32: Remove depency on LATCH

On Aug 04 2011, at 06:47, Deepak Saxena was caught saying:

Quoted 5 lines

As part of work to remove the global CLOCK_TICK_RATE symbol, this patch defines a sub-arch local value for use by the at91 code. Once all LATCH and CLOCK_TICK_RATE references are removed, we will remove all the definitions across sub-arches.

Obviously ignore this one, this should have been in another branch. :)

~Deepak

Signature · 3 lines
"People think all we need to fix our predicament is a free source of
energy, but I think we need to change out behaviour. More energy would
just deplete the Earth's lifeblood faster." - Janine Benyius
#8 lore raw

PATCH 4/12 ARM: clps711x: Remove LATCH and CLOCK_TICK_RATE dependency

In reply to a message not in the archive

As part of work to remove the global CLOCK_TICK_RATE symbol, this patch defines a sub-arch local value for use by the clps711x code. Once all LATCH and CLOCK_TICK_RATE references are removed, we will remove all the definitions across sub-arches.

---
 arch/arm/mach-clps711x/time.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
arch/arm/mach-clps711x/time.c +6 -4
index d581ef0..88c86f2 100644
@@ -30,18 +30,20 @@
 
 #include <asm/mach/time.h>
 
+#define	CLPS711x_TICK_RATE	512000
+#define TIMER_LATCH		((CLPS711x_TICK_RATE + HZ/2) / HZ)
 
 /*
  * gettimeoffset() returns time since last timer tick, in usecs.
  *
- * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
+ * 'LATCH' is hwclock ticks per jiffy.
  * 'tick' is usecs per jiffy.
  */
 static unsigned long clps711x_gettimeoffset(void)
 {
 	unsigned long hwticks;
-	hwticks = LATCH - (clps_readl(TC2D) & 0xffff);	/* since last underflow */
-	return (hwticks * (tick_nsec / 1000)) / LATCH;
+	hwticks = TIMER_LATCH - (clps_readl(TC2D) & 0xffff);	/* since last underflow */
+	return (hwticks * (tick_nsec / 1000)) / TIMER_LATCH;
 }
 
 /*
@@ -69,7 +71,7 @@ static void __init clps711x_timer_init(void)
 	syscon |= SYSCON1_TC2S | SYSCON1_TC2M;
 	clps_writel(syscon, SYSCON1);
 
-	clps_writel(LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */
+	clps_writel(TIMER_LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */
 
 	setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
 
Signature · 1 line
1.7.4.1
#9 lore raw

PATCH 5/12 ARM: h720x: Remove LATCH and CLOCK_TICK_RATE dependency

In reply to a message not in the archive

As part of work to remove the global CLOCK_TICK_RATE symbol, this patch defines a sub-arch local value for use by the h720x code. Once all LATCH and CLOCK_TICK_RATE references are removed, we will remove all the definitions across sub-arches.

---
 arch/arm/mach-h720x/common.c    |    4 +++-
 arch/arm/mach-h720x/common.h    |    3 +++
 arch/arm/mach-h720x/cpu-h7201.c |    2 +-
 arch/arm/mach-h720x/cpu-h7202.c |    2 +-
 4 files changed, 8 insertions(+), 3 deletions(-)
arch/arm/mach-h720x/common.c +3 -1
index 51d4e44..383c121 100644
@@ -30,6 +30,8 @@
 
 #include <asm/mach/dma.h>
 
+#include "common.h"
+
 #if 0
 #define IRQDBG(args...) printk(args)
 #else
@@ -46,7 +48,7 @@ void __init arch_dma_init(dma_t *dma)
  */
 unsigned long h720x_gettimeoffset(void)
 {
-	return (CPU_REG (TIMER_VIRT, TM0_COUNT) * tick_usec) / LATCH;
+	return (CPU_REG (TIMER_VIRT, TM0_COUNT) * tick_usec) / H720X_LATCH;
 }
 
 /*
arch/arm/mach-h720x/common.h +3 -0
index 7dd5fa6..ac32f3c 100644
@@ -27,3 +27,6 @@ extern void __init h7202_init_time(void);
 #ifdef CONFIG_ARCH_H7201
 extern struct sys_timer h7201_timer;
 #endif
+
+#define H720X_TICK_RATE		3686400
+#define H720X_LATCH		((H720X_TICK_RATE + HZ/2) / HZ)	/* For divider */
arch/arm/mach-h720x/cpu-h7201.c +1 -1
index 24df2a3..8c2b36d 100644
@@ -46,7 +46,7 @@ static struct irqaction h7201_timer_irq = {
  */
 void __init h7201_init_time(void)
 {
-	CPU_REG (TIMER_VIRT, TM0_PERIOD) = LATCH;
+	CPU_REG (TIMER_VIRT, TM0_PERIOD) = H720X_LATCH;
 	CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_RESET;
 	CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_REPEAT | TM_START;
 	CPU_REG (TIMER_VIRT, TIMER_TOPCTRL) = ENABLE_TM0_INTR | TIMER_ENABLE_BIT;
arch/arm/mach-h720x/cpu-h7202.c +1 -1
index c37d570..c2879af 100644
@@ -180,7 +180,7 @@ static struct irqaction h7202_timer_irq = {
  */
 void __init h7202_init_time(void)
 {
-	CPU_REG (TIMER_VIRT, TM0_PERIOD) = LATCH;
+	CPU_REG (TIMER_VIRT, TM0_PERIOD) = H720X_LATCH;
 	CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_RESET;
 	CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_REPEAT | TM_START;
 	CPU_REG (TIMER_VIRT, TIMER_TOPCTRL) = ENABLE_TM0_INTR | TIMER_ENABLE_BIT;
Signature · 1 line
1.7.4.1
#10 lore raw

PATCH 6/12 ARM: IXP23xx: Remove LATCH and CLOCK_TICK_RATE dependency

In reply to a message not in the archive

As part of work to remove the global CLOCK_TICK_RATE symbol, this patch defines a sub-arch local value for use by the ixp23xx code. Once all LATCH and CLOCK_TICK_RATE references are removed, we will remove all the definitions across sub-arches.

---
 arch/arm/mach-ixp23xx/core.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
arch/arm/mach-ixp23xx/core.c +8 -6
index a1bee33..03eba95 100644
@@ -336,7 +336,9 @@ void __init ixp23xx_init_irq(void)
 /*************************************************************************
  * Timer-tick functions for IXP23xx
  *************************************************************************/
-#define CLOCK_TICKS_PER_USEC	(CLOCK_TICK_RATE / USEC_PER_SEC)
+#define IXP23XX_TICK_RATE 75000000
+#define IXP23XX_TICKS_PER_USEC	(IXP23XX_TICK_RATE / USEC_PER_SEC)
+#define IXP23XX_TIMER_LATCH	((CLOCK_TICK_RATE + HZ/2) / HZ)	/* For divider */
 
 static unsigned long next_jiffy_time;
 
@@ -345,7 +347,7 @@ ixp23xx_gettimeoffset(void)
 {
 	unsigned long elapsed;
 
-	elapsed = *IXP23XX_TIMER_CONT - (next_jiffy_time - LATCH);
+	elapsed = *IXP23XX_TIMER_CONT - (next_jiffy_time - IXP23XX_TIMER_LATCH);
 
 	return elapsed / CLOCK_TICKS_PER_USEC;
 }
@@ -355,9 +357,9 @@ ixp23xx_timer_interrupt(int irq, void *dev_id)
 {
 	/* Clear Pending Interrupt by writing '1' to it */
 	*IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND;
-	while ((signed long)(*IXP23XX_TIMER_CONT - next_jiffy_time) >= LATCH) {
+	while ((signed long)(*IXP23XX_TIMER_CONT - next_jiffy_time) >= IXP23XX_TIMER_LATCH) {
 		timer_tick();
-		next_jiffy_time += LATCH;
+		next_jiffy_time += IXP23XX_TIMER_LATCH;
 	}
 
 	return IRQ_HANDLED;
@@ -376,10 +378,10 @@ void __init ixp23xx_init_timer(void)
 
 	/* Setup the Timer counter value */
 	*IXP23XX_TIMER1_RELOAD =
-		(LATCH & ~IXP23XX_TIMER_RELOAD_MASK) | IXP23XX_TIMER_ENABLE;
+		(IXP23XX_TIMER_LATCH & ~IXP23XX_TIMER_RELOAD_MASK) | IXP23XX_TIMER_ENABLE;
 
 	*IXP23XX_TIMER_CONT = 0;
-	next_jiffy_time = LATCH;
+	next_jiffy_time = IXP23XX_TIMER_LATCH;
 
 	/* Connect the interrupt handler and enable the interrupt */
 	setup_irq(IRQ_IXP23XX_TIMER1, &ixp23xx_timer_irq);
Signature · 1 line
1.7.4.1
#11 lore raw

PATCH 6/12 ARM: IXP23xx: Remove LATCH and CLOCK_TICK_RATE dependency

Quoted 5 lines · Deepak Saxena

As part of work to remove the global CLOCK_TICK_RATE symbol, this patch defines a sub-arch local value for use by the ixp23xx code. Once all LATCH and CLOCK_TICK_RATE references are removed, we will remove all the definitions across sub-arches.

I posted a patchset back in Oct 2010 that does this:

http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029451.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029452.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029453.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029454.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029455.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029456.html

#12 lore raw

PATCH 7/12 ARM: IXP4x: Remove LATCH and CLOCK_TICK_RATE dependency

In reply to a message not in the archive

As part of work to remove the global CLOCK_TICK_RATE symbol, this patch defines a sub-arch local value for use by the ixp4xx code. Once all LATCH and CLOCK_TICK_RATE references are removed, we will remove all the definitions across sub-arches.

---
 arch/arm/mach-ixp4xx/common.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
arch/arm/mach-ixp4xx/common.c +6 -1
index 0777257..fe8b98a 100644
@@ -448,6 +448,11 @@ static int ixp4xx_set_next_event(unsigned long evt,
 	return 0;
 }
 
+
+#define IXP4XX_TIMER_FREQ 	66666000
+#define IXP4XX_TICK_RATE	(((IXP4XX_TIMER_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
+#define IXP4XX_TIMER_LATCH  	((CLOCK_TICK_RATE + HZ/2) / HZ)
+
 static void ixp4xx_set_mode(enum clock_event_mode mode,
 			    struct clock_event_device *evt)
 {
@@ -456,7 +461,7 @@ static void ixp4xx_set_mode(enum clock_event_mode mode,
 
 	switch (mode) {
 	case CLOCK_EVT_MODE_PERIODIC:
-		osrt = LATCH & ~IXP4XX_OST_RELOAD_MASK;
+		osrt = IXP4XX_TIMER_LATCH & ~IXP4XX_OST_RELOAD_MASK;
  		opts = IXP4XX_OST_ENABLE;
 		break;
 	case CLOCK_EVT_MODE_ONESHOT:
Signature · 1 line
1.7.4.1
#13 lore raw

PATCH 8/12 ARM: ks8695: Remove LATCH and CLOCK_TICK_RATE dependency

In reply to a message not in the archive

As part of work to remove the global CLOCK_TICK_RATE symbol, this patch defines a sub-arch local value for use by the ks8695 code. Once all LATCH and CLOCK_TICK_RATE references are removed, we will remove all the definitions across sub-arches.

---
 arch/arm/mach-ks8695/time.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/mach-ks8695/time.c +3 -1
index 69c072c..cf63499 100644
@@ -33,6 +33,8 @@
 
 #include "generic.h"
 
+#define	KS8695_TIMER_LATCH	((KS8695_TICK_RATE + HZ/2) / HZ)
+
 /*
  * Returns number of ms since last clock interrupt.  Note that interrupts
  * will have been disabled by do_gettimeoffset()
@@ -62,7 +64,7 @@ static unsigned long ks8695_gettimeoffset (void)
 		elapsed += (CLOCK_TICK_RATE / HZ);
 
 	/* Convert ticks to usecs */
-	return (unsigned long)(elapsed * (tick_nsec / 1000)) / LATCH;
+	return (unsigned long)(elapsed * (tick_nsec / 1000)) / KS8695_TIMER_LATCH;
 }
 
 /*
Signature · 1 line
1.7.4.1
#14 lore raw

PATCH 9/12 ARM: netx: Remove LATCH and CLOCK_TICK_RATE dependency

In reply to a message not in the archive

As part of work to remove the global CLOCK_TICK_RATE symbol, this patch defines a sub-arch local value for use by the netx code. Once all LATCH and CLOCK_TICK_RATE references are removed, we will remove all the definitions across sub-arches.

---
 arch/arm/mach-netx/time.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/mach-netx/time.c +5 -2
index e24c141..36429fb 100644
@@ -31,6 +31,9 @@
 #define TIMER_CLOCKEVENT 0
 #define TIMER_CLOCKSOURCE 1
 
+#define NETX_TICK_RATE		100000000
+#define NETX_TIMER_LATCH 	((NETX_TICK_RATE + HZ/2) / HZ)
+
 static void netx_set_mode(enum clock_event_mode mode,
 		struct clock_event_device *clk)
 {
@@ -41,7 +44,7 @@ static void netx_set_mode(enum clock_event_mode mode,
 
 	switch (mode) {
 	case CLOCK_EVT_MODE_PERIODIC:
-		writel(LATCH, NETX_GPIO_COUNTER_MAX(TIMER_CLOCKEVENT));
+		writel(NETX_TIMER_LATCH, NETX_GPIO_COUNTER_MAX(TIMER_CLOCKEVENT));
 		tmode = NETX_GPIO_COUNTER_CTRL_RST_EN |
 			NETX_GPIO_COUNTER_CTRL_IRQ_EN |
 			NETX_GPIO_COUNTER_CTRL_RUN;
@@ -115,7 +118,7 @@ static void __init netx_timer_init(void)
 	/* Reset the timer value to zero */
 	writel(0, NETX_GPIO_COUNTER_CURRENT(0));
 
-	writel(LATCH, NETX_GPIO_COUNTER_MAX(0));
+	writel(NETX_TIMER_LATCH, NETX_GPIO_COUNTER_MAX(0));
 
 	/* acknowledge interrupt */
 	writel(COUNTER_BIT(0), NETX_GPIO_IRQ);
Signature · 1 line
1.7.4.1
#15 lore raw

PATCH 10/12 ARM: pnx4000: Remove LATCH and CLOCK_TICK_RATE dependency

In reply to a message not in the archive

As part of work to remove the global CLOCK_TICK_RATE symbol, this patch defines a sub-arch local value for use by the pnx4000 code. Once all LATCH and CLOCK_TICK_RATE references are removed, we will remove all the definitions across sub-arches.

---
 arch/arm/mach-pnx4008/time.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
arch/arm/mach-pnx4008/time.c +7 -4
index 0c8aad4..8aa48a4 100644
@@ -34,6 +34,9 @@
 
 /*! Note: all timers are UPCOUNTING */
 
+#define HSTIM_TICK_RATE		1000000
+#define HSTIM_TIMER_LATCH	((HSTIM_TICK_RATE + HZ/2) / HZ)
+
 /*!
  * Returns number of us since last clock interrupt.  Note that interrupts
  * will have been disabled by do_gettimeoffset()
@@ -42,8 +45,8 @@ static unsigned long pnx4008_gettimeoffset(void)
 {
 	u32 ticks_to_match =
 	    __raw_readl(HSTIM_MATCH0) - __raw_readl(HSTIM_COUNTER);
-	u32 elapsed = LATCH - ticks_to_match;
-	return (elapsed * (tick_nsec / 1000)) / LATCH;
+	u32 elapsed = HSTIM_TIMER_LATCH - ticks_to_match;
+	return (elapsed * (tick_nsec / 1000)) / HSTIM_TIMER_LATCH;
 }
 
 /*!
@@ -61,7 +64,7 @@ static irqreturn_t pnx4008_timer_interrupt(int irq, void *dev_id)
 			 * for this interrupt handling longer than a normal
 			 * timer period
 			 */
-			__raw_writel(__raw_readl(HSTIM_MATCH0) + LATCH,
+			__raw_writel(__raw_readl(HSTIM_MATCH0) + HSTIM_TIMER_LATCH,
 				     HSTIM_MATCH0);
 			__raw_writel(MATCH0_INT, HSTIM_INT);	/* clear interrupt */
 
@@ -100,7 +103,7 @@ static __init void pnx4008_setup_timer(void)
 	__raw_writel(0, HSTIM_MCTRL);
 	__raw_writel(0, HSTIM_CCR);
 	__raw_writel(12, HSTIM_PMATCH);	/* scale down to 1 MHZ */
-	__raw_writel(LATCH, HSTIM_MATCH0);
+	__raw_writel(HSTIM_TIMER_LATCH, HSTIM_MATCH0);
 	__raw_writel(MR0_INT, HSTIM_MCTRL);
 
 	setup_irq(HSTIMER_INT, &pnx4008_timer_irq);
Signature · 1 line
1.7.4.1
#16 lore raw

PATCH 11/12 ARM: sa1100: Remove LATCH and CLOCK_TICK_RATE dependency

In reply to a message not in the archive

As part of work to remove the global CLOCK_TICK_RATE symbol, this patch defines a sub-arch local value for use by the sa1100 code. Once all LATCH and CLOCK_TICK_RATE references are removed, we will remove all the definitions across sub-arches.

---
 arch/arm/mach-sa1100/time.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
arch/arm/mach-sa1100/time.c +4 -1
index fa66024..d4de620 100644
@@ -127,6 +127,9 @@ static void __init sa1100_timer_init(void)
 }
 
 #ifdef CONFIG_PM
+#define SA1100_TICK_RATE	3686400
+#define SA1100_TIMER_LATCH	((CLOCK_TICK_RATE + HZ/2) / HZ)	/* For divider */
+
 unsigned long osmr[4], oier;
 
 static void sa1100_timer_suspend(void)
@@ -150,7 +153,7 @@ static void sa1100_timer_resume(void)
 	/*
 	 * OSMR0 is the system timer: make sure OSCR is sufficiently behind
 	 */
-	OSCR = OSMR0 - LATCH;
+	OSCR = OSMR0 - SA1100_TIMER_LATCH;
 }
 #else
 #define sa1100_timer_suspend NULL
Signature · 1 line
1.7.4.1
#17 lore raw

PATCH 12/12 ARM: Remove mach-*/include/mach/timex.h

In reply to a message not in the archive

We no longer use the global LATCH definition to drive any platform-specific timers so we can remove the timex.h files from all sub-arch include directories.

We still need to keep an ARM CLOCK_TICK_RATE due to jiffies.h depending on it to build but that will be removed in the future once all non-ARM references to LATCH are also removed.

---
 arch/arm/include/asm/timex.h                  |    5 +-
 arch/arm/mach-at91/include/mach/timex.h       |   87 -------------------------
 arch/arm/mach-bcmring/include/mach/timex.h    |   25 -------
 arch/arm/mach-clps711x/include/mach/timex.h   |   23 -------
 arch/arm/mach-cns3xxx/include/mach/timex.h    |   12 ----
 arch/arm/mach-davinci/include/mach/timex.h    |   22 ------
 arch/arm/mach-dove/include/mach/timex.h       |    9 ---
 arch/arm/mach-ebsa110/include/mach/timex.h    |   19 ------
 arch/arm/mach-ep93xx/include/mach/timex.h     |    5 --
 arch/arm/mach-exynos4/include/mach/timex.h    |   29 --------
 arch/arm/mach-footbridge/include/mach/timex.h |   18 -----
 arch/arm/mach-gemini/include/mach/timex.h     |   13 ----
 arch/arm/mach-h720x/include/mach/timex.h      |   15 ----
 arch/arm/mach-integrator/include/mach/timex.h |   26 -------
 arch/arm/mach-iop13xx/include/mach/timex.h    |    1 -
 arch/arm/mach-iop32x/include/mach/timex.h     |    6 --
 arch/arm/mach-iop33x/include/mach/timex.h     |    6 --
 arch/arm/mach-ixp2000/include/mach/timex.h    |   13 ----
 arch/arm/mach-ixp23xx/include/mach/timex.h    |    7 --
 arch/arm/mach-ixp4xx/include/mach/timex.h     |   16 -----
 arch/arm/mach-kirkwood/include/mach/timex.h   |   10 ---
 arch/arm/mach-ks8695/include/mach/timex.h     |   21 ------
 arch/arm/mach-lpc32xx/include/mach/timex.h    |   28 --------
 arch/arm/mach-mmp/include/mach/timex.h        |   13 ----
 arch/arm/mach-msm/include/mach/timex.h        |   21 ------
 arch/arm/mach-mv78xx0/include/mach/timex.h    |    9 ---
 arch/arm/mach-mxs/include/mach/timex.h        |   21 ------
 arch/arm/mach-netx/include/mach/timex.h       |   20 ------
 arch/arm/mach-nomadik/include/mach/timex.h    |    6 --
 arch/arm/mach-nuc93x/include/mach/timex.h     |   25 -------
 arch/arm/mach-omap1/include/mach/timex.h      |    5 --
 arch/arm/mach-omap2/include/mach/timex.h      |    5 --
 arch/arm/mach-orion5x/include/mach/timex.h    |   11 ---
 arch/arm/mach-pnx4008/include/mach/timex.h    |   19 ------
 arch/arm/mach-prima2/include/mach/timex.h     |   14 ----
 arch/arm/mach-pxa/include/mach/timex.h        |   34 ----------
 arch/arm/mach-realview/include/mach/timex.h   |   23 -------
 arch/arm/mach-rpc/include/mach/timex.h        |   17 -----
 arch/arm/mach-s3c2410/include/mach/timex.h    |   24 -------
 arch/arm/mach-s3c64xx/include/mach/timex.h    |   24 -------
 arch/arm/mach-s5p64x0/include/mach/timex.h    |   27 --------
 arch/arm/mach-s5pc100/include/mach/timex.h    |   24 -------
 arch/arm/mach-s5pv210/include/mach/timex.h    |   29 --------
 arch/arm/mach-sa1100/include/mach/timex.h     |   12 ----
 arch/arm/mach-shark/include/mach/timex.h      |    7 --
 arch/arm/mach-shmobile/include/mach/timex.h   |    6 --
 arch/arm/mach-spear3xx/include/mach/timex.h   |   19 ------
 arch/arm/mach-spear6xx/include/mach/timex.h   |   19 ------
 arch/arm/mach-tegra/include/mach/timex.h      |   26 -------
 arch/arm/mach-u300/include/mach/timex.h       |   17 -----
 arch/arm/mach-ux500/include/mach/timex.h      |    6 --
 arch/arm/mach-versatile/include/mach/timex.h  |   23 -------
 arch/arm/mach-vexpress/include/mach/timex.h   |   23 -------
 arch/arm/mach-vt8500/include/mach/timex.h     |   26 -------
 arch/arm/mach-w90x900/include/mach/timex.h    |   25 -------
 arch/arm/mach-zynq/include/mach/timex.h       |   23 -------
 56 files changed, 4 insertions(+), 1015 deletions(-)
 delete mode 100644 arch/arm/mach-at91/include/mach/timex.h
 delete mode 100644 arch/arm/mach-bcmring/include/mach/timex.h
 delete mode 100644 arch/arm/mach-clps711x/include/mach/timex.h
 delete mode 100644 arch/arm/mach-cns3xxx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-davinci/include/mach/timex.h
 delete mode 100644 arch/arm/mach-dove/include/mach/timex.h
 delete mode 100644 arch/arm/mach-ebsa110/include/mach/timex.h
 delete mode 100644 arch/arm/mach-ep93xx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-exynos4/include/mach/timex.h
 delete mode 100644 arch/arm/mach-footbridge/include/mach/timex.h
 delete mode 100644 arch/arm/mach-gemini/include/mach/timex.h
 delete mode 100644 arch/arm/mach-h720x/include/mach/timex.h
 delete mode 100644 arch/arm/mach-integrator/include/mach/timex.h
 delete mode 100644 arch/arm/mach-iop13xx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-iop32x/include/mach/timex.h
 delete mode 100644 arch/arm/mach-iop33x/include/mach/timex.h
 delete mode 100644 arch/arm/mach-ixp2000/include/mach/timex.h
 delete mode 100644 arch/arm/mach-ixp23xx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-ixp4xx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-kirkwood/include/mach/timex.h
 delete mode 100644 arch/arm/mach-ks8695/include/mach/timex.h
 delete mode 100644 arch/arm/mach-lpc32xx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-mmp/include/mach/timex.h
 delete mode 100644 arch/arm/mach-msm/include/mach/timex.h
 delete mode 100644 arch/arm/mach-mv78xx0/include/mach/timex.h
 delete mode 100644 arch/arm/mach-mxs/include/mach/timex.h
 delete mode 100644 arch/arm/mach-netx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-nomadik/include/mach/timex.h
 delete mode 100644 arch/arm/mach-nuc93x/include/mach/timex.h
 delete mode 100644 arch/arm/mach-omap1/include/mach/timex.h
 delete mode 100644 arch/arm/mach-omap2/include/mach/timex.h
 delete mode 100644 arch/arm/mach-orion5x/include/mach/timex.h
 delete mode 100644 arch/arm/mach-pnx4008/include/mach/timex.h
 delete mode 100644 arch/arm/mach-prima2/include/mach/timex.h
 delete mode 100644 arch/arm/mach-pxa/include/mach/timex.h
 delete mode 100644 arch/arm/mach-realview/include/mach/timex.h
 delete mode 100644 arch/arm/mach-rpc/include/mach/timex.h
 delete mode 100644 arch/arm/mach-s3c2410/include/mach/timex.h
 delete mode 100644 arch/arm/mach-s3c64xx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-s5p64x0/include/mach/timex.h
 delete mode 100644 arch/arm/mach-s5pc100/include/mach/timex.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/timex.h
 delete mode 100644 arch/arm/mach-sa1100/include/mach/timex.h
 delete mode 100644 arch/arm/mach-shark/include/mach/timex.h
 delete mode 100644 arch/arm/mach-shmobile/include/mach/timex.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/timex.h
 delete mode 100644 arch/arm/mach-tegra/include/mach/timex.h
 delete mode 100644 arch/arm/mach-u300/include/mach/timex.h
 delete mode 100644 arch/arm/mach-ux500/include/mach/timex.h
 delete mode 100644 arch/arm/mach-versatile/include/mach/timex.h
 delete mode 100644 arch/arm/mach-vexpress/include/mach/timex.h
 delete mode 100644 arch/arm/mach-vt8500/include/mach/timex.h
 delete mode 100644 arch/arm/mach-w90x900/include/mach/timex.h
 delete mode 100644 arch/arm/mach-zynq/include/mach/timex.h
arch/arm/include/asm/timex.h +4 -1
index 3be8de3..c4f4dac 100644
@@ -12,7 +12,10 @@
 #ifndef _ASMARM_TIMEX_H
 #define _ASMARM_TIMEX_H
 
-#include <mach/timex.h>
+/* 
+ * Bogus value used to allow kernel to build
+ */
+#define	CLOCK_TICK_RATE	1000000
 
 typedef unsigned long cycles_t;
 
arch/arm/mach-at91/include/mach/timex.h deleted +0 -87

87 lines not on this page · raw message

arch/arm/mach-bcmring/include/mach/timex.h deleted +0 -25
deleted file mode 100644
index 40d033e..0000000
@@ -1,25 +0,0 @@
-/*
- *
- *  Integrator architecture timex specifications
- *
- *  Copyright (C) 1999 ARM Limited
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-/*
- * Specifies the number of ticks per second
- */
-#define CLOCK_TICK_RATE		100000 /* REG_SMT_TICKS_PER_SEC */
arch/arm/mach-clps711x/include/mach/timex.h deleted +0 -23
deleted file mode 100644
index ac8823c..0000000
@@ -1,23 +0,0 @@
-/*
- *  arch/arm/mach-clps711x/include/mach/timex.h
- *
- *  Prospector 720T architecture timex specifications
- *
- *  Copyright (C) 2000 Deep Blue Solutions Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#define CLOCK_TICK_RATE 512000
arch/arm/mach-cns3xxx/include/mach/timex.h deleted +0 -12
deleted file mode 100644
index 1fd0421..0000000
@@ -1,12 +0,0 @@
-/*
- * Cavium Networks architecture timex specifications
- *
- * Copyright 2003 ARM Limited
- * Copyright 2008 Cavium Networks
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, Version 2, as
- * published by the Free Software Foundation.
- */
-
-#define CLOCK_TICK_RATE		(50000000 / 16)
arch/arm/mach-davinci/include/mach/timex.h deleted +0 -22
deleted file mode 100644
index 9b88529..0000000
@@ -1,22 +0,0 @@
-/*
- * DaVinci timer defines
- *
- * Author: Kevin Hilman, MontaVista Software, Inc. <[email protected]>
- *
- * 2007 (c) MontaVista Software, Inc. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-#ifndef __ASM_ARCH_TIMEX_H
-#define __ASM_ARCH_TIMEX_H
-
-/*
- * Alert: Not all timers of the DaVinci family run at a frequency of 27MHz,
- * but we should be fine as long as CLOCK_TICK_RATE or LATCH (see include/
- * linux/jiffies.h) are not used directly in code. Currently none of the
- * code relevant to DaVinci platform depends on these values directly.
- */
-#define CLOCK_TICK_RATE 27000000
-
-#endif /* __ASM_ARCH_TIMEX_H__ */
arch/arm/mach-dove/include/mach/timex.h deleted +0 -9
deleted file mode 100644
index 251d538..0000000
@@ -1,9 +0,0 @@
-/*
- * arch/arm/mach-dove/include/mach/timex.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#define CLOCK_TICK_RATE		(100 * HZ)
arch/arm/mach-ebsa110/include/mach/timex.h deleted +0 -19
deleted file mode 100644
index 4fb43b2..0000000
@@ -1,19 +0,0 @@
-/*
- *  arch/arm/mach-ebsa110/include/mach/timex.h
- *
- *  Copyright (C) 1997, 1998 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  EBSA110 architecture timex specifications
- */
-
-/*
- * On the EBSA, the clock ticks at weird rates.
- * This is therefore not used to calculate the
- * divisor.
- */
-#define CLOCK_TICK_RATE		47894000
-
arch/arm/mach-ep93xx/include/mach/timex.h deleted +0 -5
deleted file mode 100644
index 6b3503b..0000000
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-ep93xx/include/mach/timex.h
- */
-
-#define CLOCK_TICK_RATE		983040
arch/arm/mach-exynos4/include/mach/timex.h deleted +0 -29
deleted file mode 100644
index 6d13875..0000000
@@ -1,29 +0,0 @@
-/* linux/arch/arm/mach-exynos4/include/mach/timex.h
- *
- * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
- *		http://www.samsung.com
- *
- * Copyright (c) 2003-2010 Simtec Electronics
- *	Ben Dooks <[email protected]>
- *
- * Based on arch/arm/mach-s5p6442/include/mach/timex.h
- *
- * EXYNOS4 - time parameters
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_TIMEX_H
-#define __ASM_ARCH_TIMEX_H __FILE__
-
-/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
- * a variable is useless. It seems as long as we make our timers an
- * exact multiple of HZ, any value that makes a 1->1 correspondence
- * for the time conversion functions to/from jiffies is acceptable.
-*/
-
-#define CLOCK_TICK_RATE 12000000
-
-#endif /* __ASM_ARCH_TIMEX_H */
arch/arm/mach-footbridge/include/mach/timex.h deleted +0 -18
deleted file mode 100644
index d0fea9d..0000000
@@ -1,18 +0,0 @@
-/*
- *  arch/arm/mach-footbridge/include/mach/timex.h
- *
- *  Copyright (C) 1998 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  EBSA285 architecture timex specifications
- */
-
-/*
- * We assume a constant here; this satisfies the maths in linux/timex.h
- * and linux/time.h.  CLOCK_TICK_RATE is actually system dependent, but
- * this must be a constant.
- */
-#define CLOCK_TICK_RATE		(50000000/16)
arch/arm/mach-gemini/include/mach/timex.h deleted +0 -13
deleted file mode 100644
index dc5690b..0000000
@@ -1,13 +0,0 @@
-/*
- * Gemini timex specifications
- *
- * Copyright (C) 2008-2009 Paulius Zaleckas <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-/* When AHB bus frequency is 150MHz */
-#define CLOCK_TICK_RATE	38000000
arch/arm/mach-h720x/include/mach/timex.h deleted +0 -15
deleted file mode 100644
index 3f2f447..0000000
@@ -1,15 +0,0 @@
-/*
- * arch/arm/mach-h720x/include/mach/timex.h
- * Copyright (C) 2000 Jungjun Kim, Hynix Semiconductor Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_ARCH_TIMEX
-#define __ASM_ARCH_TIMEX
-
-#define CLOCK_TICK_RATE		3686400
-
-#endif
arch/arm/mach-integrator/include/mach/timex.h deleted +0 -26
deleted file mode 100644
index 1dcb420..0000000
@@ -1,26 +0,0 @@
-/*
- *  arch/arm/mach-integrator/include/mach/timex.h
- *
- *  Integrator architecture timex specifications
- *
- *  Copyright (C) 1999 ARM Limited
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-/*
- * ??
- */
-#define CLOCK_TICK_RATE		(50000000 / 16)
arch/arm/mach-iop13xx/include/mach/timex.h deleted +0 -1
deleted file mode 100644
index 45fb274..0000000
@@ -1 +0,0 @@
-#define CLOCK_TICK_RATE (100 * HZ)
arch/arm/mach-iop32x/include/mach/timex.h deleted +0 -6
deleted file mode 100644
index 7262ab8..0000000
@@ -1,6 +0,0 @@
-/*
- * arch/arm/mach-iop32x/include/mach/timex.h
- *
- * IOP32x architecture timex specifications
- */
-#define CLOCK_TICK_RATE		(100 * HZ)
arch/arm/mach-iop33x/include/mach/timex.h deleted +0 -6
deleted file mode 100644
index 54c5890..0000000
@@ -1,6 +0,0 @@
-/*
- * arch/arm/mach-iop33x/include/mach/timex.h
- *
- * IOP3xx architecture timex specifications
- */
-#define CLOCK_TICK_RATE		(100 * HZ)
arch/arm/mach-ixp2000/include/mach/timex.h deleted +0 -13
deleted file mode 100644
index 835e659..0000000
@@ -1,13 +0,0 @@
-/*
- * arch/arm/mach-ixp2000/include/mach/timex.h
- *
- * IXP2000 architecture timex specifications
- */
-
-
-/*
- * Default clock is 50MHz APB, but platform code can override this
- */
-#define CLOCK_TICK_RATE	50000000
-
-
arch/arm/mach-ixp23xx/include/mach/timex.h deleted +0 -7
deleted file mode 100644
index e341e9c..0000000
@@ -1,7 +0,0 @@
-/*
- * arch/arm/mach-ixp23xx/include/mach/timex.h
- *
- * XScale architecture timex specifications
- */
-
-#define CLOCK_TICK_RATE 75000000
arch/arm/mach-ixp4xx/include/mach/timex.h deleted +0 -16
deleted file mode 100644
index c9e930f..0000000
@@ -1,16 +0,0 @@
-/*
- * arch/arm/mach-ixp4xx/include/mach/timex.h
- * 
- */
-
-#include <mach/hardware.h>
-
-/*
- * We use IXP425 General purpose timer for our timer needs, it runs at 
- * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the
- * timer register ignores the bottom 2 bits of the LATCH value.
- */
-#define IXP4XX_TIMER_FREQ 66666000
-#define CLOCK_TICK_RATE \
-	(((IXP4XX_TIMER_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
-
arch/arm/mach-kirkwood/include/mach/timex.h deleted +0 -10
deleted file mode 100644
index c923cd1..0000000
@@ -1,10 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/include/mach/timex.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#define CLOCK_TICK_RATE		(100 * HZ)
-
arch/arm/mach-ks8695/include/mach/timex.h deleted +0 -21
deleted file mode 100644
index 10f7163..0000000
@@ -1,21 +0,0 @@
-/*
- * arch/arm/mach-ks8695/include/mach/timex.h
- *
- * Copyright (C) 2006 Simtec Electronics
- *	Ben Dooks <[email protected]>
- *
- * KS8695 - Time Parameters
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_ARCH_TIMEX_H
-#define __ASM_ARCH_TIMEX_H
-
-#include <mach/hardware.h>
-
-#define CLOCK_TICK_RATE 	KS8695_CLOCK_RATE
-
-#endif
arch/arm/mach-lpc32xx/include/mach/timex.h deleted +0 -28
deleted file mode 100644
index 8d4066b..0000000
@@ -1,28 +0,0 @@
-/*
- * arch/arm/mach-lpc32xx/include/mach/timex.h
- *
- * Author: Kevin Wells <[email protected]>
- *
- * Copyright (C) 2010 NXP Semiconductors
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __ASM_ARCH_TIMEX_H
-#define __ASM_ARCH_TIMEX_H
-
-/*
- * Rate in Hz of the main system oscillator. This value should match
- * the value 'MAIN_OSC_FREQ' in platform.h
- */
-#define CLOCK_TICK_RATE	13000000
-
-#endif
arch/arm/mach-mmp/include/mach/timex.h deleted +0 -13
deleted file mode 100644
index 70c9f1d..0000000
@@ -1,13 +0,0 @@
-/*
- * linux/arch/arm/mach-mmp/include/mach/timex.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifdef CONFIG_CPU_MMP2
-#define CLOCK_TICK_RATE		6500000
-#else
-#define CLOCK_TICK_RATE		3250000
-#endif
arch/arm/mach-msm/include/mach/timex.h deleted +0 -21
deleted file mode 100644
index a62e6b2..0000000
@@ -1,21 +0,0 @@
-/* arch/arm/mach-msm/include/mach/timex.h
- *
- * Copyright (C) 2007 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __ASM_ARCH_MSM_TIMEX_H
-#define __ASM_ARCH_MSM_TIMEX_H
-
-#define CLOCK_TICK_RATE		1000000
-
-#endif
arch/arm/mach-mv78xx0/include/mach/timex.h deleted +0 -9
deleted file mode 100644
index 0e8c443..0000000
@@ -1,9 +0,0 @@
-/*
- * arch/arm/mach-mv78xx0/include/mach/timex.h
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#define CLOCK_TICK_RATE		(100 * HZ)
arch/arm/mach-mxs/include/mach/timex.h deleted +0 -21
deleted file mode 100644
index 734ce89..0000000
@@ -1,21 +0,0 @@
-/*
- *  Copyright (C) 1999 ARM Limited
- * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __MACH_MXS_TIMEX_H__
-#define __MACH_MXS_TIMEX_H__
-
-#define CLOCK_TICK_RATE		32000	/* 32K */
-
-#endif /* __MACH_MXS_TIMEX_H__ */
arch/arm/mach-netx/include/mach/timex.h deleted +0 -20
deleted file mode 100644
index 1120dd0..0000000
@@ -1,20 +0,0 @@
-/*
- * arch/arm/mach-netx/include/mach/timex.h
- *
- * Copyright (C) 2005 Sascha Hauer <[email protected]>, Pengutronix
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#define CLOCK_TICK_RATE 100000000
arch/arm/mach-nomadik/include/mach/timex.h deleted +0 -6
deleted file mode 100644
index 318b889..0000000
@@ -1,6 +0,0 @@
-#ifndef __ASM_ARCH_TIMEX_H
-#define __ASM_ARCH_TIMEX_H
-
-#define CLOCK_TICK_RATE         2400000
-
-#endif
arch/arm/mach-nuc93x/include/mach/timex.h deleted +0 -25
deleted file mode 100644
index 0c719cc..0000000
@@ -1,25 +0,0 @@
-/*
- * arch/arm/mach-nuc93x/include/mach/timex.h
- *
- * Copyright (c) 2008 Nuvoton technology corporation
- * All rights reserved.
- *
- * Wan ZongShun <[email protected]>
- *
- * Based on arch/arm/mach-s3c2410/include/mach/timex.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
-
-#ifndef __ASM_ARCH_TIMEX_H
-#define __ASM_ARCH_TIMEX_H
-
-/* CLOCK_TICK_RATE Now, I don't use it. */
-
-#define CLOCK_TICK_RATE 27000000
-
-#endif /* __ASM_ARCH_TIMEX_H */
arch/arm/mach-omap1/include/mach/timex.h deleted +0 -5
deleted file mode 100644
index 4793790..0000000
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-omap1/include/mach/timex.h
- */
-
-#include <plat/timex.h>
arch/arm/mach-omap2/include/mach/timex.h deleted +0 -5
deleted file mode 100644
index de9f8fc..0000000
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-omap2/include/mach/timex.h
- */
-
-#include <plat/timex.h>
arch/arm/mach-orion5x/include/mach/timex.h deleted +0 -11
deleted file mode 100644
index 4c69820..0000000
@@ -1,11 +0,0 @@
-/*
- * arch/arm/mach-orion5x/include/mach/timex.h
- *
- * Tzachi Perelstein <[email protected]>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2.  This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#define CLOCK_TICK_RATE		(100 * HZ)
arch/arm/mach-pnx4008/include/mach/timex.h deleted +0 -19
deleted file mode 100644
index b383c7d..0000000
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-pnx4008/include/mach/timex.h
- *
- * PNX4008 timers header file
- *
- * Author: Dmitry Chigirev <[email protected]>
- *
- * 2005 (c) MontaVista Software, Inc. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-
-#ifndef __PNX4008_TIMEX_H
-#define __PNX4008_TIMEX_H
-
-#define CLOCK_TICK_RATE		1000000
-
-#endif
arch/arm/mach-prima2/include/mach/timex.h deleted +0 -14
deleted file mode 100644
index d6f98a7..0000000
@@ -1,14 +0,0 @@
-/*
- * arch/arm/mach-prima2/include/mach/timex.h
- *
- * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
- *
- * Licensed under GPLv2 or later.
- */
-
-#ifndef __MACH_TIMEX_H__
-#define __MACH_TIMEX_H__
-
-#define CLOCK_TICK_RATE  1000000
-
-#endif
arch/arm/mach-pxa/include/mach/timex.h deleted +0 -34
deleted file mode 100644
index af6760a..0000000
@@ -1,34 +0,0 @@
-/*
- * arch/arm/mach-pxa/include/mach/timex.h
- *
- * Author:	Nicolas Pitre
- * Created:	Jun 15, 2001
- * Copyright:	MontaVista Software Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-/* Various drivers are still using the constant of CLOCK_TICK_RATE, for
- * those drivers to at least work, the definition is provided here.
- *
- * NOTE: this is no longer accurate when multiple processors and boards
- * are selected, newer drivers should not depend on this any more.  Use
- * either the clocksource/clockevent or get this at run-time by calling
- * get_clock_tick_rate() (as defined in generic.c).
- */
-
-#if defined(CONFIG_PXA25x)
-/* PXA250/210 timer base */
-#define CLOCK_TICK_RATE 3686400
-#elif defined(CONFIG_PXA27x)
-/* PXA27x timer base */
-#ifdef CONFIG_MACH_MAINSTONE
-#define CLOCK_TICK_RATE 3249600
-#else
-#define CLOCK_TICK_RATE 3250000
-#endif
-#else
-#define CLOCK_TICK_RATE 3250000
-#endif
arch/arm/mach-realview/include/mach/timex.h deleted +0 -23
deleted file mode 100644
index 4eeb069..0000000
@@ -1,23 +0,0 @@
-/*
- *  arch/arm/mach-realview/include/mach/timex.h
- *
- *  RealView architecture timex specifications
- *
- *  Copyright (C) 2003 ARM Limited
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#define CLOCK_TICK_RATE		(50000000 / 16)
arch/arm/mach-rpc/include/mach/timex.h deleted +0 -17
deleted file mode 100644
index dd75e73..0000000
@@ -1,17 +0,0 @@
-/*
- *  arch/arm/mach-rpc/include/mach/timex.h
- *
- *  Copyright (C) 1997, 1998 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  RiscPC architecture timex specifications
- */
-
-/*
- * On the RiscPC, the clock ticks at 2MHz.
- */
-#define CLOCK_TICK_RATE		2000000
-
arch/arm/mach-s3c2410/include/mach/timex.h deleted +0 -24
deleted file mode 100644
index fe9ca1f..0000000
@@ -1,24 +0,0 @@
-/* arch/arm/mach-s3c2410/include/mach/timex.h
- *
- * Copyright (c) 2003-2005 Simtec Electronics
- *	Ben Dooks <[email protected]>
- *
- * S3C2410 - time parameters
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_TIMEX_H
-#define __ASM_ARCH_TIMEX_H
-
-/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
- * a variable is useless. It seems as long as we make our timers an
- * exact multiple of HZ, any value that makes a 1->1 correspondence
- * for the time conversion functions to/from jiffies is acceptable.
-*/
-
-#define CLOCK_TICK_RATE 12000000
-
-#endif /* __ASM_ARCH_TIMEX_H */
arch/arm/mach-s3c64xx/include/mach/timex.h deleted +0 -24
deleted file mode 100644
index fb2e8cd..0000000
@@ -1,24 +0,0 @@
-/* arch/arm/mach-s3c64xx/include/mach/timex.h
- *
- * Copyright (c) 2003-2005 Simtec Electronics
- *	Ben Dooks <[email protected]>
- *
- * S3C6400 - time parameters
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_TIMEX_H
-#define __ASM_ARCH_TIMEX_H
-
-/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
- * a variable is useless. It seems as long as we make our timers an
- * exact multiple of HZ, any value that makes a 1->1 correspondence
- * for the time conversion functions to/from jiffies is acceptable.
-*/
-
-#define CLOCK_TICK_RATE 12000000
-
-#endif /* __ASM_ARCH_TIMEX_H */
arch/arm/mach-s5p64x0/include/mach/timex.h deleted +0 -27
deleted file mode 100644
index 4b91faa..0000000
@@ -1,27 +0,0 @@
-/* linux/arch/arm/mach-s5p64x0/include/mach/timex.h
- *
- * Copyright (c) 2010 Samsung Electronics Co., Ltd.
- *		http://www.samsung.com
- *
- * Copyright (c) 2003-2005 Simtec Electronics
- *	Ben Dooks <[email protected]>
- *
- * S5P64X0 - time parameters
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_TIMEX_H
-#define __ASM_ARCH_TIMEX_H
-
-/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
- * a variable is useless. It seems as long as we make our timers an
- * exact multiple of HZ, any value that makes a 1->1 correspondence
- * for the time conversion functions to/from jiffies is acceptable.
-*/
-
-#define CLOCK_TICK_RATE 12000000
-
-#endif /* __ASM_ARCH_TIMEX_H */
arch/arm/mach-s5pc100/include/mach/timex.h deleted +0 -24
deleted file mode 100644
index 47ffb17..0000000
@@ -1,24 +0,0 @@
-/* arch/arm/mach-s5pc100/include/mach/timex.h
- *
- * Copyright (c) 2003-2005 Simtec Electronics
- *	Ben Dooks <[email protected]>
- *
- * S3C6400 - time parameters
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_TIMEX_H
-#define __ASM_ARCH_TIMEX_H
-
-/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
- * a variable is useless. It seems as long as we make our timers an
- * exact multiple of HZ, any value that makes a 1->1 correspondence
- * for the time conversion functions to/from jiffies is acceptable.
-*/
-
-#define CLOCK_TICK_RATE 12000000
-
-#endif /* __ASM_ARCH_TIMEX_H */
arch/arm/mach-s5pv210/include/mach/timex.h deleted +0 -29
deleted file mode 100644
index 73dc854..0000000
@@ -1,29 +0,0 @@
-/* linux/arch/arm/mach-s5pv210/include/mach/timex.h
- *
- * Copyright (c) 2003-2010 Simtec Electronics
- *	Ben Dooks <[email protected]>
- *
- * Copyright (c) 2010 Samsung Electronics Co., Ltd.
- *		http://www.samsung.com/
- *
- * Based on arch/arm/mach-s5p6442/include/mach/timex.h
- *
- * S5PV210 - time parameters
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_TIMEX_H
-#define __ASM_ARCH_TIMEX_H __FILE__
-
-/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
- * a variable is useless. It seems as long as we make our timers an
- * exact multiple of HZ, any value that makes a 1->1 correspondence
- * for the time conversion functions to/from jiffies is acceptable.
-*/
-
-#define CLOCK_TICK_RATE 12000000
-
-#endif /* __ASM_ARCH_TIMEX_H */
arch/arm/mach-sa1100/include/mach/timex.h deleted +0 -12
deleted file mode 100644
index 7a5d017..0000000
@@ -1,12 +0,0 @@
-/*
- * arch/arm/mach-sa1100/include/mach/timex.h
- *
- * SA1100 architecture timex specifications
- *
- * Copyright (C) 1998 
- */
-
-/*
- * SA1100 timer
- */
-#define CLOCK_TICK_RATE		3686400
arch/arm/mach-shark/include/mach/timex.h deleted +0 -7
deleted file mode 100644
index bb6eeae..0000000
@@ -1,7 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/timex.h
- *
- * by Alexander Schulz
- */
-
-#define CLOCK_TICK_RATE 1193180
arch/arm/mach-shmobile/include/mach/timex.h deleted +0 -6
deleted file mode 100644
index ae0d8d8..0000000
@@ -1,6 +0,0 @@
-#ifndef __ASM_MACH_TIMEX_H
-#define __ASM_MACH_TIMEX_H
-
-#define CLOCK_TICK_RATE		1193180 /* unused i8253 PIT value */
-
-#endif /* __ASM_MACH_TIMEX_H */
arch/arm/mach-spear3xx/include/mach/timex.h deleted +0 -19
deleted file mode 100644
index a38cc9d..0000000
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-spear3xx/include/mach/timex.h
- *
- * SPEAr3XX machine family specific timex definitions
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar<[email protected]>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_TIMEX_H
-#define __MACH_TIMEX_H
-
-#include <plat/timex.h>
-
-#endif /* __MACH_TIMEX_H */
arch/arm/mach-spear6xx/include/mach/timex.h deleted +0 -19
deleted file mode 100644
index ac1c5b0..0000000
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-spear6xx/include/mach/timex.h
- *
- * SPEAr6XX machine family specific timex definitions
- *
- * Copyright (C) 2009 ST Microelectronics
- * Rajeev Kumar<[email protected]>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_TIMEX_H
-#define __MACH_TIMEX_H
-
-#include <plat/timex.h>
-
-#endif	/* __MACH_TIMEX_H */
arch/arm/mach-tegra/include/mach/timex.h deleted +0 -26
deleted file mode 100644
index a44ccbd..0000000
@@ -1,26 +0,0 @@
-/*
- * arch/arm/mach-tegra/include/mach/timex.h
- *
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- *	Colin Cross <[email protected]>
- *	Erik Gilling <[email protected]>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __MACH_TEGRA_TIMEX_H
-#define __MACH_TEGRA_TIMEX_H
-
-#define CLOCK_TICK_RATE		1000000
-
-#endif
arch/arm/mach-u300/include/mach/timex.h deleted +0 -17
deleted file mode 100644
index f233b72..0000000
@@ -1,17 +0,0 @@
-/*
- *
- * arch/arm/mach-u300/include/mach/timex.h
- *
- *
- * Copyright (C) 2006-2009 ST-Ericsson AB
- * License terms: GNU General Public License (GPL) version 2
- * Platform tick rate definition.
- * Author: Linus Walleij <[email protected]>
- */
-#ifndef __MACH_TIMEX_H
-#define __MACH_TIMEX_H
-
-/* This is for the APP OS GP1 (General Purpose 1) timer */
-#define CLOCK_TICK_RATE		1000000
-
-#endif
arch/arm/mach-ux500/include/mach/timex.h deleted +0 -6
deleted file mode 100644
index d0942c1..0000000
@@ -1,6 +0,0 @@
-#ifndef __ASM_ARCH_TIMEX_H
-#define __ASM_ARCH_TIMEX_H
-
-#define CLOCK_TICK_RATE		110000000
-
-#endif
arch/arm/mach-versatile/include/mach/timex.h deleted +0 -23
deleted file mode 100644
index 426199b..0000000
@@ -1,23 +0,0 @@
-/*
- *  arch/arm/mach-versatile/include/mach/timex.h
- *
- *  Versatile architecture timex specifications
- *
- *  Copyright (C) 2003 ARM Limited
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#define CLOCK_TICK_RATE		(50000000 / 16)
arch/arm/mach-vexpress/include/mach/timex.h deleted +0 -23
deleted file mode 100644
index 00029ba..0000000
@@ -1,23 +0,0 @@
-/*
- *  arch/arm/mach-vexpress/include/mach/timex.h
- *
- *  RealView architecture timex specifications
- *
- *  Copyright (C) 2003 ARM Limited
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#define CLOCK_TICK_RATE		(50000000 / 16)
arch/arm/mach-vt8500/include/mach/timex.h deleted +0 -26
deleted file mode 100644
index 8487e4c..0000000
@@ -1,26 +0,0 @@
-/*
- *  arch/arm/mach-vt8500/include/mach/timex.h
- *
- *  Copyright (C) 2010 Alexey Charkov <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef MACH_TIMEX_H
-#define MACH_TIMEX_H
-
-#define CLOCK_TICK_RATE		(3000000)
-
-#endif /* MACH_TIMEX_H */
arch/arm/mach-w90x900/include/mach/timex.h deleted +0 -25
deleted file mode 100644
index 164dce0..0000000
@@ -1,25 +0,0 @@
-/*
- * arch/arm/mach-w90x900/include/mach/timex.h
- *
- * Copyright (c) 2008 Nuvoton technology corporation
- * All rights reserved.
- *
- * Wan ZongShun <[email protected]>
- *
- * Based on arch/arm/mach-s3c2410/include/mach/timex.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
-
-#ifndef __ASM_ARCH_TIMEX_H
-#define __ASM_ARCH_TIMEX_H
-
-/* CLOCK_TICK_RATE Now, I don't use it. */
-
-#define CLOCK_TICK_RATE 15000000
-
-#endif /* __ASM_ARCH_TIMEX_H */
arch/arm/mach-zynq/include/mach/timex.h deleted +0 -23
deleted file mode 100644
index 6c0245e..0000000
@@ -1,23 +0,0 @@
-/* arch/arm/mach-zynq/include/mach/timex.h
- *
- *  Copyright (C) 2011 Xilinx
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __MACH_TIMEX_H__
-#define __MACH_TIMEX_H__
-
-/* the following is needed for the system to build but will be removed
-   in the future, the value is not important but won't hurt
-*/
-#define CLOCK_TICK_RATE	(100 * HZ)
-
-#endif
Signature · 1 line
1.7.4.1
#18 lore raw

PATCH 12/12 ARM: Remove mach-*/include/mach/timex.h

Quoted 10 lines · Deepak Saxena

We no longer use the global LATCH definition to drive any platform-specific timers so we can remove the timex.h files from all sub-arch include directories.

We still need to keep an ARM CLOCK_TICK_RATE due to jiffies.h depending on it to build but that will be removed in the future once all non-ARM references to LATCH are also removed.

This confusing define has bitten me in the past so I'm very happy to get rid of it. So for ux500, u300 and nomadik:

Thanks,
Linus Walleij

#19 lore raw

PATCH 12/12 ARM: Remove mach-*/include/mach/timex.h

In reply to Deepak Saxena
Quoted 12 lines · Deepak Saxena

We no longer use the global LATCH definition to drive any platform-specific timers so we can remove the timex.h files from all sub-arch include directories.

We still need to keep an ARM CLOCK_TICK_RATE due to jiffies.h depending on it to build but that will be removed in the future once all non-ARM references to LATCH are also removed.

---

[snip]

Quoted 16 lines
arch/arm/include/asm/timex.h +4 -1
index 3be8de3..c4f4dac 100644
@@ -12,7 +12,10 @@
 #ifndef _ASMARM_TIMEX_H
 #define _ASMARM_TIMEX_H
 
-#include <mach/timex.h>
+/* 
+ * Bogus value used to allow kernel to build
+ */
+#define	CLOCK_TICK_RATE	1000000
 
 typedef unsigned long cycles_t;
 

[snip]

arch/arm/mach-ep93xx/include/mach/timex.h line 5

Quoted 11 lines
arch/arm/mach-ep93xx/include/mach/timex.h deleted +0 -5
deleted file mode 100644
index 6b3503b..0000000
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-ep93xx/include/mach/timex.h
- */
-
-#define CLOCK_TICK_RATE		983040

Confused...

mach-ep93xx/core.c uses the CLOCK_TICK_RATE to determine TIMER4_TICKS_PER_JIFFY. Timer 4 runs at 983.04 kHz, this patch changes this rate to 1 MHz. Won't that effect the sys_timer?

Regards,
Hartley

#20 lore raw

PATCH 12/12 ARM: Remove mach-*/include/mach/timex.h

Quoted 49 lines · H Hartley Sweeten
Quoted 12 lines · Deepak Saxena

We no longer use the global LATCH definition to drive any platform-specific timers so we can remove the timex.h files from all sub-arch include directories.

We still need to keep an ARM CLOCK_TICK_RATE due to jiffies.h depending on it to build but that will be removed in the future once all non-ARM references to LATCH are also removed.

---

[snip]

Quoted 16 lines
arch/arm/include/asm/timex.h +4 -1
index 3be8de3..c4f4dac 100644
@@ -12,7 +12,10 @@
 #ifndef _ASMARM_TIMEX_H
 #define _ASMARM_TIMEX_H
 
-#include <mach/timex.h>
+/* 
+ * Bogus value used to allow kernel to build
+ */
+#define	CLOCK_TICK_RATE	1000000
 
 typedef unsigned long cycles_t;
 

[snip]

arch/arm/mach-ep93xx/include/mach/timex.h line 5

Quoted 11 lines
arch/arm/mach-ep93xx/include/mach/timex.h deleted +0 -5
deleted file mode 100644
index 6b3503b..0000000
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-ep93xx/include/mach/timex.h
- */
-
-#define CLOCK_TICK_RATE		983040

Confused...

Quoted 3 lines

mach-ep93xx/core.c uses the CLOCK_TICK_RATE to determine TIMER4_TICKS_PER_JIFFY. Timer 4 runs at 983.04 kHz, this patch changes this rate to 1 MHz. Won't that effect the sys_timer?

BTW, it looks like Lennert's patch correctly handled this.

http://lists.infradead.org/pipermail/linux-arm-kernel/2010-October/029452.html

Here's the relevant piece.

arch/arm/mach-ep93xx/core.c +2 -1
index 4cb55d3..3d6d015 100644
@@ -111,7 +111,8 @@ void __init ep93xx_map_io(void)
 #define EP93XX_TIMER4_CLOCK		983040
 
 #define TIMER1_RELOAD			((EP93XX_TIMER123_CLOCK / HZ) - 1)
-#define TIMER4_TICKS_PER_JIFFY		DIV_ROUND_CLOSEST(CLOCK_TICK_RATE, HZ)
+#define TIMER4_TICKS_PER_JIFFY		\
+		DIV_ROUND_CLOSEST(EP93XX_TIMER4_CLOCK, HZ)
 
 static unsigned int last_jiffy_time;
 

Regards,
Hartley