Module Name: src Committed By: jmcneill Date: Wed Jan 16 03:30:48 UTC 2013
Modified Files: src/sys/arch/arm/omap: obio_mputmr.c Log Message: MPU_* registers are not valid for OMAP3, so restrict access to them to OMAP2 boards. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/omap/obio_mputmr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/omap/obio_mputmr.c diff -u src/sys/arch/arm/omap/obio_mputmr.c:1.6 src/sys/arch/arm/omap/obio_mputmr.c:1.7 --- src/sys/arch/arm/omap/obio_mputmr.c:1.6 Thu Aug 23 01:27:24 2012 +++ src/sys/arch/arm/omap/obio_mputmr.c Wed Jan 16 03:30:48 2013 @@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: obio_mputmr. #include <arm/omap/omap2_obiovar.h> #include <arm/omap/omap2_mputmrvar.h> -#include <arm/omap/omap2_mputmrreg.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 @@ obiomputmr_attach(device_t parent, devic 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 @@ obiomputmr_attach(device_t parent, devic 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 @@ obiomputmr_attach(device_t parent, devic | MPU_AR | MPU_ST)); /* The clock is now running, but is not generating interrupts. */ +#endif } static const gptimer_instance_t *