svn commit: r237115 - head/sys/arm/at91
Warner Losh
imp at FreeBSD.org
Fri Jun 15 06:38:56 UTC 2012
Author: imp
Date: Fri Jun 15 06:38:55 2012
New Revision: 237115
URL: http://svn.freebsd.org/changeset/base/237115
Log:
Take half a step closer towards having a unified atmel kernel by
rearranging where we initialize the time counter and putting the
common stubs into a central place.
Modified:
head/sys/arm/at91/at91_machdep.c
head/sys/arm/at91/at91_pit.c
head/sys/arm/at91/at91_st.c
Modified: head/sys/arm/at91/at91_machdep.c
==============================================================================
--- head/sys/arm/at91/at91_machdep.c Fri Jun 15 06:14:29 2012 (r237114)
+++ head/sys/arm/at91/at91_machdep.c Fri Jun 15 06:38:55 2012 (r237115)
@@ -572,3 +572,24 @@ initarm(struct arm_boot_params *abp)
return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
sizeof(struct pcb)));
}
+
+/*
+ * These functions are handled elsewhere, so make them nops here.
+ */
+void
+cpu_startprofclock(void)
+{
+
+}
+
+void
+cpu_stopprofclock(void)
+{
+
+}
+
+void
+cpu_initclocks(void)
+{
+
+}
Modified: head/sys/arm/at91/at91_pit.c
==============================================================================
--- head/sys/arm/at91/at91_pit.c Fri Jun 15 06:14:29 2012 (r237114)
+++ head/sys/arm/at91/at91_pit.c Fri Jun 15 06:38:55 2012 (r237115)
@@ -206,24 +206,3 @@ DELAY(int us)
last = piv;
}
}
-
-/*
- * The 3 next functions must be implement with the future PLL code.
- */
-void
-cpu_startprofclock(void)
-{
-
-}
-
-void
-cpu_stopprofclock(void)
-{
-
-}
-
-void
-cpu_initclocks(void)
-{
-
-}
Modified: head/sys/arm/at91/at91_st.c
==============================================================================
--- head/sys/arm/at91/at91_st.c Fri Jun 15 06:14:29 2012 (r237114)
+++ head/sys/arm/at91/at91_st.c Fri Jun 15 06:38:55 2012 (r237115)
@@ -60,6 +60,7 @@ static struct at91st_softc {
bus_space_write_4(timer_softc->sc_st, timer_softc->sc_sh, (off), (val))
static void at91st_watchdog(void *, u_int, int *);
+static void at91st_initclocks(struct at91st_softc *);
static inline int
st_crtr(void)
@@ -114,8 +115,11 @@ at91st_attach(device_t dev)
timer_softc->sc_wet = EVENTHANDLER_REGISTER(watchdog_list,
at91st_watchdog, dev, 0);
+
device_printf(dev,
"watchdog registered, timeout intervall max. 64 sec\n");
+
+ at91st_initclocks(timer_softc);
return (0);
}
@@ -183,14 +187,14 @@ clock_intr(void *arg)
return (FILTER_STRAY);
}
-void
-cpu_initclocks(void)
+static void
+at91st_initclocks(struct at91st_softc *sc)
{
int rel_value;
struct resource *irq;
int rid = 0;
void *ih;
- device_t dev = timer_softc->sc_dev;
+ device_t dev = sc->sc_dev;
rel_value = 32768 / hz;
if (rel_value < 1)
@@ -251,13 +255,3 @@ cpu_reset(void)
while (1)
continue;
}
-
-void
-cpu_startprofclock(void)
-{
-}
-
-void
-cpu_stopprofclock(void)
-{
-}
More information about the svn-src-head
mailing list