From patchwork Fri Nov 16 10:46:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai Prakash Ranjan X-Patchwork-Id: 10685889 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7442E109C for ; Fri, 16 Nov 2018 10:46:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 611CA28ECB for ; Fri, 16 Nov 2018 10:46:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 509BA2CFF8; Fri, 16 Nov 2018 10:46:54 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=unavailable 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 DE7C628ECB for ; Fri, 16 Nov 2018 10:46:53 +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: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:In-Reply-To:References: List-Owner; bh=a3n27nU++kVLFEIPpqAGJ7nyHPmpQpqvLRNGG0XVz6Q=; b=UmUljeONdzPhMy 0mJQNW2yliVDYyn3fsVcRNi0bRDP86v3KYgnuKtCqYtf1a2elYOswds0WQVGgyvS0EyNdwoW093Ml YGtH/ANrMd7n0TqUT1eV8J/g8kOyw5ilEdCUhvCFD22DLOMtFGscaLCqCNXO3ZqI7wJSfzek9cbwB 8VxSFeGroTiOFqm9ZAUcwpB1WQrPHWTZ7BN5bBAK+Lerq2s75XeTZq5C13DQjnsMoHQGMCZ7qrGj+ 5iIjaMws9dAUXhHvEFiWCH9KTv1blokKrArweZF59FdIgkTi2M9XTG5gOVGCwWdJVHg3N+VDqKumt OIHy7sFie4hAK2q362BQ==; 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 1gNbeA-0004XU-V6; Fri, 16 Nov 2018 10:46:46 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNbeA-0004XK-3T for linux-arm-kernel@bombadil.infradead.org; Fri, 16 Nov 2018 10:46:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=J0dnQejxNUKH/2ekofsQPjSCc6z3WeEazZFp3rpoi70=; b=UkiTTZBLpsyB5yn+TIkgFSobbJ bBEfHzP2OmuExc53CXcI8CVFgcWB8unY4sLYfxtWBMBTSgDHoiMgUXPyj/tpruywKvOF+sjk91Gks kkt4rLXSp7WeejITQZNECUJfMDRkrioF1EhcwhF++WzYLMRunxXdBE0xJnHIm42MTBjwS62pshTru Wsa69+Nv3L6hCF3bDc63HtwHYcvkZhYTfe9JlxGBxUXiab79vPLc7upDn5vBabq3HwenXvVC1E8pW 0ikVVxOiiaI/SldjAtv9rQh5R0ZHqdjq/xuZtp7Bj3rPbljVDc88AQf+BZ8qe44LsJjfGK2Ywehz0 x3aXkdhw==; Received: from smtp.codeaurora.org ([198.145.29.96]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNbe6-00066J-SI for linux-arm-kernel@lists.infradead.org; Fri, 16 Nov 2018 10:46:44 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id AA72E6035F; Fri, 16 Nov 2018 10:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1542365189; bh=KZDdwJansQWtKemCRbRaUQzV7yoBvIux5R+MhFTiRSk=; h=From:To:Cc:Subject:Date:From; b=mXlhIOiHRX6979d6wn5W2zsB3yX+hvOxD7UqEghX5LHQsV+4uQ5u0Boz8+/rTQO4D wLgESa5ePZGw7o/Djax1Ll2FkmcnXv3tWwK14NMhgtARWtlKHRn+mnUvqFQAevHDAM dHrRI7KKk+hDlzBjeS8yjzuOqKD978WixG83+J04= Received: from blr-ubuntu-253.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2B0EE6035F; Fri, 16 Nov 2018 10:46:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1542365188; bh=KZDdwJansQWtKemCRbRaUQzV7yoBvIux5R+MhFTiRSk=; h=From:To:Cc:Subject:Date:From; b=cjm0AILloEuF3iYPWlXjJJ7bvNzmU08/fqIdWhMcN5r9kV5fZ7Xi+ecKk2z34AgQd KofjgMzzMOyePebuJBWGJx6absCdw7zg+p3W7zbAiEY2tOKmZjOf4EDQFmDRxxakyD WULy19HH6b0ERdY8yskzYpSYTMHKa0TmSmMBE0I8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2B0EE6035F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=saiprakash.ranjan@codeaurora.org From: Sai Prakash Ranjan To: Viresh Kumar , srinivas.kandagatla@linaro.org, Stephen Boyd , Michael Turquette , Viresh Kumar , Steven Rostedt , Rob Herring , Joel Fernandes , Rajendra Nayak , Greg Kroah-Hartman Subject: [PATCH] boot_constraint: Add constraints for earlycon on dragonboard 410c Date: Fri, 16 Nov 2018 16:16:07 +0530 Message-Id: <20181116104607.26671-1-saiprakash.ranjan@codeaurora.org> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181116_104643_174201_B20AB488 X-CRM114-Status: GOOD ( 13.47 ) 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: Sai Prakash Ranjan , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Sibi Sankar , Vivek Gautam , 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 iface clock is shared with other drivers, which may reconfigure this before the serial driver comes up. This may lead to crashes like the one below where GCC_BLSP1_AHB_CLK is same across multiple drivers like bam dma. <0>[ 3.164471] Internal error: synchronous external abort: 96000010 [#1] PREEMPT SMP <4>[ 3.164479] Modules linked in: <4>[ 3.164495] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.19.0-rc8-00008-ge033b9909fff-dirty #175 <4>[ 3.164501] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) <4>[ 3.164508] pstate: 40000085 (nZcv daIf -PAN -UAO) <4>[ 3.164514] pc : msm_read.isra.2+0x20/0x50 <4>[ 3.164520] lr : msm_read.isra.2+0x1c/0x50 <4>[ 3.164526] sp : ffff000008033a50 <4>[ 3.164531] x29: ffff000008033a50 x28: ffff000009486018 <4>[ 3.164548] x27: 0000000000000001 x26: ffff7dfffe7ff070 <4>[ 3.164565] x25: 0000000000000034 x24: ffff000009486000 <4>[ 3.164582] x23: 0000000000000000 x22: ffff00000978e190 <4>[ 3.164599] x21: ffff0000095e8228 x20: 0000000000000034 <4>[ 3.164616] x19: ffff7dfffe7ff008 x18: ffffffffffffffff <4>[ 3.164632] x17: 0000000000000000 x16: 0000000000000000 <4>[ 3.164649] x15: ffff0000094a96c8 x14: ffff00008978e6bf <4>[ 3.164666] x13: ffff00000978e6cd x12: 0000000000000038 <4>[ 3.164683] x11: ffff0000094c6000 x10: 0000000000000c24 <4>[ 3.164699] x9 : ffff80003c89b400 x8 : ffff000008033970 <4>[ 3.164716] x7 : ffff80000eb04100 x6 : 00000000000af304 <4>[ 3.164732] x5 : 0000000000000c40 x4 : ffff80003c06f000 <4>[ 3.164750] x3 : ffff80003c89b498 x2 : 0000000000000000 <4>[ 3.164766] x1 : ffff80003ca68000 x0 : 0000000000000800 <0>[ 3.164785] Process swapper/0 (pid: 1, stack limit = 0x(____ptrval____)) <4>[ 3.164791] Call trace: <4>[ 3.164797] msm_read.isra.2+0x20/0x50 <4>[ 3.164804] msm_reset_dm_count+0x44/0x80 <4>[ 3.164810] __msm_console_write+0x1c8/0x1d0 <4>[ 3.164816] msm_serial_early_write_dm+0x3c/0x50 <4>[ 3.164823] console_unlock.part.6+0x468/0x528 <4>[ 3.164829] vprintk_emit+0x210/0x218 <4>[ 3.164835] vprintk_default+0x48/0x58 <4>[ 3.164841] vprintk_func+0xf0/0x1c0 <4>[ 3.164847] printk+0x74/0x94 <4>[ 3.164853] sci_init+0x24/0x3c <4>[ 3.164859] do_one_initcall+0x54/0x248 <4>[ 3.164866] kernel_init_freeable+0x210/0x378 <4>[ 3.164872] kernel_init+0x18/0x118 <4>[ 3.164878] ret_from_fork+0x10/0x1c <0>[ 3.164884] Code: aa1e03e0 8b214273 97e616f7 d503201f (b9400260) Link: https://lore.kernel.org/lkml/1cae8f10-55f5-20ce-9105-30af6f88bd6e@codeaurora.org/ Signed-off-by: Sai Prakash Ranjan --- This is purely dependent on boot constraint subsystem by Viresh. Link: https://lore.kernel.org/lkml/cover.1519380923.git.viresh.kumar@linaro.org/ --- drivers/soc/qcom/boot_constraint.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/soc/qcom/boot_constraint.c b/drivers/soc/qcom/boot_constraint.c index ca01eb50d9a9..c4e580a118f0 100644 --- a/drivers/soc/qcom/boot_constraint.c +++ b/drivers/soc/qcom/boot_constraint.c @@ -49,6 +49,10 @@ static struct dev_boot_constraint_supply_info vddio_info = { .name = "vddio" }; +static struct dev_boot_constraint_clk_info uart_iface_clk_info = { + .name = "iface", +}; + static struct dev_boot_constraint constraints_mdss[] = { { .type = DEV_BOOT_CONSTRAINT_PM, @@ -92,6 +96,13 @@ static struct dev_boot_constraint constraints_dsi[] = { }, }; +static struct dev_boot_constraint constraints_uart[] = { + { + .type = DEV_BOOT_CONSTRAINT_CLK, + .data = &uart_iface_clk_info, + }, +}; + static struct dev_boot_constraint_of constraints[] = { { .compat = "qcom,mdss", @@ -105,6 +116,10 @@ static struct dev_boot_constraint_of constraints[] = { .compat = "qcom,mdss-dsi-ctrl", .constraints = constraints_dsi, .count = ARRAY_SIZE(constraints_dsi), + }, { + .compat = "qcom,msm-uartdm-v1.4", + .constraints = constraints_uart, + .count = ARRAY_SIZE(constraints_uart), }, };