From patchwork Tue May 29 19:39:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10436825 X-Patchwork-Delegate: bhelgaas@google.com 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 AC94A602CC for ; Tue, 29 May 2018 19:40:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E6F82891B for ; Tue, 29 May 2018 19:40:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 972FC28923; Tue, 29 May 2018 19:40:09 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23A3128932 for ; Tue, 29 May 2018 19:40:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966471AbeE2TkH (ORCPT ); Tue, 29 May 2018 15:40:07 -0400 Received: from mail-ve1eur01on0055.outbound.protection.outlook.com ([104.47.1.55]:44901 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966034AbeE2Tjh (ORCPT ); Tue, 29 May 2018 15:39:37 -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=cuOSGoms6ee8VcMyCFo7lVLbfjVuPcrZKg7LHlGxOQM=; b=Gl1d0OhcjOtKoQRik+OOK6nUAtEyp+fZEuJ045TO7UbzPx3Aw6M0sc6YIXHqafq1Dg+tSonH67S4NmADA8U8tjz7W/y6P0x+/Yy5KQHw7v1rPJ5exkYNwUpg+zs/alubvbcIrBXr/pFcfuKAmwYO3wITSXOnMz1E1CGY9Z69c2c= Received: from localhost.localdomain (95.76.156.53) by AM0PR04MB4289.eurprd04.prod.outlook.com (2603:10a6:208:67::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.11; Tue, 29 May 2018 19:39:33 +0000 From: Leonard Crestez To: Andrey Smirnov , Philipp Zabel , Lucas Stach , Richard Zhu , linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Bjorn Helgaas , Lorenzo Pieralisi , Anson Huang , Jingoo Han , Joao Pinto , "Rafael J. Wysocki" , Abel Vesa Subject: [PATCH 1/2] reset: imx7: Fix always writing bits as 0 Date: Tue, 29 May 2018 22:39:16 +0300 Message-Id: X-Mailer: git-send-email 2.17.0 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [95.76.156.53] X-ClientProxiedBy: AM5PR0502CA0013.eurprd05.prod.outlook.com (2603:10a6:203:91::23) To AM0PR04MB4289.eurprd04.prod.outlook.com (2603:10a6:208:67::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4289; X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4289; 3:AVRF0EpeHS3iFuEawDyEkXTDwZCC3r5QIx6gD4l5j2asUUOb/eyucvY273MwGAvRuFb/lo0onc6NNFamKU3x8Dw7IN5DloyXLcOG1aOyRPrtrxHaR/IsgGl4VxHeBLpMyb0L7q6alI8dftIUSQLzTuoqwAznEDSYY2JQTS0MP0p0vd0vFKIN5r6MnG2symXF950UIyT4qrb4IFEFwDigfI9J2BjIFzpalObN5cj89etxqb7ktIyCzfCEvLqVm3qm; 25:0d5lK25W2zkrmMpQe2uWGoLwxdNqWmk9ERaMB1nx+yYxJm+qJd+/MEP1/jpJIlLMlm2GG6RN1AxF/uWePt87aGYEgmPOYtAH/KTpF1uNH7FswwwZb+DHXXDPeyWwiBtDoRS6jFg+pgcwLA0Kg+GSLCiQjDxhtDvnOKX4yb5LA0kbHzzOTJNP5vD6S1Prz/3Ix4PRsWUOeod1PyGjo78+U2XJ7K0l97dnJ+egqoTIOyt5MpJaYnGMTM7gTigQz+PvSb0QlN1HkzsQWIYX3WgAs6V9bVZldzMqNW1WKZAXEZ65lzTxt8E0Woi3t7xpNvqM7TMIS66J8hwzAVM6m0EcdQ==; 31:TtHCaBCwxMfUBNAKC9tJWwukWjFpQIfEn2GRDp1f14h7hNl5x0BdWIEER6CpF61u4lp0wvOzecr0snkgwP3JTp3ipL9RHgNkI2yhSC1U11FVmFTPrdS5UxOV93wLOJ1/yOrwRiq/i2xuKU+ieLfpIdtWe7TawKm9ls9s3Qrf7CG5h4+BWNCVFpKsF/FDE5ZSyI5NnklcdePN5GQ1gq3HqqeHzufShOMn8fN8BznQKxA= X-MS-TrafficTypeDiagnostic: AM0PR04MB4289: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4289; 20:vo/d3k4p8Qt6ToefOIlJoSLHbZqgAJF3HG3bjp2MEUAW3YIiKeAUsnYAJzl1BJfu/GV9vOH9jveLIRibeFAvDfROB6vJynmgNSXPNUS2judGvMdUz1X/vPxdjnh0MhZlotVwJqb6kzJqdZZW976obpQcEEtrDfpfWzKj3Gn5g02stnVTF9DTts5PiwhZ/egbREhmdivfKg+qid8udshko2wMRj4u+PA/ubl2HXRALO3gSnxRMjzSdW/YdaWWiukLraF0WPmGAmlWW+Ll81jSg9qvdicHpYs5gtc24ULH10VnlSAecjp8j0HXXPyBX5wsyf47aZD9sZT/Y94rHfeqkJfNpsMDWTeyqnxxqbWD95wEjNXi4eFvGw9P9WhQOySo95CgF94HqVqu0xFyJ3DyF0XjOOcCXeKjs/PYgGkoakwIYev7swvF6axwWPFhdwSSTzesGNeuw36YwqKLKXlOz3hN/H+pw2x4pLkzR68y8hUXh2B6NAVsb5/X75i4LNCo; 4:wrPqkGZxB56A2ZaMrPvC8oyezHSDQ8fmZB6GVqLDtJJFJyShdfX9JCP5H89iP9r33v5P9liWlUqYnzmLSYdgVsZWa5b8dCr3mLBPMTYfByBXnwXEU3OSipXgwrtYHHSGb6iylYSsRBIVHK3CekapalmPMs6sM6/ACWUTK8cTZORA2pegVyyZ3WTDrYN0+VPM/GCTki10ECnOf+/7Yjj2passA7B4KqKZy0mTvMcTgVO3puOH0Ea23UnqGCZrUsidlckgaBV0tZa+Ny3xfW9DD2oxgbJaq8FzXdl19Ok5baIUE6JVauN6NimJK/yZhYb7 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:AM0PR04MB4289; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4289; X-Forefront-PRVS: 0687389FB0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(39380400002)(396003)(376002)(346002)(366004)(39860400002)(189003)(199004)(2906002)(3846002)(50466002)(16586007)(48376002)(59450400001)(8676002)(81156014)(105586002)(106356001)(50226002)(476003)(6116002)(86362001)(81166006)(118296001)(305945005)(7736002)(8936002)(44832011)(16526019)(186003)(66066001)(486006)(26005)(54906003)(76176011)(36756003)(110136005)(6506007)(386003)(52116002)(11346002)(47776003)(51416003)(446003)(316002)(4326008)(25786009)(6486002)(956004)(2616005)(6666003)(68736007)(53936002)(5660300001)(7416002)(39060400002)(6512007)(478600001)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4289; H:localhost.localdomain; 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; AM0PR04MB4289; 23:pxGhje6/j+evgjKaZ9182l1vfBxvK1rDiBH1+iq1Q?= =?us-ascii?Q?E0IpepUHYnmVEl6fTw1vaQTgaOl86sHJHn9baB9wMkwyNvx5rFpWtxpDn0oG?= =?us-ascii?Q?f/7Dup8e8dGCT7s3tCyJLAwlKT7VJ9BQ8/9aSk1Jmg4MMN0Vpy+f2JXnV8TS?= =?us-ascii?Q?U9w+f4GKrpWkp3MlzZgCPcvtIGMLkUrihvQyTi/O91WOinbIrJHkIF4Wrzxv?= =?us-ascii?Q?uHZYg5sVD20U/SQ/DLNyo7tLSdYTKSNb7B7V5P4Vc374daqikmWpNm3gcYyZ?= =?us-ascii?Q?oCJW6ZKu+j28JZjeQ5hUzxVxa+Usj8/01BjAjq4G/kZDVt6JNgv1i2q5JcoC?= =?us-ascii?Q?D10bJzVshNW5t/QKMToQkKc2VZUWeZva3Q1ey4/T8y4KqGBhTpYrXw9JWfdZ?= =?us-ascii?Q?piqP1Qy1rFTPVU+JqFiRcPTQVgG6i8mspWZ6cjxGYwiLu1nIE29qKW9LIvX4?= =?us-ascii?Q?c0f4rxwalLv2WG/Cu3hPJp44m6S05Y7Dh86IU0YNsUZDkTE16AA/CjWckWXQ?= =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2EwHdX7ceewfTI29/9tP4IWldF6/UJzpi2Hu+tFvKv6cIJFhPOysUuypP9LVO9oiX9thZEre74VpiJE5SZjLaMCTvKWi9O9ifFOm8eiezIN1TkHbCbvN1hZquVaQ3UlcYXsZJCL4HsJl17G14BSP2xY6AFunflZUdxHQE46UJtAQA6/swnJTGbUTtvM6q2Q2Z4/8KSvWXjBuNQ55n7H4x186GfqmXHWmBeu X-MS-Office365-Filtering-Correlation-Id: bc73b204-16ee-41d6-5a15-08d5c59be7d6 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2018 19:39:33.6135 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc73b204-16ee-41d6-5a15-08d5c59be7d6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4289 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Right now the only user of reset-imx7 is pci-imx6 and the reset_control_assert and deassert calls on pciephy_reset don't toggle the PCIEPHY_BTN and PCIEPHY_G_RST bits as expected. Fix this by writing 1 or 0 respectively. The reference manual is not very clear regarding SRC_PCIEPHY_RCR but for other registers like MIPIPHY and HSICPHY the bits are explicitly documented as "1 means assert, 0 means deassert". The values are still reversed for IMX7_RESET_PCIE_CTRL_APPS_EN. Signed-off-by: Leonard Crestez Reviewed-by: Lucas Stach --- drivers/reset/reset-imx7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c index 4db177bc89bc..fdeac1946429 100644 --- a/drivers/reset/reset-imx7.c +++ b/drivers/reset/reset-imx7.c @@ -78,11 +78,11 @@ static struct imx7_src *to_imx7_src(struct reset_controller_dev *rcdev) static int imx7_reset_set(struct reset_controller_dev *rcdev, unsigned long id, bool assert) { struct imx7_src *imx7src = to_imx7_src(rcdev); const struct imx7_src_signal *signal = &imx7_src_signals[id]; - unsigned int value = 0; + unsigned int value = assert ? signal->bit : 0; switch (id) { case IMX7_RESET_PCIEPHY: /* * wait for more than 10us to release phy g_rst and