From nobody Mon May 16 15:33:37 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A90E91AE6619; Mon, 16 May 2022 15:33:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L23Dy1JM2z3rPb; Mon, 16 May 2022 15:33:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652715218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IYQQyoYjFyXXztYUXkRrZQTHNzelsdYbNA8iLfbFrJ4=; b=uIqg+aKNvg5SPgswLNabt3sPghTSaYWpq8vKeJU2u+OGUKx8/D4uAJ88V4+WmVMTHfklSg A7W9ADrKQHVXUD56tlVJAepiVeyUUAwUpm4M10JAA1cnwtDSu4JQ3TbAgYWVfawhthEvI9 n/dnhwWgZgiCrEUKZeWRCRZK6owVjp+QB9etl0n4VQFP/Hd0juGrNsmUGPq79J789Pqpi/ IeVG3VGvRve/fe3bgcGpSCKz8PJsg0mxCD/8dYwJ6Jy9jaGSr0aDaae1RZjm0rUU5ss1+O IvVQMhO2ZB+VQe6/gx89bTZ0ft8ZhNg4qpKipeNFe9KareTYALLRjt7frQUTng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8606B22CA8; Mon, 16 May 2022 15:33:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24GFXbCa020225; Mon, 16 May 2022 15:33:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24GFXb78020224; Mon, 16 May 2022 15:33:37 GMT (envelope-from git) Date: Mon, 16 May 2022 15:33:37 GMT Message-Id: <202205161533.24GFXb78020224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 9818559bb65a - stable/13 - arm: rockchip: rk3288: Use the macros that already exists in rk_cru.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9818559bb65abdffea298966b4362b9414a4184c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652715218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IYQQyoYjFyXXztYUXkRrZQTHNzelsdYbNA8iLfbFrJ4=; b=dEYiwvWHykj5KMgIS7A0IIyEq/jgqKJBiwU39f78ezBA9EKIa0tWtQcJhFH7deLZhCscHO 5eyEVCBZhFu7z1t1HUIAV8n6pNolePV5DiohHxwVO8jK02Cb9tDazacACVwpR57DjnL4pp l0iVm1yWKfUVHr+Akp1BZp47PpofcX5CGWXbgTsNAs9BbffobtWQDgzS74teM4FObb6h7i lhdUl4LIcB90ar7b1p/nuM0AvugKe4V51afStcUFgKWK1RmkPAYPnesBd2IjKJzPHXW0xa LNFqGH6z6HzzCkv8KZK67jvqfA6qbCEFZjQ66CW/Qc6o3cn5FKyyDt7W8suQSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652715218; a=rsa-sha256; cv=none; b=KJV3EL8R63n74XjzbMdQ2JaO4W/oabSlcCk8EFxvzItHhNWc+Gjjw9gkv9szD+Ltu1NGpk ZdV9kcIUDuIgDCXl47ZFaBnyhDnLG+L6EPO+0XCwRwqy/Gu8lgh+ozA5VKLCYUTSDLL6r6 OriAF6BJNwtR5oaWG6DvNyoutoQfkMXnUlld9SAIZzdxnT8e2Ybo8hRGP7ixslfFsp4k83 0uGrn/ubiKgkuk5NyGa8b0zHblk7uZX0+jL6moLmeXXIyUB+8HVcCCzKF3jNVWn4OosRGe QWXDXPmQ2NW3O2EOCc1GwhQln560csJM1VH1+tcDqb1S99tssNM1wakGmY3tYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=9818559bb65abdffea298966b4362b9414a4184c commit 9818559bb65abdffea298966b4362b9414a4184c Author: Emmanuel Vadot AuthorDate: 2021-09-15 18:10:42 +0000 Commit: Emmanuel Vadot CommitDate: 2022-05-16 15:27:24 +0000 arm: rockchip: rk3288: Use the macros that already exists in rk_cru.h (cherry picked from commit 78bf40e10c5a1504ba364abc068893de431263d4) --- sys/arm64/rockchip/clk/rk3288_cru.c | 103 +----------------------------------- 1 file changed, 2 insertions(+), 101 deletions(-) diff --git a/sys/arm64/rockchip/clk/rk3288_cru.c b/sys/arm64/rockchip/clk/rk3288_cru.c index 6a8c63137df7..3f4a59864545 100644 --- a/sys/arm64/rockchip/clk/rk3288_cru.c +++ b/sys/arm64/rockchip/clk/rk3288_cru.c @@ -491,36 +491,6 @@ static struct rk_clk_armclk_rates rk3288_armclk_rates[] = { { 126000000, 1}, }; - -/* Fixed rate clock. */ -#define FRATE(_id, _name, _freq) \ -{ \ - .type = RK_CLK_FIXED, \ - .clk.fixed = &(struct clk_fixed_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = NULL, \ - .clkdef.parent_cnt = 0, \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .freq = _freq, \ - }, \ -} - -/* Fixed rate multipier/divider. */ -#define FACT(_id, _name, _pname, _mult, _div) \ -{ \ - .type = RK_CLK_FIXED, \ - .clk.fixed = &(struct clk_fixed_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = (const char *[]){_pname}, \ - .clkdef.parent_cnt = 1, \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .mult = _mult, \ - .div = _div, \ - }, \ -} - /* Standard PLL. */ #define PLL(_id, _name, _base, _shift) \ { \ @@ -538,23 +508,6 @@ static struct rk_clk_armclk_rates rk3288_armclk_rates[] = { }, \ } -/* Multiplexer. */ -#define MUX(_id, _name, _pn, _f, _mo, _ms, _mw) \ -{ \ - .type = RK_CLK_MUX, \ - .clk.mux = &(struct rk_clk_mux_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = _pn, \ - .clkdef.parent_cnt = nitems(_pn), \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .offset = CRU_CLKSEL_CON(_mo), \ - .shift = _ms, \ - .width = _mw, \ - .mux_flags = _f, \ - }, \ -} - #define ARMDIV(_id, _name, _pn, _r, _o, _ds, _dw, _ms, _mw, _mp, _ap) \ { \ .type = RK_CLK_ARMCLK, \ @@ -576,58 +529,6 @@ static struct rk_clk_armclk_rates rk3288_armclk_rates[] = { }, \ } -/* Fixed rate multipier/divider. */ -#define FRACT(_id, _name, _pname, _f, _o) \ -{ \ - .type = RK_CLK_FRACT, \ - .clk.fract = &(struct rk_clk_fract_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = (const char *[]){_pname}, \ - .clkdef.parent_cnt = 1, \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .offset = CRU_CLKSEL_CON(_o), \ - .flags = _f, \ - }, \ -} - -/* Full composite clock. */ -#define COMP(_id, _name, _pnames, _f, _o, _ds, _dw, _ms, _mw) \ -{ \ - .type = RK_CLK_COMPOSITE, \ - .clk.composite = &(struct rk_clk_composite_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = _pnames, \ - .clkdef.parent_cnt = nitems(_pnames), \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .muxdiv_offset = CRU_CLKSEL_CON(_o), \ - .mux_shift = _ms, \ - .mux_width = _mw, \ - .div_shift = _ds, \ - .div_width = _dw, \ - .flags = RK_CLK_COMPOSITE_HAVE_MUX | _f, \ - }, \ -} - -/* Composite clock without mux (divider olnly). */ -#define CDIV(_id, _name, _pname, _f, _o, _ds, _dw) \ -{ \ - .type = RK_CLK_COMPOSITE, \ - .clk.composite = &(struct rk_clk_composite_def) { \ - .clkdef.id = _id, \ - .clkdef.name = _name, \ - .clkdef.parent_names = (const char *[]){_pname}, \ - .clkdef.parent_cnt = 1, \ - .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ - .muxdiv_offset = CRU_CLKSEL_CON(_o), \ - .div_shift = _ds, \ - .div_width = _dw, \ - .flags = _f, \ - }, \ -} - - #define PLIST(_name) static const char *_name[] PLIST(pll_src_p) = {"xin24m", "xin24m", "xin32k"}; PLIST(armclk_p)= {"apll_core", "gpll_core"}; @@ -680,8 +581,8 @@ static struct rk_clk rk3288_clks[] = { FRATE(0, "aclk_vcodec_pre", 0), /* Fixed dividers */ - FACT(0, "xin12m", "xin24m", 1, 2), - FACT(0, "hclk_vcodec_pre_s", "aclk_vcodec_pre", 1, 4), + FFACT(0, "xin12m", "xin24m", 1, 2), + FFACT(0, "hclk_vcodec_pre_s", "aclk_vcodec_pre", 1, 4), PLL(PLL_APLL, "apll", CRU_APLL_CON(0), 0), PLL(PLL_DPLL, "dpll", CRU_DPLL_CON(0), 4),