From owner-svn-src-head@freebsd.org Thu Jun 14 05:46:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88F041001D3E; Thu, 14 Jun 2018 05:46:58 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39A2674790; Thu, 14 Jun 2018 05:46:58 +0000 (UTC) (envelope-from manu@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B95E24405; Thu, 14 Jun 2018 05:46:58 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5E5kvfY036711; Thu, 14 Jun 2018 05:46:57 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5E5kvDY036710; Thu, 14 Jun 2018 05:46:57 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201806140546.w5E5kvDY036710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 14 Jun 2018 05:46:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335109 - head/sys/arm64/rockchip/clk X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm64/rockchip/clk X-SVN-Commit-Revision: 335109 X-SVN-Commit-Repository: base 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.26 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: Thu, 14 Jun 2018 05:46:58 -0000 Author: manu Date: Thu Jun 14 05:46:57 2018 New Revision: 335109 URL: https://svnweb.freebsd.org/changeset/base/335109 Log: rk_armclk: Add the write mask to the register mux value This was omitted in r334112 and r334996 which cause the PLL to not correctly reparent, leaving the armclk to be derived from the APLL instead of the NPLL. The arm core clock is now correctly set to 600Mhz via the assigned-clock present in the DTB. Modified: head/sys/arm64/rockchip/clk/rk_clk_armclk.c Modified: head/sys/arm64/rockchip/clk/rk_clk_armclk.c ============================================================================== --- head/sys/arm64/rockchip/clk/rk_clk_armclk.c Thu Jun 14 05:43:45 2018 (r335108) +++ head/sys/arm64/rockchip/clk/rk_clk_armclk.c Thu Jun 14 05:46:57 2018 (r335109) @@ -105,7 +105,7 @@ rk_clk_armclk_set_mux(struct clknode *clk, int index) DEVICE_LOCK(clk); READ4(clk, sc->muxdiv_offset, &val); val &= ~(sc->mux_mask >> sc->mux_shift); - val |= index << sc->mux_shift; + val |= index << sc->mux_shift | RK_ARMCLK_WRITE_MASK; WRITE4(clk, sc->muxdiv_offset, val); DEVICE_UNLOCK(clk);