From owner-svn-src-head@freebsd.org Wed Jun 14 04:16:38 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 77D83C79762; Wed, 14 Jun 2017 04:16:38 +0000 (UTC) (envelope-from jhibbits@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 46BF4789EA; Wed, 14 Jun 2017 04:16:38 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5E4Gb3C065902; Wed, 14 Jun 2017 04:16:37 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5E4GbT1065901; Wed, 14 Jun 2017 04:16:37 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201706140416.v5E4GbT1065901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 14 Jun 2017 04:16:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319935 - head/sys/powerpc/mpc85xx 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: Wed, 14 Jun 2017 04:16:38 -0000 Author: jhibbits Date: Wed Jun 14 04:16:37 2017 New Revision: 319935 URL: https://svnweb.freebsd.org/changeset/base/319935 Log: Use mpc85xx_get_platform_clock() instead of rolling our own. Now that we have a single source for the platform clock, we don't need to roll our own in every user. Modified: head/sys/powerpc/mpc85xx/fsl_diu.c Modified: head/sys/powerpc/mpc85xx/fsl_diu.c ============================================================================== --- head/sys/powerpc/mpc85xx/fsl_diu.c Wed Jun 14 03:55:11 2017 (r319934) +++ head/sys/powerpc/mpc85xx/fsl_diu.c Wed Jun 14 04:16:37 2017 (r319935) @@ -225,11 +225,9 @@ diu_set_pxclk(device_t dev, unsigned int freq) unsigned long bus_freq; uint32_t pxclk_set; uint32_t clkdvd; - int res; node = ofw_bus_get_node(device_get_parent(dev)); - if ((res = OF_getencprop(node, "bus-frequency", - (pcell_t *)&bus_freq, sizeof(bus_freq)) <= 0)) { + if ((bus_freq = mpc85xx_get_platform_clock()) <= 0) { device_printf(dev, "Unable to get bus frequency\n"); return (ENXIO); }