From patchwork Fri Nov 22 10:26:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 180017 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp60586ilf; Fri, 22 Nov 2019 03:11:42 -0800 (PST) X-Google-Smtp-Source: APXvYqw0tlppteLDjChWIRpo8YA0XaeRJmGj/TjWY5034WiPxku7/NKmvrjGC3NRngTOewmB75xt X-Received: by 2002:a05:6402:1543:: with SMTP id p3mr356922edx.304.1574421102187; Fri, 22 Nov 2019 03:11:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421102; cv=none; d=google.com; s=arc-20160816; b=Ky2c5bmADA3lRmf8PkcA6MDvqmL6ESGJNrgFsTSSSoLDY0ZcTux8t6sV0PxjdVRDJa JqZqmly/uxRTbgARRz028n2XgLbFi1vnIBlEIWz2ygOaCaULrCtgqTTyTtEyr/+24e2h mmXGDypBR2l7FblKiucEXyMkVBSbinuFo8deDreK9ocrNrTQLcVkttTcpiHmk/rEegPl n1gAHeph0TuCH7S0HIxHO+EaUQQW/go5qdiW9qoZuMXkMIaHj9/3hSXtN/A5dr5cBB7G Zu2SRjFplke20mIt3XZJTDnp/6N+c1XKPL8YFXg2ZnDrop5v1f8aLJUT7AnWNq/8PESX A8pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sgzwA2ud0aFMcLu6Lazkg0rW9dYEzUTwpTLJ+RkVfKk=; b=mcDzYC7r6tJcJZlblA4CuPv2qGfqDGeTeakY0nCerYaRsQE3eJeI8QvexlwIKlqWLS iteoLX18C7+pgqUEJbojgPx+t+/5OilDAvum8H06kFIeJYcJAHCquTuID9X+yx4OjZNr 0kpzTzkkOGTnlF/1JboY+frX6T3be04n6ulYiWjM0lJzGue14yerx/+pEgs6wqAp88P3 LXOzfMziSiwxFx3SsatH5z0OaOhQGl7ldey9NKJ/oXsac4/sD5MJgctW8ha9oZ255nsw yEdVgzqs0RxWumy16yZVmbNMJcYfuSygKGYYTaBp/HNPqyCnF9cbEa/dI6ZxXjAdqJ/g AAZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2FEWZjyj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6si3794744ejb.419.2019.11.22.03.11.41; Fri, 22 Nov 2019 03:11:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2FEWZjyj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730898AbfKVK7V (ORCPT + 26 others); Fri, 22 Nov 2019 05:59:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:50146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730637AbfKVK7R (ORCPT ); Fri, 22 Nov 2019 05:59:17 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3972C20706; Fri, 22 Nov 2019 10:59:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420356; bh=iOCWkkQyNZ9HFAZK0cqFlOadkurC8YTumm+nF+4sP6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2FEWZjyj+SNARVnVXICeEUnQ+ERB3V+T6Au0izBmeatzTFyiwfr//UlKiEX0eB32J qXcYRVFAOTlCcxXXZ5stTA9JgSsnFSxixQHOTDIL0bmxD+0gubPRKA6ZLcyaCAkz6q bSrxsDeYR7chZZl6NlrjPW2sVRS6hhRhfOBEHeqs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhen Lei , Will Deacon , Sasha Levin Subject: [PATCH 4.19 035/220] iommu/arm-smmu-v3: Fix unexpected CMD_SYNC timeout Date: Fri, 22 Nov 2019 11:26:40 +0100 Message-Id: <20191122100914.880014065@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhen Lei [ Upstream commit 0f02477d16980938a84aba8688a4e3a303306116 ] The condition break condition of: (int)(VAL - sync_idx) >= 0 in the __arm_smmu_sync_poll_msi() polling loop requires that sync_idx must be increased monotonically according to the sequence of the CMDs in the cmdq. However, since the msidata is populated using atomic_inc_return_relaxed() before taking the command-queue spinlock, then the following scenario can occur: CPU0 CPU1 msidata=0 msidata=1 insert cmd1 insert cmd0 smmu execute cmd1 smmu execute cmd0 poll timeout, because msidata=1 is overridden by cmd0, that means VAL=0, sync_idx=1. This is not a functional problem, since the caller will eventually either timeout or exit due to another CMD_SYNC, however it's clearly not what the code is supposed to be doing. Fix it, by incrementing the sequence count with the command-queue lock held, allowing us to drop the atomic operations altogether. Signed-off-by: Zhen Lei [will: dropped the specialised cmd building routine for now] Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- drivers/iommu/arm-smmu-v3.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 2.20.1 diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 40fbf20d69e5a..2ab7100bcff12 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -567,7 +567,7 @@ struct arm_smmu_device { int gerr_irq; int combined_irq; - atomic_t sync_nr; + u32 sync_nr; unsigned long ias; /* IPA */ unsigned long oas; /* PA */ @@ -964,14 +964,13 @@ static int __arm_smmu_cmdq_issue_sync_msi(struct arm_smmu_device *smmu) struct arm_smmu_cmdq_ent ent = { .opcode = CMDQ_OP_CMD_SYNC, .sync = { - .msidata = atomic_inc_return_relaxed(&smmu->sync_nr), .msiaddr = virt_to_phys(&smmu->sync_count), }, }; - arm_smmu_cmdq_build_cmd(cmd, &ent); - spin_lock_irqsave(&smmu->cmdq.lock, flags); + ent.sync.msidata = ++smmu->sync_nr; + arm_smmu_cmdq_build_cmd(cmd, &ent); arm_smmu_cmdq_insert_cmd(smmu, cmd); spin_unlock_irqrestore(&smmu->cmdq.lock, flags); @@ -2196,7 +2195,6 @@ static int arm_smmu_init_structures(struct arm_smmu_device *smmu) { int ret; - atomic_set(&smmu->sync_nr, 0); ret = arm_smmu_init_queues(smmu); if (ret) return ret; From patchwork Fri Nov 22 10:28:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 180009 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp45576ilf; Fri, 22 Nov 2019 03:01:19 -0800 (PST) X-Google-Smtp-Source: APXvYqz3lmDqrNzy0qTK20UtjlIoDBbMFSDMi2XFSry30mBE1yXHPBUaOxretUcZ+gCcjDTpdDHt X-Received: by 2002:aa7:d652:: with SMTP id v18mr288667edr.184.1574420479312; Fri, 22 Nov 2019 03:01:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420479; cv=none; d=google.com; s=arc-20160816; b=SGDR6ZyO03Ia7u0KtKTrXuaHF0H3TsS1ea1l2D3cZvWgE3z+CPsOhAtCDOrokhYdjJ jvsJMwThZ9K975togdy3/UJIVUN0ju8pJePoAWFZ6dA8qUPmdh3IC3BZEX2RqoXsBGtQ 4yyGSKW5SyMbVdQQskpw8ZfstdS5aQw1aH9MqDkbumqj+knlLq68yRJXQq9LSqs7d76L vJ1d7Wshb4+2SriE8sIDjojBYeb34js2rMetSpawbW9XkUWNtwnKATfrUPddFAmKl6ca wbdUtSqgHAZwdWCdFZ1+qHMINgNT6Ln44oMCwG1OEyu9h8ZBr+njMjLMgdKd1wgddZQZ 73bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=p4N49LKcLbeeN4z0kbve/pRWkCGAFfXQRBIHElvLPJE=; b=A1MUL1cp3XLLoRrtWVj5Xh5GJnR7qeB3/Nkju3GwEOM4rqmb0/s6+VBTbJKlLKgcJm 25qG7DqVkZfDGEV2F7wQPu+sv13LAM9GyPCJvnCnrAkowgbfd4Y8YUA/0pP/U0rp/cpf yGgi60oADyHx3vZe1cyo9A9LSwmH7eU+sFa1whEmnBWbL0s8bJpHvqIp+IAgUnwcPWVu stFPQup/dFuitcEZ+MpJrkRS/yw6rWgHdtehFYZrMHwZV76Xj1gzk4Kve/Ed9z6igM4Y FiZdl7/AIlzhMBLwJf9i8HwgEQVXeYKGSIARNiw4d/v5m5zKKaw0Ug+0wAME5qUTmJ50 gEiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lJYQaQZb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z15si3877630eju.310.2019.11.22.03.01.18; Fri, 22 Nov 2019 03:01:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lJYQaQZb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731163AbfKVLBR (ORCPT + 26 others); Fri, 22 Nov 2019 06:01:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:54048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731143AbfKVLBP (ORCPT ); Fri, 22 Nov 2019 06:01:15 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B3E8820706; Fri, 22 Nov 2019 11:01:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420475; bh=t/kBS8ZyburwAEd/tWcHp44RfmpPV30AzLZAShq5ZZk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lJYQaQZbRKt9Aj1Km/ZlLRQdqoJdBW/dWSwTIaQkBChP/IlUvZMTZkQO2PnE7xZzk h61LrDN4SeAhMIM2v9Qmb9L1UiyVSZbbOc3zFbeFLZfRRT8BGFR1X3Odjz9nrNqgg0 ASAwKO688ne0PZMA7oSDQ86nm+cwvnLqCjFEuxuY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Chanwoo Choi , Krzysztof Kozlowski , Sylwester Nawrocki , Sasha Levin Subject: [PATCH 4.19 117/220] clk: samsung: Use NOIRQ stage for Exynos5433 clocks suspend/resume Date: Fri, 22 Nov 2019 11:28:02 +0100 Message-Id: <20191122100921.147300962@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marek Szyprowski [ Upstream commit 70da9ee80228e6d98fd68e3c1db124c4461d283c ] SoC clock drivers should suspend after every other drivers in the system, which are using clocks and resume before them. The last stage for calling suspend device callbacks is NOIRQ stage and there exists driver, which use that state (dwmmc-exynos), so Exynos5433 clocks driver should also use it. During the same stage, clocks driver will be always suspended after its clients as a direct result of proper device probe order (deferred probe reorders the suspend call sequence). Signed-off-by: Marek Szyprowski Acked-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki Signed-off-by: Sasha Levin --- drivers/clk/samsung/clk-exynos5433.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c index 162de44df099b..426980514e679 100644 --- a/drivers/clk/samsung/clk-exynos5433.c +++ b/drivers/clk/samsung/clk-exynos5433.c @@ -5630,7 +5630,7 @@ static const struct of_device_id exynos5433_cmu_of_match[] = { static const struct dev_pm_ops exynos5433_cmu_pm_ops = { SET_RUNTIME_PM_OPS(exynos5433_cmu_suspend, exynos5433_cmu_resume, NULL) - SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; From patchwork Fri Nov 22 10:28:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 180010 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp45836ilf; Fri, 22 Nov 2019 03:01:28 -0800 (PST) X-Google-Smtp-Source: APXvYqzCQFyvf9UOHoZoJ1pWY3fH7M3CYXSqvTG7TNzs1wBzdZwd/NL4K0R1LF/c14Uvnxyayw7/ X-Received: by 2002:a17:906:edd5:: with SMTP id sb21mr20866407ejb.138.1574420488319; Fri, 22 Nov 2019 03:01:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420488; cv=none; d=google.com; s=arc-20160816; b=UAG+4lYWPjKH4IwMxMVXoVaTIISMUThwyjQ+uOu/AbQj9LjdtrzshpL/gDh4aCCuz0 Wg/idoOn9t98yCpNt4T6nRuGLbdT5lsK4rNOB5+pghVF6vmSyobM5i16aCsuq/v13M2r rRdupqRjxnniK85AyfiIfHaQUTcIUnn0KmHcuIOhNNMLGPhqEcu8NLpCwu8kS+ziwMe3 LkQbSrgzRDubQoZ58NkD9L5xpdkywkv1gTMyMf6BsnO9Wov4jKXYqUAPkgNAtUGQovGt Gu1CQO87B8JzGiVRVH2GykfVp3fEzio9HoIkbf9QuQd+s+YtOxgYhClJCCV3RBmU9qMj 4xtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xdLNdk4+V8rGQwOlFe7xcxbaGIB0P99c6UVbR632cyM=; b=WuUxQvC5GGfxBmyVf65hJ75zSLNUYH2ojRu8FnwL3LSs6GMAYeElNdSaPBttwW61xe CFJ1B7Mne49grkP6eI1BBI/CGeQJ4CMz1XkZsyneKrsN575KMpfvAqUaIJWuYe+qxQTF IVEyeSNx0hK29rirkBPNnMiqKtf9428ZWL3OBTxAi+OEz9KL7ujp/x164RlI2YAlthu2 +f277aLjIdN4GUHdfetc1cbayZmnQOIBqKijlTC03MH7333sFCRvr5/lLOq3vsUHsOFA PR9jOp1rtGWJTzHmoGpC7+zf5fBhlAOrOp9eSCihbgfBZccrb72WfuB0mlhV4U4yh8Z3 MWIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lljjz2Nc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6si4408862edf.256.2019.11.22.03.01.27; Fri, 22 Nov 2019 03:01:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lljjz2Nc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731188AbfKVLBY (ORCPT + 26 others); Fri, 22 Nov 2019 06:01:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:54244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731168AbfKVLBW (ORCPT ); Fri, 22 Nov 2019 06:01:22 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9107F20721; Fri, 22 Nov 2019 11:01:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420481; bh=3xOrFvEETPELfuNZgkHn7Y2v1ZZIxqMiDdP4KdOnb0M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lljjz2NclBzXgSlcRgvN5HzwrZ0gud83s77J2k+76NxGzuO2l43R2MzHTc48I832K 0zbOyG39d7fIe3wRiBKwZN0qXzMdsjclRFPaKWOpvwgt1kRwHUn/mcpBYAAgpWnJdx 6TeL9rL1pdXWRrP9SoalWwOn9TgZHyql/OLhtrqM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Sylwester Nawrocki , Sasha Levin Subject: [PATCH 4.19 119/220] clk: samsung: Use clk_hw API for calling clk framework from clk notifiers Date: Fri, 22 Nov 2019 11:28:04 +0100 Message-Id: <20191122100921.297126508@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marek Szyprowski [ Upstream commit 1da220e3a5d22fccda0bc8542997abc1d1741268 ] clk_notifier_register() documentation states, that the provided notifier callbacks associated with the notifier must not re-enter into the clk framework by calling any top-level clk APIs. Fix this by replacing clk_get_rate() calls with clk_hw_get_rate(), which is safe in this context. Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki Signed-off-by: Sasha Levin --- drivers/clk/samsung/clk-cpu.c | 6 +++--- drivers/clk/samsung/clk-cpu.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.20.1 diff --git a/drivers/clk/samsung/clk-cpu.c b/drivers/clk/samsung/clk-cpu.c index d2c99d8916b83..a5fddebbe5305 100644 --- a/drivers/clk/samsung/clk-cpu.c +++ b/drivers/clk/samsung/clk-cpu.c @@ -152,7 +152,7 @@ static int exynos_cpuclk_pre_rate_change(struct clk_notifier_data *ndata, struct exynos_cpuclk *cpuclk, void __iomem *base) { const struct exynos_cpuclk_cfg_data *cfg_data = cpuclk->cfg; - unsigned long alt_prate = clk_get_rate(cpuclk->alt_parent); + unsigned long alt_prate = clk_hw_get_rate(cpuclk->alt_parent); unsigned long alt_div = 0, alt_div_mask = DIV_MASK; unsigned long div0, div1 = 0, mux_reg; unsigned long flags; @@ -280,7 +280,7 @@ static int exynos5433_cpuclk_pre_rate_change(struct clk_notifier_data *ndata, struct exynos_cpuclk *cpuclk, void __iomem *base) { const struct exynos_cpuclk_cfg_data *cfg_data = cpuclk->cfg; - unsigned long alt_prate = clk_get_rate(cpuclk->alt_parent); + unsigned long alt_prate = clk_hw_get_rate(cpuclk->alt_parent); unsigned long alt_div = 0, alt_div_mask = DIV_MASK; unsigned long div0, div1 = 0, mux_reg; unsigned long flags; @@ -432,7 +432,7 @@ int __init exynos_register_cpu_clock(struct samsung_clk_provider *ctx, else cpuclk->clk_nb.notifier_call = exynos_cpuclk_notifier_cb; - cpuclk->alt_parent = __clk_lookup(alt_parent); + cpuclk->alt_parent = __clk_get_hw(__clk_lookup(alt_parent)); if (!cpuclk->alt_parent) { pr_err("%s: could not lookup alternate parent %s\n", __func__, alt_parent); diff --git a/drivers/clk/samsung/clk-cpu.h b/drivers/clk/samsung/clk-cpu.h index d4b6b517fe1b4..bd38c6aa38970 100644 --- a/drivers/clk/samsung/clk-cpu.h +++ b/drivers/clk/samsung/clk-cpu.h @@ -49,7 +49,7 @@ struct exynos_cpuclk_cfg_data { */ struct exynos_cpuclk { struct clk_hw hw; - struct clk *alt_parent; + struct clk_hw *alt_parent; void __iomem *ctrl_base; spinlock_t *lock; const struct exynos_cpuclk_cfg_data *cfg; From patchwork Fri Nov 22 10:29:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 180015 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp52561ilf; Fri, 22 Nov 2019 03:06:00 -0800 (PST) X-Google-Smtp-Source: APXvYqy3uWEZVlcGjz60wmvLziYkpEj2XnoEzA0yGUSaehZYuxzT7Meh/hHVdhXKACKqzwc4fV/M X-Received: by 2002:a05:6402:2058:: with SMTP id bc24mr323329edb.2.1574420760531; Fri, 22 Nov 2019 03:06:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574420760; cv=none; d=google.com; s=arc-20160816; b=abjdWkfyQGRNcsrhBzOso/WrtaSnxTayNpq/SEbwyul9kbcROV3AXBDQQiQNq/dBwv D0SWeVMAxA4BGICecN/hEZFImcir6DIIhYvwP3/Lto4HktgZdj8Z8HFYRUAFbKdoU2nM 1e/8TYlsgU/wBiQTrsoKclJ18NIK8uDFJFMq2SCGcoDPwWwGmvYxYXvg3tpF9J/qMlUN Xq1QaTEXjOZdmI+9A8ZaeipGaG00ZJz/zF7kQezjWrrEKSsx9jKjwXpMpGm/FnKGnz5f MpAbOQfWWopKBTf/aNqw+G7MB8tjEHhQ0shxk0j4MKKcnv4OKQ73+uaWJZTcYuNzycJm THew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZqHBXKOOCAiep3AK3PzKIkEiNsZwN5BhpMEVMq+D5e8=; b=TCoZxn1rWmEet6yCTbg2cJPWMy0G3Ep1vUKyo41X9oImrgDKZ94cekwCUuvfj8lywA I9hpYlhDb3vCWY8GqQl0DCr6pBJ+8Gpo/uUZk7s2MLmVEztjmMhR7Y424tPRyEFB+Og5 f2VgtE30vq9FnlQwhcL7yLXV3ULp4K5FXAy5+B7+IcTSezZ4z9EjxQFcVJYIltBR4vez Qo+fXKuvpWGpUBbyng+fdRs7qe4eRYO5F1sYn8HLyC0zp4ohvATb9sQ1dubUp3Ks4NwD 4f650xmTGj3EWHAR6XVITDfO81N+SyfFpXMWebzQG/nDL008VB+bW6rD4H4he5u+PjUP jUag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Py1K5Pvo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k13si6174296edj.324.2019.11.22.03.06.00; Fri, 22 Nov 2019 03:06:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Py1K5Pvo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729509AbfKVLF7 (ORCPT + 26 others); Fri, 22 Nov 2019 06:05:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:33802 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730559AbfKVLF4 (ORCPT ); Fri, 22 Nov 2019 06:05:56 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A254E2075E; Fri, 22 Nov 2019 11:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574420756; bh=Yk0BthtfhCwG5HdWsol18bF1E9VmSioqlac3A/a++5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Py1K5Pvo0lzKf2Xb+REbt0aQd/glp2O0hk/TfKKsmgLdA3NozDfh9bmJi8pKwvq2y i15YzNoUD6ggGsSseM6mfQL0Iqlxh7p9cz9MRF3dGu9HuULUTrgLfx3coBnF3G+6qw r8AHKkfENjHyqMU/teTMKr7zxWiOdiLzZ4mZCCuc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "H. Nikolaus Schaller" , Roger Quadros , Tony Lindgren , Sasha Levin Subject: [PATCH 4.19 213/220] ARM: dts: omap5: Fix dual-role mode on Super-Speed port Date: Fri, 22 Nov 2019 11:29:38 +0100 Message-Id: <20191122100928.991365476@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100912.732983531@linuxfoundation.org> References: <20191122100912.732983531@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Roger Quadros [ Upstream commit a763ecc15d0e37c3a15ff6825183061209832685 ] OMAP5's Super-Speed USB port has a software mailbox register that needs to be fed with VBUS and ID events from an external VBUS/ID comparator. Without this, Host role will not work correctly. Fixes: 656c1a65ab55 ("ARM: dts: omap5: enable OTG role for DWC3 controller") Reported-by: H. Nikolaus Schaller Signed-off-by: Roger Quadros Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- arch/arm/boot/dts/omap5-board-common.dtsi | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/arch/arm/boot/dts/omap5-board-common.dtsi b/arch/arm/boot/dts/omap5-board-common.dtsi index c2dc4199b4ec2..61a06f6add3ca 100644 --- a/arch/arm/boot/dts/omap5-board-common.dtsi +++ b/arch/arm/boot/dts/omap5-board-common.dtsi @@ -704,6 +704,7 @@ }; &dwc3 { + extcon = <&extcon_usb3>; dr_mode = "otg"; };