Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/omap MPU_* registers are not valid for OMAP3, s...
details: https://anonhg.NetBSD.org/src/rev/e70a27bdf82b
branches: trunk
changeset: 784046:e70a27bdf82b
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Jan 16 03:30:48 2013 +0000
description:
MPU_* registers are not valid for OMAP3, so restrict access to them to
OMAP2 boards.
diffstat:
sys/arch/arm/omap/obio_mputmr.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (58 lines):
diff -r 770b8f1237d3 -r e70a27bdf82b sys/arch/arm/omap/obio_mputmr.c
--- a/sys/arch/arm/omap/obio_mputmr.c Wed Jan 16 00:09:27 2013 +0000
+++ b/sys/arch/arm/omap/obio_mputmr.c Wed Jan 16 03:30:48 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: obio_mputmr.c,v 1.6 2012/08/23 01:27:24 matt Exp $ */
+/* $NetBSD: obio_mputmr.c,v 1.7 2013/01/16 03:30:48 jmcneill Exp $ */
/*
* Based on omap_mputmr.c
@@ -101,7 +101,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio_mputmr.c,v 1.6 2012/08/23 01:27:24 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio_mputmr.c,v 1.7 2013/01/16 03:30:48 jmcneill Exp $");
#include "opt_omap.h"
#include "opt_cpuoptions.h"
@@ -121,8 +121,10 @@
#include <arm/omap/omap2_obiovar.h>
#include <arm/omap/omap2_mputmrvar.h>
+
+#if defined(OMAP_2430) || defined(OMAP_2420)
#include <arm/omap/omap2_mputmrreg.h>
-
+#endif
#include <arm/omap/omap2_reg.h>
@@ -233,9 +235,11 @@
aprint_normal("\n");
aprint_naive("\n");
+#if defined(OMAP_2430) || defined(OMAP_2420)
/* Stop the timer from counting, but keep the timer module working. */
bus_space_write_4(sc->sc_iot, sc->sc_ioh, MPU_CNTL_TIMER,
MPU_CLOCK_ENABLE);
+#endif
timer_factors tf;
calc_timer_factors(ints_per_sec, &tf);
@@ -261,6 +265,7 @@
break;
}
+#if defined(OMAP_2430) || defined(OMAP_2420)
/* Set the reload value. */
bus_space_write_4(sc->sc_iot, sc->sc_ioh, MPU_LOAD_TIMER, tf.reload);
/* Set the PTV and the other required bits and pieces. */
@@ -270,6 +275,7 @@
| MPU_AR
| MPU_ST));
/* The clock is now running, but is not generating interrupts. */
+#endif
}
static const gptimer_instance_t *
Home |
Main Index |
Thread Index |
Old Index