Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp128737ybd; Tue, 25 Jun 2019 18:05:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqye+SMMgqjpOYW3hTX/K2yYrpGi8zvpzDVH2YxWRa/P3HhDEbTgkP/NCGq1/47Uk7Gg4PEv X-Received: by 2002:a63:8f09:: with SMTP id n9mr41197245pgd.249.1561511155472; Tue, 25 Jun 2019 18:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561511155; cv=none; d=google.com; s=arc-20160816; b=qBtB6xmhAwvUgUqLa64lok2Wiif3UqljqsBqPPDuovIArDTWYxQ96GZh9KCwSF4JGc 9GIsG/sz3nYjRoi/u1FQxUZzTLGaSIP4CZERjDXBZJOzl8jLJKq16wBFHZaGqgVk7vMT LDLJmhQ5tasKgJ1h8ZTGsTBZuWHuaUNjgC8YwhZIwHxO4EtedWgqrrTiNYr020yWmrDE tWJS9J2/PY4QvGSUKBRGs4AJSOZmSBmSjAJh2GcpF2mK2HkIIr8J97iPdhxHs0GWuE5K 8RxkBVy36NQ/hHJoql87gHp5CelCkGFVCrnsfQdR9LkBBHsJraXTJV//JAWj8wYTDYVo ZdpQ== 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:date:cc:to:from:subject:message-id; bh=VcAT7VnW8fLEOZDCGJ1Uz594VnpRoighV+MSrHNEdn8=; b=pfYcae8gdWWU0XbrmWkm2YdfJi2zdo95PTNfL0tnXwzrug41T2ZC4tesA10V9nVFxt nq7iRf+6F5GMTIwgBHDJhwP6Vv3PovRcjdeQeWYpOxpIeHXQMf37UP3zO35jHj6nbN61 aJfbGSgZpEHfmrL3Kp6FoXQOYa2gcTkT8V7XJdyEWMjxVxetkEXQ7R1NFhlSHakj+HaR EkVolLPvaPnGEEom6asf8WOxXPwh35ojjCt48chpH1oxrgH2ZxKN3Garm8pYg0WFFcmU hZFEK2quKMuoKjslQ8ca4kv53IjRHupz5P1gCVQau7F4FUn4KJRfrsNYTJa/XY5es/GP 5GPg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k69si14820797pgc.85.2019.06.25.18.05.38; Tue, 25 Jun 2019 18:05:55 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726416AbfFZBF2 (ORCPT + 99 others); Tue, 25 Jun 2019 21:05:28 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:46290 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726223AbfFZBF1 (ORCPT ); Tue, 25 Jun 2019 21:05:27 -0400 X-UUID: 6130bc13c6334e4485ec934b11c452d9-20190626 X-UUID: 6130bc13c6334e4485ec934b11c452d9-20190626 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 87491432; Wed, 26 Jun 2019 09:05:23 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 26 Jun 2019 09:05:22 +0800 Received: from [172.21.77.4] (172.21.77.4) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 26 Jun 2019 09:05:22 +0800 Message-ID: <1561511122.24282.10.camel@mtksdaap41> Subject: Re: [RFC v1] clk: core: support clocks that need to be enabled during re-parent From: Weiyi Lu To: Stephen Boyd CC: Matthias Brugger , James Liao , Fan Chen , , , , , , Biao Huang Date: Wed, 26 Jun 2019 09:05:22 +0800 In-Reply-To: <20190625221415.B0DC22086D@mail.kernel.org> References: <1560138293-4163-1-git-send-email-weiyi.lu@mediatek.com> <20190625221415.B0DC22086D@mail.kernel.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-06-25 at 15:14 -0700, Stephen Boyd wrote: > Quoting Weiyi Lu (2019-06-09 20:44:53) > > When using property assigned-clock-parents to assign parent clocks, > > core clocks might still be disabled during re-parent. > > Add flag 'CLK_OPS_CORE_ENABLE' for those clocks must be enabled > > during re-parent. > > > > Signed-off-by: Weiyi Lu > > Can you further describe the scenario where this is a problem? Is it > some sort of clk that is enabled by default out of the bootloader and is > then configured to have an 'assigned-clock-parents' property to change > the parent, but that clk needs to be "enabled" so that the framework > turns on the parents for the parent switch? When driver is built as module(.ko) and install at runtime after the whole initialization stage. Clk might already be turned off before configuring by assigned-clock-parents. For such clock design that need to have clock enabled during re-parent, the configuration of assigned-clock-parents might be failed. That's the problem we have now. Do you have any suggestion for such usage of clocks? Many thanks. >