From: Peng Fan Date: Tue, 30 Jul 2019 07:53:11 +0000 Subject: [U-Boot] [PATCH V2 15/16] test: dm: clk_ccf: test composite clk In-Reply-To: <20190730080758.8484-1-peng.fan@nxp.com> References: <20190730080758.8484-1-peng.fan@nxp.com> Message-ID: <20190730080758.8484-15-peng.fan@nxp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Test composite clk with dm ccf Signed-off-by: Peng Fan --- V2: Rebase to master test/dm/clk_ccf.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/dm/clk_ccf.c b/test/dm/clk_ccf.c index 8d397593a3..bbc4b500e8 100644 --- a/test/dm/clk_ccf.c +++ b/test/dm/clk_ccf.c @@ -56,6 +56,14 @@ static int dm_test_clk_ccf(struct unit_test_state *uts) pclk = clk_get_parent(clk); ut_asserteq_str("pll3_80m", pclk->dev->name); + /* Test the composite of CCF */ + ret = clk_get_by_id(SANDBOX_CLK_I2C, &clk); + ut_assertok(ret); + ut_asserteq_str("i2c", clk->dev->name); + + rate = clk_get_rate(clk); + ut_asserteq(rate, 60000000); + return 1; } -- 2.16.4