From patchwork Fri Jul 20 12:47:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10537395 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 403D46053F for ; Fri, 20 Jul 2018 12:58:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24CDB28703 for ; Fri, 20 Jul 2018 12:58:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1881A294B7; Fri, 20 Jul 2018 12:58:44 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 AFCA028703 for ; Fri, 20 Jul 2018 12:58:43 +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=T1p0t7BuH+71jlVE3+6DCAhsETEScAhMFSH9Vvhz5V8=; b=Hea7Ml28laikhD zmB9jabZOhhbx9UqmgFljmAcrhhv2f5V+zurFOBpGnF1+zbimOhmo0SRrdzgvmIkevTpCTIkOJLiy PEIjgkGvBkYnilXzV4bDWogWVSOMr5cCcBf/bDjboLxaxLOaGEvy17ZU6Glk2C3Suiq/a1rfaP93T jtj0CyUsoB5GApqQPnWitJG8q3FBgUgX+KTxS9UZI8x4IeQ+al95LvpW8LgotS6t4tJiWb/U4ADy2 ptxB4F5kuFXJgfifr0JhJObtlfab05kXARJGIHvHYPa3go05mb3/HOwtL69YQEGa54Fqd9SK3URhB xtJBl9JboLMZHV/MUmjw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fgUza-0001sr-BC; Fri, 20 Jul 2018 12:58:42 +0000 Received: from mail-eopbgr50082.outbound.protection.outlook.com ([40.107.5.82] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fgUpY-0005q0-0B for linux-arm-kernel@lists.infradead.org; Fri, 20 Jul 2018 12:48:24 +0000 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=eYcZM0EG+KIni3X1hJuLTSCBuOjGNQD4bYP1JG45BmM=; b=TcbTtQZ11D7ODI1ivvX4LZ7S8AoIBkq7lWAQvGd1DH7L+MmRSa+M9mOe2oOtNsPZrxz1xX9NruC2H1FJ/dRBGWK842R2l8JB87mjKneVoWxm73zujLX9m4Ypshoq0cw0WWQw5Ff4NNUDDA5hHk5gGecbGypRxpgcXorL2PEYoCk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; Received: from localhost.localdomain (95.76.156.53) by AM6PR04MB4293.eurprd04.prod.outlook.com (2603:10a6:209:4f::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.20; Fri, 20 Jul 2018 12:48:00 +0000 From: Leonard Crestez To: Lucas Stach , Richard Zhu , Andrey Smirnov Subject: [PATCH v2 2/3] reset: imx7: Fix always writing bits as 0 Date: Fri, 20 Jul 2018 15:47:43 +0300 Message-Id: <54f436a1d2a11a379af642a3327312367ef95343.1532090446.git.leonard.crestez@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [95.76.156.53] X-ClientProxiedBy: AM5PR06CA0015.eurprd06.prod.outlook.com (2603:10a6:206:2::28) To AM6PR04MB4293.eurprd04.prod.outlook.com (2603:10a6:209:4f::31) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0fcfbf11-5e4d-474c-45f4-08d5ee3f0705 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM6PR04MB4293; X-Microsoft-Exchange-Diagnostics: 1; AM6PR04MB4293; 3:6DKySgyLyk/VC3IV3VX1Tr9yk0TAlAdls5LyViAs/qpxrtT1pUgdY+y+UnZlB0A/t1oT92WDp9OsEHRIRi+THnRXKTbJXWHFtK8xOGA7Lca27PSyGFM6H/AFU5pYLlZBEAsu6y3rwZn0Sqz63eW8+nTww9UnVdt/dlniihK59M5BKau/DOAIjjDntTRimALLx60HQ2N7ZaxXtxM3q6BhiFvzEBZ42+EV3d0tgSuirte7SWcD9sDKX9N8xVvIdX7n; 25:2GZb4E8c7ImP+4BgaEKqGPr0cInn6LGmbFhHYYLO2OGe2A8QDjeG5GtvyuBBP99C5kNgYp3FJaWL80LK7hx1g97pklDiSiKQGDNHEtESnczuzfXckTSEYnxTtOZcAjwQ/XHE/k+AlFsApoMRvJREKT6JRowa9K/k/IAU4JpTdERXcyprh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rul+m3CdXJdkSyFNDgXuP71MMXg7LF61oy5sKT4RGVo0giCfGKOUjfoRdhUWip53+CrR/KePkWHN/ux2bWQ+Kcy/GVr1eHibsOUQaWluTUdRC3BmYBvFiL5d9roAvL9dDgOeI25xkwb6qDlfJ0kiatQp8mJ7odlB0hWXjGjTOJNMqrNr3jfrqAbxnEiEnh4yjjq3QwIzjukD9Cea7w4Z4bD9Yf 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)(10201501046)(93006095)(93001095)(3002001)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM6PR04MB4293; BCL:0; PCL:0; RULEID:; SRVR:AM6PR04MB4293; X-Forefront-PRVS: 073966E86B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(366004)(376002)(136003)(346002)(396003)(39860400002)(199004)(189003)(2616005)(39060400002)(110136005)(54906003)(50466002)(86362001)(4326008)(305945005)(8676002)(48376002)(7416002)(8936002)(105586002)(81156014)(2906002)(81166006)(106356001)(51416003)(11346002)(14444005)(486006)(53936002)(97736004)(52116002)(956004)(25786009)(6666003)(16586007)(478600001)(476003)(76176011)(316002)(5660300001)(3846002)(6512007)(44832011)(36756003)(6116002)(6486002)(26005)(6506007)(50226002)(186003)(16526019)(386003)(66066001)(118296001)(446003)(7736002)(47776003)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR04MB4293; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;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keifo4vxxC89utN4tjj72gZiIsTIS+0LL0hl0xQjoVvTEytBdBUC3X77uk8paX819D2MHi8jRLppR7lAbxZnokQ+r5PLtOyw+gLvabjO4Y7apFsyCDLu8yveFipn3wf1rRpw3QojQwxHqjpaRse7PgojHXjNL4KxG34fw4DzmCMNAP9a1Ah/Zrv6zRiRk7JSBeKEt2+PuzUy8DP/PYHHwWtqlHV/IIvVG2DVC5rMuCKYFlSGVemqLSMkVq3+78cskSevGYaqqvJPrnvApoAJwW29iYxbxuwH6YcGwWQEqvriZPRQ6I+rrlzvkiMLVoSFg5TyBQa9lCol5997EXXwzwB3sUUNwjAr0OXMPX+H/Ji84zpB8SQKg713fEebpp+Gp6pkjSbX/bnQ==; 5:E+7/AQz5IC1cI8+EpKlQpoCPf01xKehO4ChQKoorKD5gyu+KRxi8+CNw0W1hicOzrXPK3DYffStD8fXJgwpUkkqJqC8c3Qj25B+u9zRQLuEnTZ99ik4jpDDJMg2QK5mSXJIBiyD8H0upqLnMZ3BInKgJDMSTp6HJZO5+KBIQdHU=; 24:OrOrejUffVrcSe93acmJa90muren4RjYVmSxCi1KLiHTcFS99OuQJEjKji4HjA9yzOpXduFxwM3S0QMQhA1/R9SOHB/YB4FG3lPqknQ0pvo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR04MB4293; 7:sK6HUT0EDVZ8kBiSG+eCFg3ytG56HMPoDvHEfk3wu8GrJqHaxNfNk8oVQk9BVWcD2fns9kbhta0IP5zzJCtQbGcv+tcVzPk3FQAj00ZH3Fed1F28t7IoQxYWO7kdPzfiUU+OJmWj2KDaOlUwiwWJEhZVUtnLpz+4E+G/MZdtR7Z6OnNaaM0RzsPlkhywOCoPMLes58OhjbpQlUU7aL1fhbGsPVC7fVhYttYONTVPDEi6idiBOmSGu7FvHNWPG1dq X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2018 12:48:00.3585 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0fcfbf11-5e4d-474c-45f4-08d5ee3f0705 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4293 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180720_054820_413633_275E9325 X-CRM114-Status: GOOD ( 12.69 ) 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: Dong Aisheng , Joao Pinto , linux-pm@vger.kernel.org, Jingoo Han , linux-kernel@vger.kernel.org, Fabio Estevam , Lorenzo Pieralisi , linux-imx@nxp.com, kernel@pengutronix.de, linux-pci@vger.kernel.org, Bjorn Helgaas , Shawn Guo , linux-arm-kernel@lists.infradead.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 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