Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3758986pxt; Tue, 10 Aug 2021 10:38:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcLmrn6984mnhC3HmSxEzTPjC/88vgTjMK+mpm/1W7rL4jxsQDaONXJgSyOjoX3JH5Kvbt X-Received: by 2002:a17:906:d93a:: with SMTP id rn26mr28455044ejb.382.1628617133645; Tue, 10 Aug 2021 10:38:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617133; cv=none; d=google.com; s=arc-20160816; b=DqBwV8SMK0+N8RvAeLHZFwkX8+u1YM920K8ZWn8/hGTqwVwdEarSwf4JOsCVDuaEDk W1Lnm2ijaY7mX+L49N4ahKjdC7jgOrIQTmrcE/gS91wbjfhGHlV2mpaKmvcYLDn3yUFV lnOyL1+tJiO+uMelJBw1jUeh1byWfq3jGbcOC0/ay8bVtKDYkabvneMhXVzOIhgPUNSB PX19oaPzkYcQOjUtxFZj+KneX4HgcO7qMBVaeT3KmWPIuZWI3T9rZV6mDYHJY9NtGtFL f4d5DTRpkXPVsOFKvJFO/R/y1dEOinUINQSdO0VsJS1q9g+FNlDqg0V/iu4jY3ae5MDr djPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=niJRYsseNQuSk/PYa5NuJMqP1zvAz3uHMmJSvVgoXWM=; b=XmhujoGZOT79W7ENrAj+EVkwkTbFpwidCNpWW4KSCGm8Ll3UsFDjH2fKSyuT20aErR cl4CIUbtkWsuKzEZqfgER/HawquuQYA/F5GRQ/x8tHpYJrKKbg4mXGWYKExErJccKGkw fLXvcAP7Gl7MF8+iXUHIbtTGD3oxG78Aq+A2YpOKcl8WSSFkX/PQQkFVHeJF6gITHALt SwVjJ4RyAhE59PIisGQ65wMI47gfX8PEaSDI6VPK98HLRLvTVhpLm+Ca6yIIQul/u7IC j9ktOdARinJHbU+977KN2cbWChIayR78dYzFnPzFtf2VbQASf6eNrGVa8drOnG13nLwc 50ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="uFnP/ZdP"; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f17si21089726ejz.260.2021.08.10.10.38.29; Tue, 10 Aug 2021 10:38:53 -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=@linuxfoundation.org header.s=korg header.b="uFnP/ZdP"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232970AbhHJRec (ORCPT + 99 others); Tue, 10 Aug 2021 13:34:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:37254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbhHJRdp (ORCPT ); Tue, 10 Aug 2021 13:33:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 77A8861019; Tue, 10 Aug 2021 17:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628616802; bh=E349f0OlEBh8xcTlEdRFJx9D+TdKNo9hTQiGfDU067Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uFnP/ZdPxOtjPo86b75DV5NWt5f2Sz+DjRnyyG5ZNMKBbmwsaTW+ktWlHFwHGG5J9 7OSo+35Xrurp8WfaFolLhvQJz0XQKGZSPuekt8l/h41tunDCP0j/wAftLcx83sn6gL w6U0ABEA6c/zAaGO5hxknwBzbAKhX/LMnqJ3gJiU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anson Huang , Shawn Guo , Sasha Levin Subject: [PATCH 4.19 54/54] ARM: imx: add mmdc ipg clock operation for mmdc Date: Tue, 10 Aug 2021 19:30:48 +0200 Message-Id: <20210810172945.984707951@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172944.179901509@linuxfoundation.org> References: <20210810172944.179901509@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anson Huang [ Upstream commit 9454a0caff6ac6d2a5ea17dd624dc13387bbfcd3 ] i.MX6 SoCs have MMDC ipg clock for registers access, to make sure MMDC registers access successfully, add optional clock enable for MMDC driver. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo Signed-off-by: Sasha Levin --- arch/arm/mach-imx/mmdc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c index 1d340fda5e4f..ae0a61c61a6e 100644 --- a/arch/arm/mach-imx/mmdc.c +++ b/arch/arm/mach-imx/mmdc.c @@ -11,6 +11,7 @@ * http://www.gnu.org/copyleft/gpl.html */ +#include #include #include #include @@ -547,7 +548,20 @@ static int imx_mmdc_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; void __iomem *mmdc_base, *reg; + struct clk *mmdc_ipg_clk; u32 val; + int err; + + /* the ipg clock is optional */ + mmdc_ipg_clk = devm_clk_get(&pdev->dev, NULL); + if (IS_ERR(mmdc_ipg_clk)) + mmdc_ipg_clk = NULL; + + err = clk_prepare_enable(mmdc_ipg_clk); + if (err) { + dev_err(&pdev->dev, "Unable to enable mmdc ipg clock.\n"); + return err; + } mmdc_base = of_iomap(np, 0); WARN_ON(!mmdc_base); -- 2.30.2