summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/clocksource.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-09-26 11:35:11 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-04 15:21:04 +0200
commite3e2ebb3ad55fd52e52028332cc72fd92c2214c7 (patch)
tree7fe60fb1fa541e2274abdbdfa94f458fe71a7ddb /arch/arm/mach-imx/clocksource.c
parent638e059aba994dc8a77f81ad5e826f1706aecc00 (diff)
downloadbarebox-e3e2ebb3ad55fd52e52028332cc72fd92c2214c7.tar.gz
barebox-e3e2ebb3ad55fd52e52028332cc72fd92c2214c7.tar.xz
ARM i.MX clocksource: fix timer source selection
- The i.MX1 timer does not have IPG clock as source, so rename the define accordingly - for the i.MX31 timer we want to use the per clock, not the ipg clock. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/clocksource.c')
-rw-r--r--arch/arm/mach-imx/clocksource.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c
index 2c6f6a08e6..6314f9fc20 100644
--- a/arch/arm/mach-imx/clocksource.c
+++ b/arch/arm/mach-imx/clocksource.c
@@ -42,8 +42,9 @@
#define TCTL_SWR (1 << 15) /* Software reset */
#define IMX1_TCTL_FRR (1 << 8) /* Freerun / restart */
#define IMX31_TCTL_FRR (1 << 9) /* Freerun / restart */
-#define IMX1_TCTL_CLKSOURCE_IPG (1 << 1) /* Clock source bit position */
+#define IMX1_TCTL_CLKSOURCE_PER (1 << 1) /* Clock source bit position */
#define IMX31_TCTL_CLKSOURCE_IPG (1 << 6) /* Clock source bit position */
+#define IMX31_TCTL_CLKSOURCE_PER (2 << 6) /* Clock source bit position */
#define TCTL_TEN (1 << 0) /* Timer enable */
struct imx_gpt_regs {
@@ -53,12 +54,12 @@ struct imx_gpt_regs {
static struct imx_gpt_regs regs_imx1 = {
.tcn = 0x10,
- .tctl_val = IMX1_TCTL_FRR | IMX1_TCTL_CLKSOURCE_IPG | TCTL_TEN,
+ .tctl_val = IMX1_TCTL_FRR | IMX1_TCTL_CLKSOURCE_PER | TCTL_TEN,
};
static struct imx_gpt_regs regs_imx31 = {
.tcn = 0x24,
- .tctl_val = IMX31_TCTL_FRR | IMX31_TCTL_CLKSOURCE_IPG | TCTL_TEN,
+ .tctl_val = IMX31_TCTL_FRR | IMX31_TCTL_CLKSOURCE_PER | TCTL_TEN,
};
static struct imx_gpt_regs *regs;