Received: by 10.213.65.68 with SMTP id h4csp2119245imn; Sun, 8 Apr 2018 20:10:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx498nE//fZsu4NpjmQWgTwbrg6Or5t6hCVF+plD/YpfFXs007v6iVCylItAw5kHYHEGf7Wqd X-Received: by 2002:a17:902:8543:: with SMTP id d3-v6mr2971945plo.20.1523243353807; Sun, 08 Apr 2018 20:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243353; cv=none; d=google.com; s=arc-20160816; b=NJg1/wV5N/V0Mx1lGcIqHnw8Nf4IyRY4Gvf0dKMDyKyXT/TS/Pfzxf2yR4K/JRxWZ4 DTYqcMTEgk8cQfSXGVddhZ4DLpq+5fhv+lCifEOClLmqSsX8PrhjTjG/kYG/IodZhlMT XyxWRWn5X8qxTfZpJx3GiIrvWoQYB0yAVIgxFmcT5PYdumy5guTnThHqUA4mPiqtIRs8 QxvNtQSHhm/okVO7bQkkg9hcDfApvuuSENgx4VeWmN+FmTXh4jVeJxLUh3MLyx8e/R2D 7feODRHc3iU8FdldrTTJq8rebemvh/ayszhAg7xmpVHCKsRnmrCneAGE3wttWKFXrUlV RVBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Na78k2vRm1vR2tmUJ/LPWticAIh31CUSumUZWWxEVIg=; b=M9Ffgnv2YRCGDrsCMxuyxs2CTf0YZRWJdHdxtuXGni1pPvLCUaiabkEnUIPkp2Y43W wPa9uysNqJpyEu1ee3qBgai0qMjNaeAyD5z03o1X3B/JJHgdpyF8egVQo+1sftLhM6EA JcTeRm7ECOGC2sKaula4L+qUSNGLp6TtlYcXdrAhiZegJLB4v/b/8+Y6Iioe0eV0FoKC jdbIshjU71hOD58eJ9gR7YEGOfN+XZ3Xx0Qbtc4bRuDlKjzy1vwOjdMDCufCUpG3XAx9 SqjXRiOt48eWW5LxXiGnNHSjO4UVB019VOg7DKdfHOamU6D0B9idLR2dQ11PEd90Es2u jclQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=oh9bY7PM; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o69si11928713pfi.157.2018.04.08.20.08.37; Sun, 08 Apr 2018 20:09:13 -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=@microsoft.com header.s=selector1 header.b=oh9bY7PM; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933126AbeDICZo (ORCPT + 99 others); Sun, 8 Apr 2018 22:25:44 -0400 Received: from mail-by2nam03on0120.outbound.protection.outlook.com ([104.47.42.120]:61603 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754244AbeDIA3N (ORCPT ); Sun, 8 Apr 2018 20:29:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Na78k2vRm1vR2tmUJ/LPWticAIh31CUSumUZWWxEVIg=; b=oh9bY7PMYNv4GQydYeRP/lRWoLPUG45MeEC3Cw+ZL8rT6pxX/e32zshbmD9aUtNYuDB2NuIZq6+NvwA4RWllEwsMc0UP7hfaFzxdxTlJ4cFHtw9OyGQf7abULZim/laifxGsd1neMYXlJnyZ9kG1aejIihdbJ5zzEwl2eH0JLOM= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0967.namprd21.prod.outlook.com (52.132.133.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:29:11 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:29:11 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Dinh Nguyen , Stephen Boyd , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 096/293] clk: socfpga: Fix the smplsel on Arria10 and Stratix10 Thread-Topic: [PATCH AUTOSEL for 4.9 096/293] clk: socfpga: Fix the smplsel on Arria10 and Stratix10 Thread-Index: AQHTz5kTtBWW+r5hPUOx9Kv8llpArw== Date: Mon, 9 Apr 2018 00:24:08 +0000 Message-ID: <20180409002239.163177-96-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0967;7:LughjaDsL6e1QDUpeebvgtzOSOxjFM/Kh6XdxMF0fkUsxulBIySWvernLH5RnA2Mav02A9U0jA0PCptEkNEZQEA8fE+m7ktHR6Gu/hI6uNfUdbtk2B0A3/x5Dr0Ft69PD6NEYoojAJym8bTlS8G/7LVutPJXxgRaxqcY7i+IU4A5PyBYtc8KNpYlZlaeJGj6NVLgcbKnUd0wloheP7VVzJ0yXYp8LkdrdE+fQngSlyrAHx2jCapk9du/tYI3vhQi;20:oAqwOMICdJfdQ3MGMim2uPYk4OFzNknlC+EEAWz+i7gMujeebEXxfx20kvAmZbLkSGGYPLAB6JiyT8L8mjVwpz14VN9bVGkZvB6Fvn7NNjpnVvD40l1KAyIBqBkGoo3I3uYl8cvupCmsywUQ0BfSOlHrQxJRr2JaLkLJlwakFf4= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 0ed9c68a-e0d5-4116-3b85-08d59db0ea37 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0967; x-ms-traffictypediagnostic: DM5PR2101MB0967: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR2101MB0967;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0967; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39860400002)(366004)(376002)(39380400002)(346002)(199004)(189003)(6506007)(486006)(86362001)(14454004)(59450400001)(68736007)(102836004)(99286004)(26005)(3846002)(6116002)(186003)(476003)(2616005)(1076002)(3280700002)(86612001)(72206003)(4326008)(446003)(54906003)(76176011)(11346002)(2906002)(22452003)(3660700001)(110136005)(97736004)(316002)(6666003)(5660300001)(478600001)(8676002)(6512007)(8936002)(107886003)(6486002)(53936002)(81166006)(36756003)(81156014)(10290500003)(6436002)(10090500001)(25786009)(66066001)(106356001)(305945005)(7736002)(2501003)(5250100002)(105586002)(2900100001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0967;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 6XDYMh+2XgttHzgGS7/FAbsDIPqaWmpxTuZvQGwPl/ScbUJUe140R0mdrLryX8ZFwWBtXaRkezDpUMZFXhMrvIUuew3acV+0Cq6DO9PHT8+4LBdbMHXmtE7JeSDDkd9D1vIi8NCdo/j5T5HWN1Jh7DEl/hY31h6jUONPzbhXG7QnBwldpeQbC+gLNKx9BU0SDYNcsR+JoRRKoGFPi7tzAVgcLOJ2xk/Lfa6qzA/7wl0Rd/ttUQ/jyOvyAkg+uj9TMA+6tfT0cCSvUMuOiWGtio3Ms2NwDkBQ5sgMG9nzj3v/OIFQK7Z0RtRJ3IuUSE4MeXRf01llShrr4IKKWEsFCHjv2np+5fUx3C/XFfzbrtwBlDiSYGUlyTGRkDgRKwyfsDvLht5WPjfO6KmBCRL2SKsCbCSC7q5BDoGRG++K/b8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ed9c68a-e0d5-4116-3b85-08d59db0ea37 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:24:08.8781 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0967 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dinh Nguyen [ Upstream commit b7f8101d6e75fefd22c39624a30c9ed3d7a72463 ] The smplsel bits for the SDMMC clock on Arria10 and Stratix10 platforms are offset by 1 additional bit. Add a new macro SYSMGR_SDMMC_CTRL_SET_AS10 for usage on the Arria10 and Stratix10 platforms. Fixes: 5611a5ba8e54 ("clk: socfpga: update clk.h so for Arria10 platform to= use") Signed-off-by: Dinh Nguyen Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/socfpga/clk-gate-a10.c | 2 +- drivers/clk/socfpga/clk.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/clk/socfpga/clk-gate-a10.c b/drivers/clk/socfpga/clk-g= ate-a10.c index c2d572748167..36376c542055 100644 --- a/drivers/clk/socfpga/clk-gate-a10.c +++ b/drivers/clk/socfpga/clk-gate-a10.c @@ -86,7 +86,7 @@ static int socfpga_clk_prepare(struct clk_hw *hwclk) } } =20 - hs_timing =3D SYSMGR_SDMMC_CTRL_SET(clk_phase[0], clk_phase[1]); + hs_timing =3D SYSMGR_SDMMC_CTRL_SET_AS10(clk_phase[0], clk_phase[1]); if (!IS_ERR(socfpgaclk->sys_mgr_base_addr)) regmap_write(socfpgaclk->sys_mgr_base_addr, SYSMGR_SDMMCGRP_CTRL_OFFSET, hs_timing); diff --git a/drivers/clk/socfpga/clk.h b/drivers/clk/socfpga/clk.h index 814c7247bf73..9cf1230115b1 100644 --- a/drivers/clk/socfpga/clk.h +++ b/drivers/clk/socfpga/clk.h @@ -32,6 +32,9 @@ #define SYSMGR_SDMMC_CTRL_SET(smplsel, drvsel) \ ((((smplsel) & 0x7) << 3) | (((drvsel) & 0x7) << 0)) =20 +#define SYSMGR_SDMMC_CTRL_SET_AS10(smplsel, drvsel) \ + ((((smplsel) & 0x7) << 4) | (((drvsel) & 0x7) << 0)) + extern void __iomem *clk_mgr_base_addr; extern void __iomem *clk_mgr_a10_base_addr; =20 --=20 2.15.1