From patchwork Wed Jan 15 21:26:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jae Hyun Yoo X-Patchwork-Id: 1223872 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47ygQh4lgLz9sNx for ; Thu, 16 Jan 2020 08:27:40 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47ygQh2Bt8zDqS6 for ; Thu, 16 Jan 2020 08:27:40 +1100 (AEDT) X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.intel.com (client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=jae.hyun.yoo@linux.intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47ygNP2LbjzDqLG; Thu, 16 Jan 2020 08:25:41 +1100 (AEDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2020 13:25:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,323,1574150400"; d="scan'208";a="213841143" Received: from maru.jf.intel.com ([10.54.51.77]) by orsmga007.jf.intel.com with ESMTP; 15 Jan 2020 13:25:35 -0800 From: Jae Hyun Yoo To: Joel Stanley , Michael Turquette , Stephen Boyd , Andrew Jeffery Subject: [PATCH 1/2] clk: aspeed: add critical clock setting logic Date: Wed, 15 Jan 2020 13:26:38 -0800 Message-Id: <20200115212639.4998-2-jae.hyun.yoo@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200115212639.4998-1-jae.hyun.yoo@linux.intel.com> References: <20200115212639.4998-1-jae.hyun.yoo@linux.intel.com> X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: openbmc@lists.ozlabs.org, Jae Hyun Yoo , linux-clk@vger.kernel.org, linux-aspeed@lists.ozlabs.org Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" This commit adds critical clock setting logic that applies CLK_IS_CRITICAL flag if it detects 'clock-critical' property in device tree. Signed-off-by: Jae Hyun Yoo --- drivers/clk/clk-aspeed.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/clk/clk-aspeed.c b/drivers/clk/clk-aspeed.c index 411ff5fb2c07..d22eeb574ede 100644 --- a/drivers/clk/clk-aspeed.c +++ b/drivers/clk/clk-aspeed.c @@ -541,8 +541,11 @@ static int aspeed_clk_probe(struct platform_device *pdev) for (i = 0; i < ARRAY_SIZE(aspeed_gates); i++) { const struct aspeed_gate_data *gd = &aspeed_gates[i]; + unsigned long flags = gd->flags; u32 gate_flags; + of_clk_detect_critical(pdev->dev.of_node, i, &flags); + /* Special case: the USB port 1 clock (bit 14) is always * working the opposite way from the other ones. */ @@ -550,7 +553,7 @@ static int aspeed_clk_probe(struct platform_device *pdev) hw = aspeed_clk_hw_register_gate(dev, gd->name, gd->parent_name, - gd->flags, + flags, map, gd->clock_idx, gd->reset_idx,