Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp316114imm; Fri, 31 Aug 2018 00:59:29 -0700 (PDT) X-Google-Smtp-Source: ANB0VdazkBepb1o5InTZv9Em+Pwr0eek63HRxJKgILWQgMginuwxnXJIuglOa5jnuUEawEr8+nus X-Received: by 2002:a63:6343:: with SMTP id x64-v6mr11788890pgb.173.1535702369259; Fri, 31 Aug 2018 00:59:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535702369; cv=none; d=google.com; s=arc-20160816; b=DxehSgz4RpbqDjqppXQ0kdW719Pw01spqCPK01crcpfe24n2pyIDEe80pgipkbTsSh imG2Hs6ESqiDIt1i9fH86i8kS0CNlx39iYaZ/eFtXST4IUpqmicYfzlrLH9Tnz1d/PGQ szkSCqBOHWg6exDdhfc+j8/pFmeZRSha/bW2jqmG7p+mkiDi+VqyjKhFfGxtlxnwIQPA ldmm3ISY1sZ7mZZjsztmAAlPb+O5EEWayEgZ3d8MIjDtLRkQCSpa+er2nuRPnLzWN2te AJdAIlbGC1TcJHbd7xi7vBkwkFXCMMhpu7KJGULoXiFbdbIvSIe8ejyFwoj6zvm3D93D vnAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=0ysxj132QnoOBPfV2kbpfuhI7kNKJS5fQFfECjeLYMQ=; b=EzfGf+cxo+2dXxn/KRHBfBlBDqGFqtiIHIHxPG6J9KUZQEyBRFreEGG5ezRox63iJ+ FL7JKfjuG3eXsX1y8K3UWi8ZHATlu/tYge15pDUo23vB6zQSTy0vw51odoNST0Ok1lVg ffztM5Lk4FprhiuoFeUPM/N5HmkVzX74fJBaKjhmVR8H7lsE20fzIOyM2dV1KfBkD4Ky NzYloz5VUQAqw3dN2JmEHaxgs1vfW9vIgmRTz06D47H8RyQ7n8mjMs9hJLQcP7R77FTg mPLxqTkpeD73dGnSa0Xa4BE+p72XkbsvAYRq9gq8eYDQ13czNzQx+Rhczdn8qMVzg9fx Q5ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=xYFgXZlz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23-v6si8979957pgr.493.2018.08.31.00.59.13; Fri, 31 Aug 2018 00:59:29 -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; dkim=pass header.i=@nxp.com header.s=selector1 header.b=xYFgXZlz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727577AbeHaMEO (ORCPT + 99 others); Fri, 31 Aug 2018 08:04:14 -0400 Received: from mail-eopbgr20064.outbound.protection.outlook.com ([40.107.2.64]:3536 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727521AbeHaMEO (ORCPT ); Fri, 31 Aug 2018 08:04:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0ysxj132QnoOBPfV2kbpfuhI7kNKJS5fQFfECjeLYMQ=; b=xYFgXZlzZKdH9vFjBCnjOhnyw1rL7ppXJdhsKVZDH8RdbyKIFa0lxgolrvw9lfXpCfiWaTl8SwS9nWrleDLsthjAJBHqH/rqLCxQ2IoEJC3IKH2OPpaT2c2vxIiJjerXEPUB5cLq5oCEOJChWcMd2Fdk0gZggTpnL3QnZriA4gg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; Received: from anson-OptiPlex-790.ap.freescale.net (119.31.174.66) by AM0PR0402MB3907.eurprd04.prod.outlook.com (2603:10a6:208:f::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.17; Fri, 31 Aug 2018 07:57:52 +0000 From: Anson Huang To: shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, fabio.estevam@nxp.com, robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, mturquette@baylibre.com, sboyd@kernel.org, colin.didier@devialet.com, clement.peron@devialet.com, ping.bai@nxp.com, aisheng.dong@nxp.com, shengjiu.wang@nxp.com, matteo.lisi@engicam.com, michael@amarulasolutions.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH 1/7] ARM: imx: add mmdc ipg clock operation for mmdc Date: Fri, 31 Aug 2018 15:53:12 +0800 Message-Id: <1535701998-20443-2-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535701998-20443-1-git-send-email-Anson.Huang@nxp.com> References: <1535701998-20443-1-git-send-email-Anson.Huang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: HK0PR01CA0037.apcprd01.prod.exchangelabs.com (2603:1096:203:3e::25) To AM0PR0402MB3907.eurprd04.prod.outlook.com (2603:10a6:208:f::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ed1a429a-0587-4929-dbb4-08d60f1777e6 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM0PR0402MB3907; X-Microsoft-Exchange-Diagnostics: 1;AM0PR0402MB3907;3:EzuxTBuA/SutaXZTVKXbqpXW4h/Y9cI+ADLpL2eW4MNZHJa/WIhu5UpblBopWePT6XbcghVfQcOhfLKFRFUCdCiA3S6Nl94kfJciSk/8R8IAhtZoBq7HsNaXF0IJgKV9SUIS19r/ir9FbWEiHxhLlOUBkIW9vyBmWfeoFmDoXEOrEb7PkPJFmTGtGFzXn6JkWwQtWCbscuSuqG9C9fT3Gcj4kUh6156taHo7tHYt6bvA1s/P1Uv4TA1+N9V++e8F;25:Ori8z/wLhVd/S53yQDYr1sveGGcrVFN2j3QnHPom7RTvvzPYG0MBAaXUTHOgTobfMY32t36928WN6bpO+VtXL6ShnKV+C6BBwUyLjmaaRq/OugcdZlK2p+gAgHGBL6E8iMfLoIxh79TonDU4pI+Aa25Bi/Jnjyn+tVONG3hxvC1yirAuwaW4MM1s2X/macG7noJbc7iWM1mDpcxt8FaQrZcjLXkB+gjxsizAGov4zEp3+mn7z4Pk6u7yonCzzpsS/LFm6gnhW1nQPAH/j0U3mpho8ekyl+k2I7gDOlooI2RG5CN/7id10WhTlNC4uYxxgc9ts0FizCy3NMFPDvt44Q==;31:WGwJ9r7MUuaSEt8PSF+nCQrOxsyBy7wS0pQ6weA5BOHR/j3O5Maw0h0qwGlyRlX9AnOCNDGGDoOK+RXDWKBtKycyViy4Mx2iyJSp42xEv+SQ/AYo467btJ0HI9XKL09kGfumaOqbTQR2KNQViQVLMV4xVoQ1PFRyEYup0mYaKlZqx0qOibZswLcy2oXU69glEPw6IpKvYhNFfqj4Jdjz6T7wkf5+gqX+aCPmFwMFePQ= X-MS-TrafficTypeDiagnostic: AM0PR0402MB3907: X-Microsoft-Exchange-Diagnostics: 1;AM0PR0402MB3907;20:dtyJozMQPKnxvZOqdpuSIg2tIo7eq/eV5cUuqrFmh5FNlHaDEq2q/TKwnk65EMNrMxkq8A5FTh9gJjk0S3LqdiMI1UZcFn0GNb4hw3BODal98EqvN3Y0+R4B/Ouw3mREES37RP+chhxoBATmLQQt+iYOnFLCQoU+hqmz1ie65ulDlFxJi/7N1HSbQdNgkAxe+O8EoEYRH5oHQJ5efY+CAjUz5H7dV5/O2HagB7VX/8kVIFAU+F9wm79+EWUDLOQTtB8ULToBHe/owahBeNa1uakmHJJ8SRmhMP7olzqoFe6mnB8j21VTD7le1Qel+T6VIUkuvJspIsX7Ibjdwh71QM3O8T3l1Uepff1ZrfgQ/WESB/eW+AYLcMj8oxlmqDNcvQz22XQA4zZIjAbduQyqibJFkaa3iAPzi2A5OJkn4Md2+YfzgylwfCCo91lWhkCnXqMH9o365DiIl8SwmwFAcH84zfScENvshpSgj+iZDJA7SmHndwZfDfZl8AJPUMvM;4:cgeH++yOnKQ8GT4wetQk4aalELoXhpTi8NrMXEeAmaXC93YCRp43p8/akpIprub8hw2bMsqLCeg4DJ9sNYFl5eFQQ0oI/NP7IBTSxgzpRCQy+a2sMZTuGQFf8DNPT215KWRYwttayxgtOOybRxFO0GWul4B2/AhlZJuNiA2a8dVJJxdVR8udLe8wGOrA+ZjGHA6uzdgSltRQM2ewrl7e/lLWxm+NBFrb8v2OdYmaWyl9JJAZVXNZPZizzHBn2uK5pLRaGRZrZmk0gAEfYvBLHOwVvMw8dJJPyLyO4W+4of4YS9mHUzlxjiYltPy/EXP5mTcfD0CCWdmqtgTISLQYb6R+eh4/jQDgL+c3fCV8ak3zzTJwM9JZNx05ME+k3/uz X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030)(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823301075)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699016);SRVR:AM0PR0402MB3907;BCL:0;PCL:0;RULEID:;SRVR:AM0PR0402MB3907; X-Forefront-PRVS: 07817FCC2D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(346002)(376002)(366004)(136003)(396003)(39860400002)(189003)(199004)(68736007)(36756003)(8936002)(16526019)(186003)(50226002)(26005)(6666003)(2906002)(4326008)(97736004)(5660300001)(305945005)(53936002)(7736002)(386003)(6506007)(2616005)(81166006)(81156014)(476003)(7416002)(956004)(11346002)(486006)(446003)(3846002)(14444005)(6486002)(6116002)(8676002)(47776003)(6306002)(6512007)(66066001)(76176011)(50466002)(478600001)(106356001)(105586002)(48376002)(86362001)(25786009)(16586007)(316002)(51416003)(52116002)(966005)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR0402MB3907;H:anson-OptiPlex-790.ap.freescale.net;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;AM0PR0402MB3907;23:ZsUdS/VIrxMhWn58F2AfQxadhsIVKMYJ74RTAFW?= =?us-ascii?Q?fuuTY1PnSDAPUGd9IYveCL3TDgVrarpw6jOGiLsCQm9k2tY1v4fJqNmeoE/F?= =?us-ascii?Q?HQrAlXvBCojzuOB28Jct6q1Yeuq+n/8/EitElfezjA7iquYVLb9Rm0Z253gT?= =?us-ascii?Q?46HgurK4+P8weG6Mpt+3kJgYX9MglnVoVJ3af/0yV95XDm436WHdccVF3/zd?= =?us-ascii?Q?M2zXLZySEGlX7/nkh32OUhX9aevt6XNjETpfqtEOcgsxOp4S1rCks5O/U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GRTBjmnTehrjcFdMmuEGFVTHOw6MjySb83GoLCSvKHIgQXv+MO+yo95Iwg7Jv/jtPHYrjSKo+Psjol0jlUvyGgwVI7ZFoxnHmPMeZfpt8g2EEh8zFGN31aFgwitIsGHjcQ=;7:H3cKiNuyjI6lc+Nv5iyJojo6oAAMm+Oa/PcC6aK29Cx+Omxi0gGat6jokcybEYE/6R6k58D7CFaODwHlJpwCQ4PUo97+ZT0VRhRsAj6wofUtpxUFWyvxvIaKLtXmy9y75dNGS9HqwOc148oCML9mmHB0Xn1u+23nBvx/rNIVb/cRnaSiImf6mugndFAIVrersIpPY1JG1g7vWTcNb9E+oqAFhQE6IqfqbUBssNyOtZxVqPwH/VozMCkHclVUsA2t SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 07:57:52.3535 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ed1a429a-0587-4929-dbb4-08d60f1777e6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0402MB3907 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 04b3bf7..e49e068 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 @@ -546,7 +547,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.7.4