Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4590769pxu; Tue, 20 Oct 2020 23:34:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzez6LcEV2qHv1U83VW4NajGSH92hqd4E0X9kWZMElTmsIgUqn4AL6N1nYaXtbojr4JErdn X-Received: by 2002:aa7:d3d0:: with SMTP id o16mr1576242edr.47.1603262055388; Tue, 20 Oct 2020 23:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603262055; cv=none; d=google.com; s=arc-20160816; b=F5yb99PPCL2L3cCJJH8FhOO37Zx2We340dMtRA4pFqFcCMIEleSnHMeTH5WaZOk76J N1wUvNmiqbfcZrJxZ11UXxI0hXZWQOJFQqLLZNP7OfaojD2/VKtY6apD7UnXQKYwvHD5 p3qfvaT/R37Zg1tX0PJfoQG9rYxLUCuRt2bcfSduSWdM7MtVVwhjhJRz3OoK0cJMgSHZ ue2JmWURrneV8jlFSdaMcqy8EXubA6tv1J+viAMZuK3ammpr9cmJUiIYTIu0RdYHDnZg Z0mBmfEJ7t6ikNj6eZVgrRawh0LBTnlJWnNTR5jMd1xhcaRx6tLwXlXBH0rkEqLFIVlN cuqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=pRBeQL/a5RpVRZarAG306C8c1NuJIWYfe0ySwmJTqGA=; b=kYm2uaaPPoXH3BkDOo+5NpQ95hQGtQezdpcs8Zl98hycX00feHxYaLXdwckiM7G1yc l5p+fO0/Z34krVn3YIBYHu65u5PdCXaK/IO4QDR6cjZ2FD676Sp5WlrhG0kh+ZBCxLEF VfIHr6Mb4Yv8iK0zfKxZSaUb48M5jaqutpjwcGHYGdxjqmdT2GK8NWxA7LhkogywH/Zh 1NkFu1Cd2mr01+rMg2hq5GOM3R6H1LM/TVTzWGBgV1L9twcozqrkyi6Ap/FD5iK0iK0x 3I5gwxanoSQ5APT68+nt7piplVejWGjzsB3/Ac+L/1rAaPG4pd8282XBTl/A+kOWrZjw wJsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i2fiDW4J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id e14si709285ejx.177.2020.10.20.23.33.52; Tue, 20 Oct 2020 23:34:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i2fiDW4J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2394622AbgJTQ3J (ORCPT + 99 others); Tue, 20 Oct 2020 12:29:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:43880 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733161AbgJTQ3J (ORCPT ); Tue, 20 Oct 2020 12:29:09 -0400 Received: from kernel.org (unknown [104.132.1.79]) (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 9773022242; Tue, 20 Oct 2020 16:29:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603211348; bh=pRBeQL/a5RpVRZarAG306C8c1NuJIWYfe0ySwmJTqGA=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=i2fiDW4JUPUQYMopwJeW41lkYqEGGsqhK8lkx7Mn/TSBJxouQki64PWOV5CKQNIvF cD2zH+Fd+oc2iTQMw2mF5ZbHNlAuzU7oED0ELXKymj42lp/prq7IER9qJtY6lROtS2 SW/lEi+T9G6eYaaDIsFbbYOhunmyDv0hQALhKMC8= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20201017020137.1251319-1-sboyd@kernel.org> References: <20201017020137.1251319-1-sboyd@kernel.org> Subject: Re: [PATCH] clk: qcom: gdsc: Keep RETAIN_FF bit set if gdsc is already on From: Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Douglas Anderson , Taniya Das , Rajendra Nayak To: Michael Turquette , Stephen Boyd Date: Tue, 20 Oct 2020 09:29:07 -0700 Message-ID: <160321134713.884498.3399615301658198835@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Stephen Boyd (2020-10-16 19:01:37) > If the GDSC is enabled out of boot but doesn't have the retain ff bit > set we will get confusing results where the registers that are powered > by the GDSC lose their contents on the first power off of the GDSC but > thereafter they retain their contents. This is because gdsc_init() fails > to make sure the RETAIN_FF bit is set when it probes the GDSC the first > time and thus powering off the GDSC causes the register contents to be > reset. We do set the RETAIN_FF bit the next time we power on the GDSC, > see gdsc_enable(), so that subsequent GDSC power off's don't lose > register contents state. >=20 > Forcibly set the bit at device probe time so that the kernel's assumed > view of the GDSC is consistent with the state of the hardware. This > fixes a problem where the audio PLL doesn't work on sc7180 when the > bootloader leaves the lpass_core_hm GDSC enabled at boot (e.g. to make a > noise) but critically doesn't set the RETAIN_FF bit. >=20 > Cc: Douglas Anderson > Cc: Taniya Das > Cc: Rajendra Nayak > Fixes: 173722995cdb ("clk: qcom: gdsc: Add support to enable retention of= GSDCR") > Signed-off-by: Stephen Boyd > --- Applied to clk-next