From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7653C54EBD for ; Mon, 9 Jan 2023 11:04:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rfdyyHpRTTSQORcCSSH+zF/dx8ewUzHXyfUYdnYN/uk=; b=yMqr4+fhBZYKhj MBGYAMwKZN4XQA0XSsUp7fON6pUxr25MfHCiM7h8if9jrH6K2tgobBls2o77F+ulFq0zDBjYTUQt6 II8c3EYPvK+0PIj6+gyfxwDyaIuv6w6kTpQWjzQRXPfwyEdgNSVPa7y2kc7GL3RoajsUlrRCATeiG cRSgUaWcNzmN31E+ZRmwDmf2ITzaYQxSjAVGhGMF2wKch51wBaCEKwzA+5G49lmnGjc6P0NueT3zi +u7NoFcm/Yastv8xu3YqRQhOKNoGi3mrUQsmkxDGGCDlKDjm4GhtuL6WE5YNsW2ds2zCyL6TEuRPP vGaXMuuhF7auw/cnkW7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEpvj-000wyq-Ro; Mon, 09 Jan 2023 11:03:04 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEpvf-000wwb-Gu for linux-arm-kernel@lists.infradead.org; Mon, 09 Jan 2023 11:03:01 +0000 Received: by mail-ej1-x62d.google.com with SMTP id hw16so7206920ejc.10 for ; Mon, 09 Jan 2023 03:02:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=HBmGJAH+7aJt8DSKtu2O0z38ADHM1dchiDSoaWBf4/o=; b=QTywWmaofqmn3sgz+ehF7Y5VHJrBCP/+i1B2iKO14rm2E9FqJd6DH7/U2Cy6rT5PYV hHOy8CYbetScZXi6Ya9ReWgrQmO7gt9s+GynLTuOn+4azudiiGQYFt6OdcOoYT8N2x9x v3LSt7fc5hPkSVaYEI8e5eYbhqni4LPyeuxaD2ldqQzv8pyQhxMsyoDG2zhzrxOtYU3g LzCY2n5LQnApRXoXC1eKaJn2/eiEgbbKtAHh8LzHnu5PxcsukdeuGk0LUd5smLe/u9sD 3NzJ9QBcLmluFdi5sfSOtCnv2+Q2lwQEp6aW6Mfr02Fg1IL5NzLK4+qdHE3UvQLM5u9b jHNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HBmGJAH+7aJt8DSKtu2O0z38ADHM1dchiDSoaWBf4/o=; b=dRmDkRHXPXubwtl8Lp9GMDvMC/nC1+mzqbPV5V4Jlyhf4TabBvr4LrpuLBYERT1Tre lw7/9K4NGHjYtMAsPJgHTr6S0bAVgpESZAHj00C6DJpHb7fazZb/xoI5F2+Qzq6ram0b EZRnK++fDxv87Ez1Gedpy+4cZttwYIHiTQ957ERvQnwnxb8cyj7B/0pOI27WQq6WVQJN 9XtYYVEcDS0GsiVS14WTwHAq5hhkr89N1ojFiPQsO/YjkI8Lal0HcGy6nIngMXiMjUf5 3OveOb7dXdib9XVkXEZtVqtefh2Gu683iuNO09Zd2rs27FYx02wLkQ3msIY4gY24o/cB 3FvA== X-Gm-Message-State: AFqh2ko2SgB1BbYxCzxSAFyESYTn+saXOpWM02dT+JPLLmbVkTLuU+2J Gf5vmX7c4BrxztL9SHcCBTJUcw== X-Google-Smtp-Source: AMrXdXs+6IL2HDhgSCRS6+vCNXEymA0KgUSWHwLB7jUQzJAUTbgM41ODQI9lapgRFyZRH8wnFbX+6Q== X-Received: by 2002:a17:907:cbc9:b0:7ad:b6d8:c9d0 with SMTP id vk9-20020a170907cbc900b007adb6d8c9d0mr59672834ejc.53.1673262172644; Mon, 09 Jan 2023 03:02:52 -0800 (PST) Received: from linaro.org ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id nd38-20020a17090762a600b0084d1b34973dsm3582590ejc.61.2023.01.09.03.02.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 03:02:52 -0800 (PST) Date: Mon, 9 Jan 2023 13:02:50 +0200 From: Abel Vesa To: Li Jun Cc: sboyd@kernel.org, abelvesa@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, mturquette@baylibre.com, l.stach@pengutronix.de, peng.fan@nxp.com, alexander.stein@ew.tq-group.com, gregkh@linuxfoundation.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: Re: [PATCH v4 2/3] clk: imx: imx8mp: add shared clk gate for usb suspend clk Message-ID: References: <1664549663-20364-1-git-send-email-jun.li@nxp.com> <1664549663-20364-2-git-send-email-jun.li@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1664549663-20364-2-git-send-email-jun.li@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230109_030259_582574_BA45EE68 X-CRM114-Status: GOOD ( 22.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 22-09-30 22:54:22, Li Jun wrote: > 32K usb suspend clock gate is shared with usb_root_clk, this > shared clock gate was initially defined only for usb suspend > clock, usb suspend clk is kept on while system is active or > system sleep with usb wakeup enabled, so usb root clock is > fine with this situation; with the commit cf7f3f4fa9e5 > ("clk: imx8mp: fix usb_root_clk parent"), this clock gate is > changed to be for usb root clock, but usb root clock will > be off while usb is suspended, so usb suspend clock will be > gated too, this cause some usb functionalities will not work, > so define this clock to be a shared clock gate to conform with > the real HW status. > > Fixes: 9c140d9926761 ("clk: imx: Add support for i.MX8MP clock driver") > Cc: stable@vger.kernel.org # v5.19+ > Tested-by: Alexander Stein > Signed-off-by: Li Jun Reviewed-by: Abel Vesa > --- > change for v4: > - improve the commit log to explain why this is stable stuff. > > drivers/clk/imx/clk-imx8mp.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c > index e89db568f5a8..5b66514bdd0c 100644 > --- a/drivers/clk/imx/clk-imx8mp.c > +++ b/drivers/clk/imx/clk-imx8mp.c > @@ -17,6 +17,7 @@ > > static u32 share_count_nand; > static u32 share_count_media; > +static u32 share_count_usb; > > static const char * const pll_ref_sels[] = { "osc_24m", "dummy", "dummy", "dummy", }; > static const char * const audio_pll1_bypass_sels[] = {"audio_pll1", "audio_pll1_ref_sel", }; > @@ -673,7 +674,8 @@ static int imx8mp_clocks_probe(struct platform_device *pdev) > hws[IMX8MP_CLK_UART2_ROOT] = imx_clk_hw_gate4("uart2_root_clk", "uart2", ccm_base + 0x44a0, 0); > hws[IMX8MP_CLK_UART3_ROOT] = imx_clk_hw_gate4("uart3_root_clk", "uart3", ccm_base + 0x44b0, 0); > hws[IMX8MP_CLK_UART4_ROOT] = imx_clk_hw_gate4("uart4_root_clk", "uart4", ccm_base + 0x44c0, 0); > - hws[IMX8MP_CLK_USB_ROOT] = imx_clk_hw_gate4("usb_root_clk", "hsio_axi", ccm_base + 0x44d0, 0); > + hws[IMX8MP_CLK_USB_ROOT] = imx_clk_hw_gate2_shared2("usb_root_clk", "hsio_axi", ccm_base + 0x44d0, 0, &share_count_usb); > + hws[IMX8MP_CLK_USB_SUSP] = imx_clk_hw_gate2_shared2("usb_suspend_clk", "osc_32k", ccm_base + 0x44d0, 0, &share_count_usb); > hws[IMX8MP_CLK_USB_PHY_ROOT] = imx_clk_hw_gate4("usb_phy_root_clk", "usb_phy_ref", ccm_base + 0x44f0, 0); > hws[IMX8MP_CLK_USDHC1_ROOT] = imx_clk_hw_gate4("usdhc1_root_clk", "usdhc1", ccm_base + 0x4510, 0); > hws[IMX8MP_CLK_USDHC2_ROOT] = imx_clk_hw_gate4("usdhc2_root_clk", "usdhc2", ccm_base + 0x4520, 0); > -- > 2.34.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel