Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4712421yba; Mon, 20 May 2019 02:22:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxNPKW2T2Zhl/FHLf+djDbaO2Zzc9244ubVYmcI+ocgoJGECExJO47AbDL9wqztiZU36NaS X-Received: by 2002:a63:e451:: with SMTP id i17mr74684179pgk.312.1558344141640; Mon, 20 May 2019 02:22:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558344141; cv=none; d=google.com; s=arc-20160816; b=txTAy1FNrIKDHJ+Atfi/CgP8vTvGHlUwoo2E/QdQqwPMoe/BvB+IoCSvh4BIjOXHRW /Jdyyd7AyF53UdewP8Rs6qF75uBLiWc1uonDxAmejSWfj8l/729jvzSgnr7r/CMVVj5C +NIL/OHj4lMLUegY4R9lcFLyeWyqx0XhHUQuwZXDSYqFCWvJuD+DtI05GW6ijVBNke+b t9eGsMLoNne4tk5x2UwgSCcGNGEO2lARwtxHRlJpV6nKg3yBalnf1yUjnDXSEhw1jCch MizBJJ1pZ8eiUBv2r2VItnKzXSIa/gVDyje78XjNaBlMQfs/arGp+ea1iyXnZ0MlYuFh +8JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Y5xL4A+Snd0jwjG3/dmWUzZnqUZQtPOnQ219MvJ7GtM=; b=n4iAhYgwY53bbZ7+lQHfLlJ2lkMWSX5DNA+SHNr9l2qTGvVeE0QxH3s3gIq0IJ0F+L GXwaG9twEGyogaIL7Iquy0LlPPciNc4iWYLN2pG4X/gaqjcdaykZ7IODnUYC0w2bTpPp 8y54lrOUwHySXQZbEYdZdO0PwPjrdRbyqI6aoRGCEhYDQ058+R6dbv510kdDRpjESUow r2bZte2+hcd7QUXM2ORbuXnwlTAX5s0rOCxKowDOs0vIrbFZCJR+ukWiFreZ38VwewxI JxzUx12Zn8Q0jCjwsb6vV49B82Wc7J7MyTj2pm6G8j6sHnqoRecNciGosE3aEWbQMV9W PMMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rBdsxMY8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q88si19824687pfa.250.2019.05.20.02.22.06; Mon, 20 May 2019 02:22:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rBdsxMY8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731174AbfETIGf (ORCPT + 99 others); Mon, 20 May 2019 04:06:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:36820 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730916AbfETIFj (ORCPT ); Mon, 20 May 2019 04:05:39 -0400 Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4FA8821530; Mon, 20 May 2019 08:05:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558339539; bh=2htx2UolyCeadnnxkFkXPr82L02MSZy7JTkEQdSL7Jo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rBdsxMY8+h/r794raJBb1iqyhhMljyBV/DMBFoOoLUYK0P3QpmY4qKdnilgpDsEBr 9620N4LqNRZTz2YRkHFWXS2LouFFEIcuMDqF963i+FqAKN9TmGt92sH3Ky3qkRvKav HxIk3+NuFKfpcTr19q2mTxoyhQn6PyyTYYbNHNGI= Received: by wens.tw (Postfix, from userid 1000) id B3B8A6583F; Mon, 20 May 2019 16:05:32 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , Stephen Boyd , Michael Turquette Cc: Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 18/25] clk: sunxi-ng: sun8i-r: Use local parent references for CLK_FIXED_FACTOR Date: Mon, 20 May 2019 16:04:14 +0800 Message-Id: <20190520080421.12575-19-wens@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190520080421.12575-1-wens@kernel.org> References: <20190520080421.12575-1-wens@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen-Yu Tsai With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME} macros, we can reference parents locally via pointers to struct clk_hw or DT clock-names. Convert existing CLK_FIXED_FACTOR definitions to either the _HW or _FW_NAME variant based on whether the parent clock is internal or external to the CCU. Signed-off-by: Chen-Yu Tsai --- drivers/clk/sunxi-ng/ccu-sun8i-r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-r.c b/drivers/clk/sunxi-ng/ccu-sun8i-r.c index a43e8de873d7..4a111c28b8c3 100644 --- a/drivers/clk/sunxi-ng/ccu-sun8i-r.c +++ b/drivers/clk/sunxi-ng/ccu-sun8i-r.c @@ -57,7 +57,7 @@ static struct ccu_div ar100_clk = { }, }; -static CLK_FIXED_FACTOR(ahb0_clk, "ahb0", "ar100", 1, 1, 0); +static CLK_FIXED_FACTOR_HW(ahb0_clk, "ahb0", &ar100_clk.common.hw, 1, 1, 0); static struct ccu_div apb0_clk = { .div = _SUNXI_CCU_DIV_FLAGS(0, 2, CLK_DIVIDER_POWER_OF_TWO), -- 2.20.1