From owner-svn-src-head@FreeBSD.ORG Fri Jun 15 06:38:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BF72106566C; Fri, 15 Jun 2012 06:38:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 574478FC08; Fri, 15 Jun 2012 06:38:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5F6cuXD048493; Fri, 15 Jun 2012 06:38:56 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5F6cuDd048489; Fri, 15 Jun 2012 06:38:56 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201206150638.q5F6cuDd048489@svn.freebsd.org> From: Warner Losh Date: Fri, 15 Jun 2012 06:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237115 - head/sys/arm/at91 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jun 2012 06:38:56 -0000 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) -{ -}