{"id":815109,"url":"http://patchwork.ozlabs.org/api/1.2/patches/815109/?format=json","web_url":"http://patchwork.ozlabs.org/project/rtc-linux/patch/20170918191014.28106-1-malat@debian.org/","project":{"id":9,"url":"http://patchwork.ozlabs.org/api/1.2/projects/9/?format=json","name":"Linux RTC development","link_name":"rtc-linux","list_id":"linux-rtc.vger.kernel.org","list_email":"linux-rtc@vger.kernel.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170918191014.28106-1-malat@debian.org>","list_archive_url":null,"date":"2017-09-18T19:10:13","name":"rtc: jz4740: fix loading of rtc driver","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"5ffc907560a121b90e8f4bae796401ffec1dabdb","submitter":{"id":70030,"url":"http://patchwork.ozlabs.org/api/1.2/people/70030/?format=json","name":"Mathieu Malaterre","email":"malat@debian.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/rtc-linux/patch/20170918191014.28106-1-malat@debian.org/mbox/","series":[{"id":3714,"url":"http://patchwork.ozlabs.org/api/1.2/series/3714/?format=json","web_url":"http://patchwork.ozlabs.org/project/rtc-linux/list/?series=3714","date":"2017-09-18T19:10:13","name":"rtc: jz4740: fix loading of rtc driver","version":1,"mbox":"http://patchwork.ozlabs.org/series/3714/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/815109/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/815109/checks/","tags":{},"related":[],"headers":{"Return-Path":"<linux-rtc-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-rtc-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xwwZj2Pdbz9sPr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 05:10:31 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751588AbdIRTKb (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tMon, 18 Sep 2017 15:10:31 -0400","from smtp3-g21.free.fr ([212.27.42.3]:8028 \"EHLO smtp3-g21.free.fr\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751585AbdIRTKa (ORCPT <rfc822;linux-rtc@vger.kernel.org>);\n\tMon, 18 Sep 2017 15:10:30 -0400","from macbookpro.malat.net (unknown [78.225.226.121])\n\tby smtp3-g21.free.fr (Postfix) with ESMTP id E56EA13F8EF;\n\tMon, 18 Sep 2017 21:10:27 +0200 (CEST)","by macbookpro.malat.net (Postfix, from userid 1000)\n\tid 573B910C089F; Mon, 18 Sep 2017 21:10:27 +0200 (CEST)"],"From":"Mathieu Malaterre <malat@debian.org>","To":"Ralf Baechle <ralf@linux-mips.org>","Cc":"Alex Smith <alex.smith@imgtec.com>, Mathieu Malaterre <malat@debian.org>,\n\tZubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>,\n\tAlessandro Zummo <a.zummo@towertech.it>,\n\tAlexandre Belloni <alexandre.belloni@free-electrons.com>,\n\tlinux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org","Subject":"[PATCH] rtc: jz4740: fix loading of rtc driver","Date":"Mon, 18 Sep 2017 21:10:13 +0200","Message-Id":"<20170918191014.28106-1-malat@debian.org>","X-Mailer":"git-send-email 2.11.0","Sender":"linux-rtc-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-rtc.vger.kernel.org>","X-Mailing-List":"linux-rtc@vger.kernel.org"},"content":"The current timeout for waiting for WRDY is not always sufficient. Always\nincrease it to 10000 even on JZ4740. This is technically only required on\nJZ4780, where the current symptoms seen after a hard reboot are:\n\n  jz4740-rtc 10003000.rtc: rtc core: registered 10003000.rtc as rtc0\n  jz4740-rtc 10003000.rtc: Could not write to RTC registers\n  jz4740-rtc: probe of 10003000.rtc failed with error -5\n\nSuggested-by: Alex Smith <alex.smith@imgtec.com>\nCc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>\nSigned-off-by: Mathieu Malaterre <malat@debian.org>\n---\n drivers/rtc/rtc-jz4740.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)","diff":"diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c\nindex c9536fb0ba4a..ff65a7d2b9c9 100644\n--- a/drivers/rtc/rtc-jz4740.c\n+++ b/drivers/rtc/rtc-jz4740.c\n@@ -82,7 +82,7 @@ static inline uint32_t jz4740_rtc_reg_read(struct jz4740_rtc *rtc, size_t reg)\n static int jz4740_rtc_wait_write_ready(struct jz4740_rtc *rtc)\n {\n \tuint32_t ctrl;\n-\tint timeout = 1000;\n+\tint timeout = 10000;\n \n \tdo {\n \t\tctrl = jz4740_rtc_reg_read(rtc, JZ_REG_RTC_CTRL);\n@@ -94,7 +94,7 @@ static int jz4740_rtc_wait_write_ready(struct jz4740_rtc *rtc)\n static inline int jz4780_rtc_enable_write(struct jz4740_rtc *rtc)\n {\n \tuint32_t ctrl;\n-\tint ret, timeout = 1000;\n+\tint ret, timeout = 10000;\n \n \tret = jz4740_rtc_wait_write_ready(rtc);\n \tif (ret != 0)\n","prefixes":[]}