From patchwork Mon Jan 8 02:04:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anson Huang X-Patchwork-Id: 10148851 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7E277601BE for ; Mon, 8 Jan 2018 02:50:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CFEB205F7 for ; Mon, 8 Jan 2018 02:50:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E705209CE; Mon, 8 Jan 2018 02:50:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF3EF205F7 for ; Mon, 8 Jan 2018 02:50:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iUpftEJsT44zR0BBA0j9uTjXCNWPbEhjmIhxqf/aqVw=; b=hmwMZCNjy8cWMN PMPojitTudQub63AlPbjgGhodDQOEWEUGVXxwZhbCVuGFr0fiD++lJyfUFGrW+C17CXT4fQm1qqd0 FpHxBWmQZG/vcEJ3IDPKe3ehyRFgeU9Mn0zyxD2h4a9QSt09JQZp+8eoiThbYqfemqJELQFObsKk2 LsLHugvrfuMGBh5PaBR4QqGMDpWGRB1qYtCGJ2ihaI0VizpmIVFo/jlt6hkjEhKqRzW5quQELdPQW dd7gEjKmoINoTYK+qQYldMEweyo+fELei+yPbRmjc4j0o7pJrXA3g+kEOcCl2B5St6AuqnVNs7ylT YTmRFc8n/E+lKIpjHWVw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYNWF-0005Wl-JP; Mon, 08 Jan 2018 02:50:35 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYNOU-0007cq-CA for linux-arm-kernel@bombadil.infradead.org; Mon, 08 Jan 2018 02:42:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Jr25mM0H2u5Q+auUKuuQhZVVKRfPb0xXMOcncBDBz2g=; b=pfPmbQIYtDQL7RsAEtETxruFf SEYiVoI8g5GsCCpf4AhbFVb9ErEtfCy95t2PareEi7rmbFlQMHiueKCAbgMSqz6lqULZjoCVWqEXl 45e2modNd0wt0WpFcxmzQXeNxmSibSgh1isAdXgqa49uar6WUFcu8y33uyKRzGKzBWsRk2bCP1buy WfD/ixsTwi9Fev86j1CcS0m0tyQBwr3XIIxRTPG73n0lgFUM0u9zKuUx4zitvu97e8SDdt0Cy+yw5 rX2xsIUo+1IZdIlNBrOaYQetrAbY0lb31jnqYgWRpCbW4HcgMrp7jgoLB38EC1OtWFpF2cS9XdXeJ 2IIUbkSlA==; Received: from mail-bn3nam01on0051.outbound.protection.outlook.com ([104.47.33.51] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYN51-0006uj-Un for linux-arm-kernel@lists.infradead.org; Mon, 08 Jan 2018 02:22:30 +0000 Received: from CY4PR03CA0024.namprd03.prod.outlook.com (10.168.162.34) by BN3PR03MB2354.namprd03.prod.outlook.com (10.166.74.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Mon, 8 Jan 2018 02:22:14 +0000 Received: from BY2FFO11OLC014.protection.gbl (2a01:111:f400:7c0c::195) by CY4PR03CA0024.outlook.office365.com (2603:10b6:903:33::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.386.5 via Frontend Transport; Mon, 8 Jan 2018 02:22:14 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11OLC014.mail.protection.outlook.com (10.1.15.48) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Mon, 8 Jan 2018 02:21:44 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w082M5UL003197; Sun, 7 Jan 2018 19:22:10 -0700 From: Anson Huang To: , , , , , , , Subject: [PATCH V3 2/2] cpufreq: imx6q: add 696MHz operating point for i.mx6ul Date: Mon, 8 Jan 2018 10:04:51 +0800 Message-ID: <1515377091-10422-2-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1515377091-10422-1-git-send-email-Anson.Huang@nxp.com> References: <1515377091-10422-1-git-send-email-Anson.Huang@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131598517048283001; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39380400002)(346002)(39860400002)(376002)(396003)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(77096006)(305945005)(72206003)(16586007)(110136005)(498600001)(4326008)(68736007)(316002)(81166006)(356003)(8936002)(50226002)(59450400001)(86362001)(104016004)(36756003)(7416002)(106466001)(81156014)(105606002)(8676002)(47776003)(6666003)(2201001)(5660300001)(2906002)(54906003)(8656006)(53936002)(2950100002)(97736004)(76176011)(85426001)(50466002)(48376002)(51416003)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2354; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC014; 1:g5PKyNMCX0mwDOiejRfyR8bk+ogPRigLQcOZjz0CNoyCdaz26Uj8yBJ/EsCHX0KC0iMJ42zgREKBnZB9+uianrhlIer4SdmrOGLxrTBZRamhSQvlsKWWiRlSJgTa7f5t MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 42be8df9-0089-4607-8f79-08d5563e9018 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:BN3PR03MB2354; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2354; 3:DcD0u7bZMr5J6qr1AS1vuL2F32KSRQ8sqSDHGYHWhrnrAKQMCdbmtKFoGp9u4KoaW6i+kn4zL2I+Hh+jWcEiwiA0Iw3O6Ni7KTWt9SGJ725zftpeWqDq5vsS6lkKUtsi/3Dj0pIbzbbGI6mqBVIPUKTci7f1ZmVs5hPudD8jAVBFPMFHi1QzbsoSqw9w8sUvghfxD/Zod2QJGnTs6ZGexJ3JCuPgaouNEXxp4fvkysojhr4Goc8lW0G//4jn5BYFaEGpiwz7f9qlG5BJGaXxUjKq0/KEi/+LKnR4P3vf5uGYOVzxy3t5qjjhmMKTZni8PH3ZPj3RNF/Vd5nInry9eNWaHBzRWnZMsX+xUUU/rGg=; 25:ZDV6UtBeTt0tlVpOc7uN/QHBvf4+pB/oX2vchSYlFH6VRri121ulS6hPuuofliqHT6SjBBN5D64l5S6Zg89JdBnKBL6SlEoLi0ZQ9dMnRQjzKPw8P/FykLB0sjifSyrjXVXnAxP5sHCNPI75tz+aemQ5UQA0+yBK2zbS+9W0k0tFRXNhbUIRZxr4dhL/J4cdoMNrGn0+7whpz9FcVq194UdML7I31eoCCHjNcyZMdaa585halymAa/e+ET7nq6oCTdNK03As7tSfKqZ8+mdOBxemdb675Ud4xXOGOkq1KBBOX7mEP/gGz5Sq95xONe11cfBCZ1qy0Qd/xZR1z3uOTA== X-MS-TrafficTypeDiagnostic: BN3PR03MB2354: X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2354; 31:FtzZXaX+XM0QTNl6cP5G6iouREewHB5o/41S/S/JLIdwDeZ7wdaaAgU8jILQdcodGT+WM7CVWcD4kQY8Z0rKB0HoPudF3eg0OR26KQzGwGonBaoV2LtNzg+URkyhj4shmxTp8pFQhKxpDYNFmGYO0+FAQUmEeheQbchwckzSffVQ78Jc2D3LXdK+1gIYRf41/JQCW3OnqP1ztitl5evvHCqQ0BPCpREqvXpBRgtsa5w=; 4:BN6sQCzeSXfeA18RKwdgXqVeH7t9zVM62C3NRufS0poNtjtEu9FjS27IxdaT2lFYtTOUkcQKkboLkN8BVTEfwD1kKQWXCtKTiwE46yfNrYigpyXwqNr/2n0Dzdg104Nr8iCKYAYpjh12XRjO1KYEyZrTsaa3PwJn8qGaP4ZvWaLxVPejdp+DuH7ep+dlND1qpaWvcIp8LbI63Ps1HAeSG5rMVx8Q5hawB11a11dlPNTNWs/oigrj2+hKP4ti/EHHay2oAA/htczK6kYHA9BbJ7HMOIouzi+j/cFbuXFxarfvk1eCsgLzKdFhrKhohtf/ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231023)(944510075)(944921075)(946801075)(946901075)(6055026)(6096035)(20161123556025)(20161123565025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123561025)(20161123563025)(20161123559100)(201708071742011); SRVR:BN3PR03MB2354; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB2354; X-Forefront-PRVS: 054642504A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2354; 23:NkYVPKcMSwUdDZJUnbNioHkVo8tiVfaJS256HJApz?= =?us-ascii?Q?8P9mpzLQ6kihpzUTotcbLsC7ek10AKWG3avxkJal2GqNm1Wm3SP8vGNAu9XC?= =?us-ascii?Q?QmeaSK3UVO3yovDjm9yVA4x17vY4zVwjh7A1gdBVlwWJcN5+3Q8DalZiC57W?= =?us-ascii?Q?3lEV9bP8uEeoWva4ctYWG0Mm7URruKN/UgINB6p5PZJf6DVKsq06UYxFczPa?= =?us-ascii?Q?fD+2xpCUS9FFTUVDQIBZcknuNpRjQ8QqVrV5LGkk9n6/u3qL0v5JcMwLdV8p?= =?us-ascii?Q?kJQXuNNV4sioHRG7G60/hHeRB5OxoD6lCUO+qZmNJgVWpvG46xHP6ZOg+mbT?= =?us-ascii?Q?4EdK52fROzKRa3d9FYhfcuHqg+dPddemIoA2pqAEi5jERtF1z34euslm8X9q?= =?us-ascii?Q?PCglabeNbkZukWZw8U2RoHvylRDoRAwmLV2oTEGRdyCTABfLiMprqMEbxe7T?= =?us-ascii?Q?WNnIDUDFEyq1P2A0CKPIfTrZvuZwEBgx+IUD2s2gdC7/gCMsNFubGFgAc3E0?= =?us-ascii?Q?5Pevyh1iwROWPa4nIEat0884BUU+8D3pVnBvvY11KKBH5vUmy2rLH/BnkHxX?= =?us-ascii?Q?P9sSV0s0C4OO8xSEhONW0DJEo+OeWAuTNfp0vr///bD4lxRkh+2es7jQXoU0?= =?us-ascii?Q?4FCHGG7o90Gnkx0io+rsM+EUeikpVM5bUYIAHueCapWEdJcAkqYAuVH5zi9w?= =?us-ascii?Q?a0OwNXhY0MoiShZuX8aWRsDoNV56oJSnNeQExUdRwihVc2czyTVci7cWt46H?= =?us-ascii?Q?45DCH0C+MMcBzKGFNeaYHgjEz+GRutpc7xpCjQEUDwGV9/ugZYqvdfvxRNRa?= =?us-ascii?Q?iv0w4rMHxFpfUdxTuYlu2F080SzM7FrvOGbg4QwZxahBj5dFhz/PfDg1wsKG?= =?us-ascii?Q?qOMZZVJJ9BggZNLWrLBiA1PBcbAwOo5wxGige6C+YURprzuugrOaqO1QMKZ6?= =?us-ascii?Q?ikQuEWE/aXzgGM1nGCYhMlzBVO8siAx5Q1l3FW6wVViTosyXJdgHjrV5U4Wj?= =?us-ascii?Q?BfLdB0Ri9U1fhBgqa94fKSatgNzmKkWXDsPycFPtZn1USBLkair5fgdt/YEu?= =?us-ascii?Q?6aJ2KOmQxPSC3V/Nt+Oqo++ifyZHo6/InMqLHx0/53rFdrM7ZD4KPOmASvaX?= =?us-ascii?Q?MrB/syxwwDcKfD0HgLaxKYsgNZQ1ZMeceV3e5aLw+um0cAK7L46Rg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2354; 6:/Ol77+Hj2QDV6EGsRSGcsKLFh524aOQ+RK83kS752AxvR2vi33HUXmHdLedCBpF3Llx8dbRS3NUuK3gdWZSisyVO4Va/rNjdhl1XOWGRJAegT+woUOfuEpq3xnB2iJYySUa0L/CrY2tKV+vqCxUj7LjyhxvjCPHum4fa4poCUMQCHtlQ1YL3uBTM3vVe4G0oxRlS0W+2+Vwh/KKqnApXtctblW0GhY3HR8J7xxPDD5QrRs5VaxvhxFt3QSen42O+jddYoollYiXTo5YWsDSKq1MT3fEmXxv8mJmNn7fgLDmDcT1WzJV5i02vuaKhjlnLQ2T/Y1jEKDI/aOXTxXU+/D5pxFxe0G2O00HOTQYEyyk=; 5:P5GL2wKW5JqKnQOTRwlWmSujXQ56Zt/rCvFTszJmxxBkoZPE8unqWYqq122uXC/budcZvDGKrR0sfyyrvOPkSsxFcidTmxeW5wCDURaLm5nRSeNW0FyHHUUvWfTcUdeg+iFhXYxXI1IkcO2lYd7c/CqPLBWOz5EQHn+dDMeQZow=; 24:ryfBuktiVW+ZpA0qsU3tqfUfnS4FhTuDcmbweuXeALKaRJuXQG75UZhMh2DurH9XHJfY1Yr9vxfufKRGVtP3gaheYs1PukYBARaEjCrYSaw=; 7:sxRc33vPXeS6HM2WduSLgGa0X677efni87ILTXhabSmz5bwjZTTxjfQqENflk1+p/fP0DwkJ4ilH8OcHE4Ad29LRwL7biEsl9aSZvPGvbCY7MN39bA3Xn23ZGOUPGgjC/qhr6hhTz5zSw27LZKtG1Jxax53xeqQ0Ui8bOYRHNo7gMr58ilErDJT9xMvKlScI5mclbZi2Pov7jLLZsHnmxvvAaV3wY9FifApBnkeXFkxnC6kGj9o2v6P5ZfSAdGz2 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2018 02:21:44.6411 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 42be8df9-0089-4607-8f79-08d5563e9018 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB2354 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_022228_084611_95A58494 X-CRM114-Status: GOOD ( 20.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add 696MHz operating point for i.MX6UL, only for those parts with speed grading fuse set to 2b'10 supports 696MHz operating point, so, speed grading check is also added for i.MX6UL in this patch, the clock tree for each operating point are as below: 696MHz: pll1 696000000 pll1_bypass 696000000 pll1_sys 696000000 pll1_sw 696000000 arm 696000000 528MHz: pll2 528000000 pll2_bypass 528000000 pll2_bus 528000000 ca7_secondary_sel 528000000 step 528000000 pll1_sw 528000000 arm 528000000 396MHz: pll2_pfd2_396m 396000000 ca7_secondary_sel 396000000 step 396000000 pll1_sw 396000000 arm 396000000 198MHz: pll2_pfd2_396m 396000000 ca7_secondary_sel 396000000 step 396000000 pll1_sw 396000000 arm 198000000 Signed-off-by: Anson Huang Reviewed-by: Fabio Estevam Acked-by: Viresh Kumar Acked-by: Dong Aisheng --- changes since v2: add reviewed-by. drivers/cpufreq/imx6q-cpufreq.c | 46 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 8bfb077..741f22e 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -136,6 +136,10 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index) clks[PLL2_PFD2_396M].clk); clk_set_parent(clks[STEP].clk, clks[SECONDARY_SEL].clk); clk_set_parent(clks[PLL1_SW].clk, clks[STEP].clk); + if (freq_hz > clk_get_rate(clks[PLL2_BUS].clk)) { + clk_set_rate(clks[PLL1_SYS].clk, new_freq * 1000); + clk_set_parent(clks[PLL1_SW].clk, clks[PLL1_SYS].clk); + } } else { clk_set_parent(clks[STEP].clk, clks[PLL2_PFD2_396M].clk); clk_set_parent(clks[PLL1_SW].clk, clks[STEP].clk); @@ -260,6 +264,43 @@ static void imx6q_opp_check_speed_grading(struct device *dev) of_node_put(np); } +#define OCOTP_CFG3_6UL_SPEED_696MHZ 0x2 + +static void imx6ul_opp_check_speed_grading(struct device *dev) +{ + struct device_node *np; + void __iomem *base; + u32 val; + + np = of_find_compatible_node(NULL, NULL, "fsl,imx6ul-ocotp"); + if (!np) + return; + + base = of_iomap(np, 0); + if (!base) { + dev_err(dev, "failed to map ocotp\n"); + goto put_node; + } + + /* + * Speed GRADING[1:0] defines the max speed of ARM: + * 2b'00: Reserved; + * 2b'01: 528000000Hz; + * 2b'10: 696000000Hz; + * 2b'11: Reserved; + * We need to set the max speed of ARM according to fuse map. + */ + val = readl_relaxed(base + OCOTP_CFG3); + val >>= OCOTP_CFG3_SPEED_SHIFT; + val &= 0x3; + if (val != OCOTP_CFG3_6UL_SPEED_696MHZ) + if (dev_pm_opp_disable(dev, 696000000)) + dev_warn(dev, "failed to disable 696MHz OPP\n"); + iounmap(base); +put_node: + of_node_put(np); +} + static int imx6q_cpufreq_probe(struct platform_device *pdev) { struct device_node *np; @@ -314,7 +355,10 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) goto put_reg; } - imx6q_opp_check_speed_grading(cpu_dev); + if (of_machine_is_compatible("fsl,imx6ul")) + imx6ul_opp_check_speed_grading(cpu_dev); + else + imx6q_opp_check_speed_grading(cpu_dev); /* Because we have added the OPPs here, we must free them */ free_opp = true;