Received: by 10.213.65.68 with SMTP id h4csp2120093imn; Sun, 8 Apr 2018 20:12:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+D/8e0zYmm7J+vUXdET+AFKjL/Tf3yxT6ts9KZVtmThYgCH6HZgd4eMh5RM1QoT1GLjT6/ X-Received: by 10.99.153.17 with SMTP id d17mr24044199pge.62.1523243522616; Sun, 08 Apr 2018 20:12:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243522; cv=none; d=google.com; s=arc-20160816; b=gnoRTg1yNP0aB8EuLtAj4ZO8VVp9BINLV8zWvIO/vgpgjthstXeJ/+S6YE1EKgWy1n gbS8Cz0aF/vrnANXsFfqTaOU0SeYKxTi5p/3KwBsiSpGBHrPnU+Bebmt4h2dOjdL/P2i YXKslULlQGOgoViXcsoPdMTOesKmk1M6OTQd3RV+X4fgZsTKuWkSgTkiLiZ5vyNktMey l7No6HqNK+gmuFAuZAUw7tRPagV7Ac6PWN+NraMu0H597lS7zq/jheiruwxvHf0cq+Jl RbpomAM/xWVESDyk5qq+VlAUav3FY3z9zOFYkhU9RZlQ1YLUHTnqwmR84TKciLYeeUjx qW+g== 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=nvTl3Nq3iAwuvp+wreEu4IWoUJosFpczniiFxAv+fZE=; b=hGlDi3Gk1lgcWVK/k8uVVJKWTIg5P9+7ukl1TVSWKuHtQzOFlfFIfleox0f80aZ4+m w3EYD+nDEI1+6gf6B023Op6gCEhrGIKxMnmg4NPIyIFEHqhZzCO3lKU6xckUtNhNztax iJYbBItivybdrje7jtfllQfAhlOmWFNkJ+dYuDK8VitOLRQExEV6L1A6wdyrHgzk9Byg YIC06PkuKtsU78Ckz5Wsnp73thWOFYDzvgbOwDMg8qEOaEgxaHZ6k9tl2uuz8YBHjmTl +ftceyxritsVw9IkGNzh7GKZxdedul5Bs6o2NHD9+7XK90EvDO1DaQgTAh02P5sqrmkT N2xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=FqIjh8R4; 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 k63si10696450pgc.290.2018.04.08.20.11.26; Sun, 08 Apr 2018 20:12:02 -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=FqIjh8R4; 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 S1757319AbeDIB3x (ORCPT + 98 others); Sun, 8 Apr 2018 21:29:53 -0400 Received: from mail-cys01nam02on0100.outbound.protection.outlook.com ([104.47.37.100]:40736 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756643AbeDIAgA (ORCPT ); Sun, 8 Apr 2018 20:36:00 -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=nvTl3Nq3iAwuvp+wreEu4IWoUJosFpczniiFxAv+fZE=; b=FqIjh8R4q0x2gxroTF9eduF4Jp6+Ai48a5dpo7Dt4nytaURRlnfYVSC796IvciwcwiRAvtDVunfCugbXZpmjXwi3xUj8ov5Y9WB8fUmWMgmopfFYGHSwp+5C4vvf8Wa7Lvj9N3KQiIhBdn6TIllaiyLaodp7tqeIjnZsEX3ldF0= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1015.namprd21.prod.outlook.com (52.132.133.37) 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:35:58 +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:35:58 +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.4 048/162] clk: socfpga: Fix the smplsel on Arria10 and Stratix10 Thread-Topic: [PATCH AUTOSEL for 4.4 048/162] clk: socfpga: Fix the smplsel on Arria10 and Stratix10 Thread-Index: AQHTz5mn/cXP2IrUXUm9XY2/+Gqb2g== Date: Mon, 9 Apr 2018 00:28:17 +0000 Message-ID: <20180409002738.163941-48-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-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;DM5PR2101MB1015;7:31wS3Wncz33724qxNlLJIYFSCwiWDZCwzTHqqKhtdexyE5pdU/1N3JvK2ZX90XZ23iEwf1QmWPhlULQn8/6eCCpwI/SdIj2HQ9N9LURFNSliOhnpLo5WS9T2VNt015kF5jK1zGykELzbWg4tZmAJUC3qyIPMKNQETAhTn1VCsVK3+3ty33JvFS/vHyEDAzf0r4FhlxwZyz5ZyTNUZzYeaEc8iAIR0UmstuDvwBzQuMclnIQTqdup9DCIoIcIhYJ8;20:kA0LgDoUVeKS2YQ3omwzyurmsiMOw/njQrym/uDtjytigZvXDC0QQkXDzQ694uJNoKOCSYBIpFTAOVA+myOG4vIRQdKNGR7FY17Wk1RMUShfQBAdGSlBhDrIWVN16kGQRLpisGJsBPoaY6wqbqiN39SI9gsBEbX34+/0PGKPUCM= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: adea328d-bc08-4ce2-72ae-08d59db1dcb8 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1015; x-ms-traffictypediagnostic: DM5PR2101MB1015: 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)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB1015;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1015; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39860400002)(39380400002)(376002)(346002)(366004)(189003)(199004)(53936002)(4326008)(478600001)(72206003)(3280700002)(2616005)(14454004)(305945005)(5250100002)(3660700001)(2501003)(2900100001)(54906003)(110136005)(86362001)(1076002)(107886003)(6506007)(36756003)(446003)(68736007)(6512007)(7736002)(486006)(2906002)(5660300001)(6436002)(3846002)(86612001)(6486002)(66066001)(11346002)(476003)(6666003)(59450400001)(26005)(10090500001)(316002)(22452003)(8676002)(81156014)(81166006)(6116002)(105586002)(99286004)(186003)(106356001)(76176011)(25786009)(97736004)(10290500003)(102836004)(8936002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1015;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 4lUg45nQ3WxnLZd9oxQwFgOXDCxoHSDUNwsSvejgf5uJ4GPz9vYEhhRdm76Ad/v6QZ1IcXXeP19v8kEW5kHVoYAwMCIsr+vYEkdp12X6sYSeWTvUqAplJzJlDAHNmuWh/VkpvG/qqlbavtYF0SXnxwGiIKx9LsuywMU0tUdiW5qMGxtZxuyKdS5a9mjSwwUuvjy2Fpc4bD9FfHwWzZCGqBylmHQ8gB4ROlgvTGdhYriBD4Ypv1EEfR0YLDqS3XqvYRD0jLFMFoSNXjHr2+NF0gCPjHOhhjsmfuVNMYq5MsAeRGLa4/W8luOzKB8tIaz960ODvnIZxVHcn9S86sZN1BsiS2vEwLFeFnFqCS5C4D5lfytzwNKM4iUPImsasXVYP1kk7YZBFzK5f3pfOQ54ryCG5LnKz74L8jmgiSm8xw4= 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: adea328d-bc08-4ce2-72ae-08d59db1dcb8 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:28:17.3174 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1015 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 1cebf253e8fd..f55b36bbb7ae 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