From owner-svn-src-head@freebsd.org Sun Mar 19 04:03:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67979D13405; Sun, 19 Mar 2017 04:03:41 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C3A3920; Sun, 19 Mar 2017 04:03:41 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2J43e9n010190; Sun, 19 Mar 2017 04:03:40 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2J43e1O010189; Sun, 19 Mar 2017 04:03:40 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201703190403.v2J43e1O010189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 19 Mar 2017 04:03:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315530 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Sun, 19 Mar 2017 04:03:41 -0000 Author: ian Date: Sun Mar 19 04:03:39 2017 New Revision: 315530 URL: https://svnweb.freebsd.org/changeset/base/315530 Log: Remove unreferenced global function imx_gpt_get_timerfreq() and do some cleanups enabled by that: - The only thing left in imx_gptvar.h was the softc, which IMO never should have been in there at all. Move it into the driver, and delete the header file. - Remove several unneeded #includes from the driver. - Change imx_gpt_softc from global to static (it's used by DELAY()), and don't redundantly static-initialize it to NULL. Deleted: head/sys/arm/freescale/imx/imx_gptvar.h Modified: head/sys/arm/freescale/imx/imx_gpt.c Modified: head/sys/arm/freescale/imx/imx_gpt.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpt.c Sun Mar 19 03:06:09 2017 (r315529) +++ head/sys/arm/freescale/imx/imx_gpt.c Sun Mar 19 04:03:39 2017 (r315530) @@ -35,24 +35,18 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include -#include #include -#include #include #include #include #include -#include -#include - -#include #include +#include #define WRITE4(_sc, _r, _v) \ bus_space_write_4((_sc)->sc_iot, (_sc)->sc_ioh, (_r), (_v)) @@ -80,8 +74,20 @@ static struct timecounter imx_gpt_timeco .tc_quality = 1000, }; +struct imx_gpt_softc { + device_t sc_dev; + struct resource * res[2]; + bus_space_tag_t sc_iot; + bus_space_handle_t sc_ioh; + void * sc_ih; /* interrupt handler */ + uint32_t sc_period; + uint32_t sc_clksrc; + uint32_t clkfreq; + struct eventtimer et; +}; + /* Global softc pointer for use in DELAY(). */ -struct imx_gpt_softc *imx_gpt_sc = NULL; +static struct imx_gpt_softc *imx_gpt_sc; /* * Hand-calibrated delay-loop counter. This was calibrated on an i.MX6 running @@ -106,7 +112,7 @@ static struct resource_spec imx_gpt_spec }; static struct ofw_compat_data compat_data[] = { - {"fsl,imx6dl-gpt", 1}, + {"fsl,imx6dl-gpt", 1}, {"fsl,imx6q-gpt", 1}, {"fsl,imx53-gpt", 1}, {"fsl,imx51-gpt", 1}, @@ -311,13 +317,6 @@ imx_gpt_timer_stop(struct eventtimer *et return (0); } -int -imx_gpt_get_timerfreq(struct imx_gpt_softc *sc) -{ - - return (sc->clkfreq); -} - static int imx_gpt_intr(void *arg) {