From patchwork Thu Oct 24 09:30:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keerthy X-Patchwork-Id: 1182762 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="ozkmqjf8"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46zMTW45kXz9sPh for ; Thu, 24 Oct 2019 20:32:15 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 2C32DC21C6A; Thu, 24 Oct 2019 09:31:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id DAF5FC21D74; Thu, 24 Oct 2019 09:31:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4591BC21DF3; Thu, 24 Oct 2019 09:31:09 +0000 (UTC) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lists.denx.de (Postfix) with ESMTPS id D18C4C21DED for ; Thu, 24 Oct 2019 09:31:05 +0000 (UTC) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9O9V2ve111032; Thu, 24 Oct 2019 04:31:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571909462; bh=qidM7XBWH/I9OGH6c17JdeceL1t3iSNI/Z8eldyKF9A=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ozkmqjf8ockRlENnOT6u5SWg1PWI3VZXAz8tkuv2WvUzPcjeeUve2qn6gTNR7L24O Ff/7mnOz3XoNZD9qCk8DM0QUV+waHACj5F8l27VXJuGiA2rT8pbNKgoD+zyRSwSrmM jFoN460IsRQRd+ipQDCXJjGEVEB0I+09yB1G+avg= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9O9V2Q9012250 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 24 Oct 2019 04:31:02 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 24 Oct 2019 04:30:51 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 24 Oct 2019 04:31:01 -0500 Received: from a0393675ula.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9O9UrhM104197; Thu, 24 Oct 2019 04:30:59 -0500 From: Keerthy To: , , Date: Thu, 24 Oct 2019 15:00:47 +0530 Message-ID: <20191024093103.13220-3-j-keerthy@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191024093103.13220-1-j-keerthy@ti.com> References: <20191024093103.13220-1-j-keerthy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: t-kristo@ti.com, u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3 02/18] clk: clk-ti-sci: Notify AVS driver upon setting clock rate X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Notify AVS driver upon setting clock rate so that voltage is changed accordingly. Signed-off-by: Keerthy --- Changes in v3: * No change Changes in v2: * No change drivers/clk/clk-ti-sci.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/clk/clk-ti-sci.c b/drivers/clk/clk-ti-sci.c index c25415d410..478349f22f 100644 --- a/drivers/clk/clk-ti-sci.c +++ b/drivers/clk/clk-ti-sci.c @@ -13,6 +13,7 @@ #include #include #include +#include /** * struct ti_sci_clk_data - clock controller information structure @@ -101,6 +102,10 @@ static ulong ti_sci_clk_set_rate(struct clk *clk, ulong rate) debug("%s(clk=%p, rate=%lu)\n", __func__, clk, rate); +#ifdef CONFIG_K3_AVS0 + k3_avs_notify_freq(clk->id, clk->data, rate); +#endif + /* Ask for exact frequency by using same value for min/target/max */ ret = cops->set_freq(sci, clk->id, clk->data, rate, rate, rate); if (ret)