{"id":806641,"url":"http://patchwork.ozlabs.org/api/1.0/patches/806641/?format=json","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.0/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<1503935193-28474-1-git-send-email-agust@denx.de>","date":"2017-08-28T15:46:32","name":"[U-Boot,1/2] imx: timer: don't clear the GPT control register multiple times","commit_ref":"ae64226dbec2a50a2d88027018c9bd25b20c4ae0","pull_url":null,"state":"accepted","archived":false,"hash":"6e09c10c42d803b252980b7b416953fa0a9dbb86","submitter":{"id":872,"url":"http://patchwork.ozlabs.org/api/1.0/people/872/?format=json","name":"Anatolij Gustschin","email":"agust@denx.de"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1503935193-28474-1-git-send-email-agust@denx.de/mbox/","series":[{"id":202,"url":"http://patchwork.ozlabs.org/api/1.0/series/202/?format=json","date":"2017-08-28T15:46:32","name":"[U-Boot,1/2] imx: timer: don't clear the GPT control register multiple times","version":1,"mbox":"http://patchwork.ozlabs.org/series/202/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/806641/checks/","tags":{},"headers":{"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;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xgx2q4Sbyz9sNr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 01:46:42 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid D7F52C22521; Mon, 28 Aug 2017 15:46:26 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 8DE16C22029;\n\tMon, 28 Aug 2017 15:46:24 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 468D0C2244C; Mon, 28 Aug 2017 15:46:21 +0000 (UTC)","from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10])\n\tby lists.denx.de (Postfix) with ESMTPS id B7B62C2244C\n\tfor <u-boot@lists.denx.de>; Mon, 28 Aug 2017 15:46:21 +0000 (UTC)","from frontend01.mail.m-online.net (unknown [192.168.8.182])\n\tby mail-out.m-online.net (Postfix) with ESMTP id 3xgx2P3pR6z1qwwv;\n\tMon, 28 Aug 2017 17:46:21 +0200 (CEST)","from localhost (dynscan1.mnet-online.de [192.168.6.70])\n\tby mail.m-online.net (Postfix) with ESMTP id 3xgx2P3C9Cz3jgYN;\n\tMon, 28 Aug 2017 17:46:21 +0200 (CEST)","from mail.mnet-online.de ([192.168.8.182])\n\tby localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id Kk9zO1HxaGCu; Mon, 28 Aug 2017 17:46:20 +0200 (CEST)","from crub.agik.hopto.org (p4FCB44C5.dip0.t-ipconnect.de\n\t[79.203.68.197]) (using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mail.mnet-online.de (Postfix) with ESMTPSA;\n\tMon, 28 Aug 2017 17:46:20 +0200 (CEST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,\n\tRCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","X-Virus-Scanned":"amavisd-new at mnet-online.de","X-Auth-Info":"g9BzysQM5ZypMGyCgQN3Z2AUR1s/mx/ndD6HAD0LKL8=","From":"Anatolij Gustschin <agust@denx.de>","To":"u-boot@lists.denx.de","Date":"Mon, 28 Aug 2017 17:46:32 +0200","Message-Id":"<1503935193-28474-1-git-send-email-agust@denx.de>","X-Mailer":"git-send-email 2.7.4","Subject":"[U-Boot] [PATCH 1/2] imx: timer: don't clear the GPT control\n\tregister multiple times","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>,\n\t<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>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","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>"},"content":"There is no need to clear the control register 100 times in a\nloop, a single zero write clears the register. I didn't find any\njustification why clearing this register in a loop is needed\n(no info in i.MX6 errata or GPT timer linux driver, linux driver\nuses single write to clear this control register).\n\nSigned-off-by: Anatolij Gustschin <agust@denx.de>\n---\n arch/arm/mach-imx/timer.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)","diff":"diff --git a/arch/arm/mach-imx/timer.c b/arch/arm/mach-imx/timer.c\nindex 9b01114..69dbf3c 100644\n--- a/arch/arm/mach-imx/timer.c\n+++ b/arch/arm/mach-imx/timer.c\n@@ -74,8 +74,7 @@ int timer_init(void)\n \t__raw_writel(GPTCR_SWR, &cur_gpt->control);\n \n \t/* We have no udelay by now */\n-\tfor (i = 0; i < 100; i++)\n-\t\t__raw_writel(0, &cur_gpt->control);\n+\t__raw_writel(0, &cur_gpt->control);\n \n \ti = __raw_readl(&cur_gpt->control);\n \ti &= ~GPTCR_CLKSOURCE_MASK;\n","prefixes":["U-Boot","1/2"]}