Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4235162ybi; Tue, 11 Jun 2019 03:18:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxiIkIkURPhIVN+zVtz4H3hgyQmU2gq/G4wLpdLyCcusgZmG95QJyxjxGDojQ2gLX4OFR7Y X-Received: by 2002:a65:5684:: with SMTP id v4mr19985350pgs.160.1560248297901; Tue, 11 Jun 2019 03:18:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560248297; cv=none; d=google.com; s=arc-20160816; b=eWe2078we2XD8NSGeu12ThTjogFNOeEWQ0KQ8fPepXVRolNXahwr6L34+dH4Q/L8k4 YhZR7SDCgN52BdMHhwfOk4tg1BiT7IXe5u90HHttOR1xJ0Jfb4ZHLpGzsBRku5Aick7a j94VqvA/GiImKzkvkcXkogZ11R6GfljXZGGj2KK5dqefrLF/Tgra3WglwXsyPufDRA3k bfPzZv7HXF+mVUdCuuoil4St5ZiMOdGMgPt0/uMYiu7hBlrOU3L2W+uuPEXAiSLA5qqy 5xs34sZG0oax8eY/VxE0am7uOE4rF4y6aDi0EpVQF6IXXJ1K3SxCPGVVcJalt0gii9E3 LGFg== 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=zd//ZJZVLlDeQNhSd4o6OYyzJcoild5a83PkJMR2wrg=; b=ZPAXtQ3MYjsIY9zzwVNQaXuBG6z+9fd+I16PI9RRxll29FhIXCougu3CIEMZYV18UY /49wexhaKwejkXBJjpXMNbkGadBePrNl0B/RULkSGoX/M+AaE5TucaPeAQec2oJp+tw5 OarfI6BqFrbqH9NQT+ahPopm6mmQMemBH+1dx3wmPJt/L+v8+AXDeOnawagbI2rR2Xwo 5Hl8WEzAI+CpzaIeFHPzbuXrj0kS+eYgNZzk29ZKXpHcEUrkoVVfEC2PzF/diUbnJoCS 13A3YvuWJfPSJNyK67/mW68B7sJZjRhSAtxBmrmThON2U/Q7EzDmXHy3GUbr87zQH5NQ YWTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fDcdUdsw; 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 x23si10189261pfo.78.2019.06.11.03.18.01; Tue, 11 Jun 2019 03:18:17 -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=fDcdUdsw; 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 S2405386AbfFKKRb (ORCPT + 99 others); Tue, 11 Jun 2019 06:17:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:45904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405341AbfFKKR0 (ORCPT ); Tue, 11 Jun 2019 06:17:26 -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 86E18217F9; Tue, 11 Jun 2019 10:17:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560248245; bh=uJeKLBS6fKTQ/nvA0FnBFJQrRlvrfsBQnK9IvrqNg7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fDcdUdswDYDQDHG+d5ZJRayMDbmyQwGi8EoB+nzcxHcYGBmHEmpq1M8RGUb9s4asg bref+Y+yRyQy22Z9PJR1cm7+kbtvIhR/x4mlimha8jfcWZnkWd4XFgl6K4b7GieDP1 kTBMx1puq7jN4tb3fWpOSVI7lAAxPnJ9ZtrRBB20= Received: by wens.tw (Postfix, from userid 1000) id 811C960C4E; Tue, 11 Jun 2019 18:17:18 +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, Chen-Yu Tsai Subject: [PATCH v2 18/25] clk: sunxi-ng: sun8i-r: Use local parent references for CLK_FIXED_FACTOR Date: Tue, 11 Jun 2019 18:16:51 +0800 Message-Id: <20190611101658.23855-19-wens@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190611101658.23855-1-wens@kernel.org> References: <20190611101658.23855-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. Acked-by: Maxime Ripard 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