Message ID | 20190912091656.14301-4-rasmus.villemoes@prevas.dk |
---|---|
State | Accepted |
Commit | abaf5c98047338c8d8774ff0a5cbc9efffda92f0 |
Delegated to: | Stefano Babic |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=prevas.se header.i=@prevas.se header.b="kNlaq140"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46TYDz3NsGz9s4Y for <incoming@patchwork.ozlabs.org>; Thu, 12 Sep 2019 19:21:55 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 288E4C21E63; Thu, 12 Sep 2019 09:20:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B1FB2C21E7E; Thu, 12 Sep 2019 09:17:37 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AD64EC21D8A; Thu, 12 Sep 2019 09:17:28 +0000 (UTC) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60138.outbound.protection.outlook.com [40.107.6.138]) by lists.denx.de (Postfix) with ESMTPS id 7301CC21E68 for <u-boot@lists.denx.de>; Thu, 12 Sep 2019 09:17:12 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UyR7MbKw1D2Cs6MO7oayjglxjVjwDzAqO8BAvLpU5a1fuD3Al2Q2tfPykxsgkCSS/Rv/Jc0Y3elpOb+C65G5vpbcbwy/Z3dD1EKgalsaWuZIX3uma9kG1IHGUaXZv8vNHiLnOvtaAJnMsDMH9p6ExQi+ppkaeOtLnlLiDC74/xKCG2oKG9WYlQxdW1YB31f4iaWzpY/A6lNtNF3U+GyFXRP+pPfRQftnfz9uHqoa4LGTky7+6vA5Pg+0Mc55g8YZrOHVhiMKUUMHAcomAGGNtiMb8IQpHVCB+TlKz0yyD0XGabITvhcQ6un5ualNxxEtS3qRoOK4grjubYJ1VZ0J5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2yui+hg5jGV5vXVwMDoJKfabImaSpvPSUZq9/jU8cAQ=; b=eTNSNv27sMEEVY9Anwrp/R20gEWCy122tbo7o2BfCz8Y18SK1ig8JOFTumzyOGNNACZT/e/GEo8XnVwt6xFy8wC+Fsd+0m82dYMwVv4WfDvfQ6LqhW0IK/Q6hiJuAuhbc+DxOHEh79U7J2d/zI4XRM+OMVWnfDxtW6PvoEoLFW4dDdg59fe4q7bB8eEyf5w9dntbAARBuZvcGxrGwje95Rp/ZAClvvMnGW8G5srunwE88JMtakowNv0hyGbFk+m5eKHGTxt7Zi3bFE8I1eQv7x+MSWIrPRAjnMkQ0VsQfO2wthqBTE+w99IqbJHT3sU7w7V2xAvFF+9U5GXo90U9Ag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.se; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.se; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2yui+hg5jGV5vXVwMDoJKfabImaSpvPSUZq9/jU8cAQ=; b=kNlaq1409yZ2r+n+ikH/yCkEUoL7+OIJBL+2iQt35aNulVyziXoNd/LYEuN/Gbllz8Doo/cYetnHGL57DVZ0mXGL0CHOi0Sr8pKgNHlAV7Ady5ihjynM7mmC7mJwetr2SD4JVnFb3Hfok8xTRDvpagJ8nKL0lCqsZhBFyKjOeGM= Received: from AM7PR10MB3478.EURPRD10.PROD.OUTLOOK.COM (10.186.168.7) by AM7PR10MB3480.EURPRD10.PROD.OUTLOOK.COM (10.186.168.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2241.14; Thu, 12 Sep 2019 09:17:11 +0000 Received: from AM7PR10MB3478.EURPRD10.PROD.OUTLOOK.COM ([fe80::f0d2:3945:47d4:747b]) by AM7PR10MB3478.EURPRD10.PROD.OUTLOOK.COM ([fe80::f0d2:3945:47d4:747b%3]) with mapi id 15.20.2241.018; Thu, 12 Sep 2019 09:17:11 +0000 From: Rasmus Villemoes <rasmus.villemoes@prevas.dk> To: "u-boot@lists.denx.de" <u-boot@lists.denx.de> Thread-Topic: [PATCH 3/4] arm: mxs: be more careful when enabling gpmi_clk Thread-Index: AQHVaUrbOK7kNHF69EeBbQbZflejeQ== Date: Thu, 12 Sep 2019 09:17:11 +0000 Message-ID: <20190912091656.14301-4-rasmus.villemoes@prevas.dk> References: <20190912091656.14301-1-rasmus.villemoes@prevas.dk> In-Reply-To: <20190912091656.14301-1-rasmus.villemoes@prevas.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR0202CA0019.eurprd02.prod.outlook.com (2603:10a6:3:8c::29) To AM7PR10MB3478.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:131::7) x-mailer: git-send-email 2.20.1 authentication-results: spf=none (sender IP is ) smtp.mailfrom=Rasmus.Villemoes@prevas.se; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [81.216.59.226] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b0be0a4a-858b-4d0e-7ca7-08d73761fe3e x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:AM7PR10MB3480; x-ms-traffictypediagnostic: AM7PR10MB3480: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: <AM7PR10MB348063C95E3CCC0BC233C60D8AB00@AM7PR10MB3480.EURPRD10.PROD.OUTLOOK.COM> x-ms-oob-tlc-oobclassifiers: OLM:4714; x-forefront-prvs: 01583E185C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39850400004)(366004)(346002)(376002)(136003)(396003)(199004)(189003)(66556008)(66476007)(71200400001)(1076003)(64756008)(3846002)(4326008)(6116002)(5640700003)(2501003)(14444005)(6916009)(6512007)(52116002)(107886003)(2906002)(6486002)(7736002)(8936002)(5660300002)(256004)(25786009)(71190400001)(53936002)(8976002)(50226002)(14454004)(305945005)(2351001)(81166006)(36756003)(54906003)(186003)(478600001)(4744005)(66946007)(99286004)(66066001)(8676002)(81156014)(446003)(76176011)(102836004)(476003)(11346002)(6436002)(2616005)(44832011)(486006)(66446008)(316002)(42882007)(26005)(386003)(6506007); DIR:OUT; SFP:1102; SCL:1; SRVR:AM7PR10MB3480; H:AM7PR10MB3478.EURPRD10.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: prevas.se does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: jK4CtAXewGUvDo2lrVHWMBwgNFVJVBaU6u5b8DgIdTKwJ9bRv1B7IK3E1udzPHHPyIcodR0+OoET4qCQzRZ90nFFmRThYhYW28xw+fF/n/x6UE1XGOy6AM/vD+ZbnfWtH5ArVQifgI1F2ENrbI+rBpu6n6BHIvgpxVV1NxD4eGgXCxa9Td/BAXl8AAjoqQujYlWmMzSpnNkoQDyrHOfwAgHyTmv18jOUwgRCkGlcqh3gT9vPkY1+jwRzMfuRfO3zIZy/H+DLQBkJizSm/em0iXQm/URAuB65goy03ynBQ0C0b2axYsj18fj6zTQYZJ1yjvEBmi0r5wEn/bSL0/ODoeNqxv249HDw7qKQuRWb8usdXPmuTQlofqY2Lv15uDDGcUaN+7o4YKPqsmr/Vbxpmyz0YVUXrH19DdsodlpANuA= MIME-Version: 1.0 X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: b0be0a4a-858b-4d0e-7ca7-08d73761fe3e X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Sep 2019 09:17:11.5039 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9HtwEeAj7/eJ6UOW+GP3QG4/6qtpaYavhxTvkdvgpUTivpX/eE5TLEhMx7nrKz7vNwgrJvUi6bOAnnGWa9ekj+TtFEsz+qmNyLeZkVEENS4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR10MB3480 Cc: Rasmus Villemoes <Rasmus.Villemoes@prevas.se>, "NXP i.MX U-Boot Team" <uboot-imx@nxp.com>, Marek Vasut <marek.vasut+renesas@gmail.com> Subject: [U-Boot] [PATCH 3/4] arm: mxs: be more careful when enabling gpmi_clk X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
arm: mxs: mxs_set_gpmiclk
|
expand
|
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c index 585c53baf6..183aa40b6d 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c @@ -103,8 +103,11 @@ int arch_cpu_init(void) &clkctrl_regs->hw_clkctrl_clkseq_set); /* Set GPMI clock to ref_xtal / 1 */ + clrbits_le32(&clkctrl_regs->hw_clkctrl_gpmi, CLKCTRL_GPMI_CLKGATE); + while (readl(&clkctrl_regs->hw_clkctrl_gpmi) & CLKCTRL_GPMI_CLKGATE) + ; clrsetbits_le32(&clkctrl_regs->hw_clkctrl_gpmi, - CLKCTRL_GPMI_CLKGATE | CLKCTRL_GPMI_DIV_MASK, 1); + CLKCTRL_GPMI_DIV_MASK, 1); udelay(1000);
The data sheet says that the DIV field cannot change while the CLKGATE bit is set or modified. So do it a little more carefully, by first clearing the bit, waiting for that to appear, then setting the DIV field. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> --- arch/arm/cpu/arm926ejs/mxs/mxs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)