From patchwork Mon May 13 03:15:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 1098611 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LWvs3bxv"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="X3JFlnTw"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 452Qtn4bQhz9s4V for ; Mon, 13 May 2019 13:15:45 +1000 (AEST) 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=AiPy0F1tjh2qnk/zDQdHBn5hYWU9UTseSyl28CE4EQk=; b=LWvs3bxv8IiztD HHu4H1lJnNM5V6RVWgamcw4ZPy3puwWh2gTzfV45wTKsf4JtGHY/0gnbJp+3ueMWDzuZodBJC8AsG 7UT+ejnaNLLMDo/vDjGeRs5VPxqbu3DuEVzHvumzBPCxevYCR5gqXrU6oG4iTZNPXchv+mNKdqBE+ vet/QGp3VIX5sz5virMY9aAdJx55a1SyQV3Xauk9Ee4gAIyHAfRnBq8jGtCMFMQxV5/CSNiRbw2Fm 77cW4mU5YuF0wT7aqkZftaZEC46IDKqSZ5G6bAfJMwvUYFW8dfPb5cqdg2EoZERjlph3GpZQVadc6 oF0mjDfhI/E38WvkyN0A==; 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 1hQ1RG-0007Qu-HS; Mon, 13 May 2019 03:15:42 +0000 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQ1RD-0007QY-90 for linux-arm-kernel@lists.infradead.org; Mon, 13 May 2019 03:15:40 +0000 Received: by mail-qk1-x744.google.com with SMTP id z6so6301678qkl.10 for ; Sun, 12 May 2019 20:15:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Yd+HZMnsQ+5FsKeVzZLsE5zVu4hg4LnZqbae8xAM8eo=; b=X3JFlnTwX/NwbobzTjxupzz+FIc38NZWiimvaWfsTPwpogMtIMzPp2gxpMEFsSZMxT AtESXV2aBu4DC0RXIuz2dKlvXtjdjpbw6Znn0yCgkfC60DOSOtKfn4s8Doa6cN9Jj7Xk IF+OB6POOZMgw/TKhWizMAkUBbXV5wAXHzAS8a6VAodwOggWW8JeEoNmQvqaNs2PJMGo VwnivdC3KT4JIOCMKAS2NrzXYma94cZaXf2UUT7RL533tHn1OnfyqSmOr8laHWNfcK73 ByXnmlpNjGR1EG9nCoImLTT6vnM7NlmrenoAKG/Va4iC5WPGc/p5xLSmyObXHiZYkNBH dcLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Yd+HZMnsQ+5FsKeVzZLsE5zVu4hg4LnZqbae8xAM8eo=; b=qhKqq3xChAKBsjVC9O9T16kiG6/3/7bXPYe9l8ilHfvGQ+ejiuBlyeflg310SQw0Db FmRfB6Fi5AAQn+xNje0vAiXMG1z7ox1OFzaD+AsV+Vz49EzsVAem1cMvVKq6p+bq5clr +CCA6/C2vExZ6utgnpH7O+g4JaQInBaNvnJvm+XU7oDuKJKfY7oGtN9mKxg2dK+HXtuQ neZLToTUSZ65vR5lY2+jhDgj9IG0p510C2PCmcZyASOzop1EgDPaE8tOJ0e8mpM5/s/R K4ovyaG7/ZbYg8VWXlJm5w90u6Aqu3HsWd5b6VooiygDjwQW7A8hsl7MU8uw9oqEtATo c8RQ== X-Gm-Message-State: APjAAAWFFVdb3xGFzcOWGpsj6Ltgzo96yxxwvFMTJLD7F+G7NIe5/+v6 kVA1XjSIp8PXwfDDwT7hCSk= X-Google-Smtp-Source: APXvYqxlHSnuR40HD3WfHtCo8IyjnkzIu1nDKB3/VgfCw1ensYkYXwWlMXVkLTgynfwc29N6Bdv1kQ== X-Received: by 2002:a37:ba44:: with SMTP id k65mr20420998qkf.209.1557717336791; Sun, 12 May 2019 20:15:36 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:3c8:56cb:1049:60d2:137b]) by smtp.gmail.com with ESMTPSA id h16sm4257104qtk.1.2019.05.12.20.15.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 May 2019 20:15:35 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Subject: [PATCH v2] ARM: imx: cpuidle-imx6sx: Restrict the SW2ISO increase to i.MX6SX Date: Mon, 13 May 2019 00:15:31 -0300 Message-Id: <20190513031531.7879-1-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190512_201539_343977_DD7940BD X-CRM114-Status: GOOD ( 15.26 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:744 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cniedermaier@dh-electronics.com, anson.huang@nxp.com, stable@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, Fabio Estevam , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Since commit 1e434b703248 ("ARM: imx: update the cpu power up timing setting on i.mx6sx") some characters loss is noticed on i.MX6ULL UART as reported by Christoph Niedermaier. The intention of such commit was to increase the SW2ISO field for i.MX6SX only, but since cpuidle-imx6sx is also used on i.MX6UL/i.MX6ULL this caused unintended side effects on other SoCs. Fix this problem by keeping the original SW2ISO value for i.MX6UL/i.MX6ULL and only increase SW2ISO in the i.MX6SX case. Cc: stable@vger.kernel.org Fixes: 1e434b703248 ("ARM: imx: update the cpu power up timing setting on i.mx6sx") Reported-by: Christoph Niedermaier Signed-off-by: Fabio Estevam Tested-by: Sébastien Szymanski Tested-by: Christoph Niedermaier --- Changes since v1: - Simplify the code by using the C ternary operator so that the patch can be backported all the way to kernel 4.4 arch/arm/mach-imx/cpuidle-imx6sx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/cpuidle-imx6sx.c b/arch/arm/mach-imx/cpuidle-imx6sx.c index fd0053e47a15..4016b717da1b 100644 --- a/arch/arm/mach-imx/cpuidle-imx6sx.c +++ b/arch/arm/mach-imx/cpuidle-imx6sx.c @@ -15,6 +15,7 @@ #include "common.h" #include "cpuidle.h" +#include "hardware.h" static int imx6sx_idle_finish(unsigned long val) { @@ -110,7 +111,7 @@ int __init imx6sx_cpuidle_init(void) * except for power up sw2iso which need to be * larger than LDO ramp up time. */ - imx_gpc_set_arm_power_up_timing(0xf, 1); + imx_gpc_set_arm_power_up_timing(cpu_is_imx6sx() ? 0xf : 0x2, 1); imx_gpc_set_arm_power_down_timing(1, 1); return cpuidle_register(&imx6sx_cpuidle_driver, NULL);