From patchwork Thu Mar 16 14:03:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 95398 Delivered-To: patch@linaro.org Received: by 10.140.89.134 with SMTP id v6csp835800qgd; Thu, 16 Mar 2017 07:12:11 -0700 (PDT) X-Received: by 10.98.36.81 with SMTP id r78mr10502194pfj.178.1489673531380; Thu, 16 Mar 2017 07:12:11 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f16si5460392pli.29.2017.03.16.07.12.11; Thu, 16 Mar 2017 07:12:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752462AbdCPOML (ORCPT + 7 others); Thu, 16 Mar 2017 10:12:11 -0400 Received: from mail-wr0-f173.google.com ([209.85.128.173]:34117 "EHLO mail-wr0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752288AbdCPOMK (ORCPT ); Thu, 16 Mar 2017 10:12:10 -0400 Received: by mail-wr0-f173.google.com with SMTP id l37so32995169wrc.1 for ; Thu, 16 Mar 2017 07:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Os6S9kjYtrP2uh0d7RoztoYOLVgtIJbL6lKTiSeGKF4=; b=YnGBovSjMP2kRe3bgLf3xbX6CQ666Yvi0AOTVoabPJ2pP00cIcyjp2igHrfA/HpAN2 /SFkWnsoQ/c+i4pVeMCD9rgX5i1msKMXdpY6g/51vl74x32lCC6OEtqfsxZbPK0gbPW0 GWl/wGiKJjHzEdhE5E6iszvGMcnzOsf5o/PR4= 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; bh=Os6S9kjYtrP2uh0d7RoztoYOLVgtIJbL6lKTiSeGKF4=; b=Gr0Xix0nKNVZpPWBh5+tXMOEh4L1sVu79bwGVx/cnbh+AJD9OwbCKGMyTN13FYAGiT 1a/6HHd+tiK1IbwyTC6p+UqoTwoHhbkI4DTK7rdHkfbGb7W903VanEIneGoNXi1qkHlF lEDJgvKS9OdYkocgwp0ii7G+jKFKaKePUwQqxMfPluULrNH4itHtLmXolk6cPmOO+y3c JQxnlwvhQnjYozhwIm75UxBa7naAmmPhJ6a76reKlO7lPSNlG+qjR++Tjpj3KC7O5UlK hQiRZHcK2JKflncDQ+3EdZBTNLqhx+6FKJV8XhosPmFGJcxkdMfBeanD8DnVQzEGNOrx w+1A== X-Gm-Message-State: AFeK/H0aGfbS2/3xRT80fSPYauBS3j75HdmIba2d9v1FA9nwPMsgscjxBfiLGWYw51vcDXs7 X-Received: by 10.223.176.217 with SMTP id j25mr8922331wra.8.1489673119261; Thu, 16 Mar 2017 07:05:19 -0700 (PDT) Received: from localhost.localdomain (lft31-1-88-121-166-205.fbx.proxad.net. [88.121.166.205]) by smtp.gmail.com with ESMTPSA id y43sm6320369wrd.0.2017.03.16.07.05.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Mar 2017 07:05:18 -0700 (PDT) From: Daniel Lezcano To: xuwei5@hisilicon.com Cc: guodong.xu@linaro.org, linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: dts: hi6220: Reset the mmc hosts Date: Thu, 16 Mar 2017 15:03:24 +0100 Message-Id: <1489673004-11075-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The MMC hosts could be left in an unconsistent or uninitialized state from the firmware. Instead of assuming, the firmware did the right things, let's reset the host controllers. This change fixes a bug when the mmc2/sdio is initialized leading to a hung task: [ 242.704294] INFO: task kworker/7:1:675 blocked for more than 120 seconds. [ 242.711129] Not tainted 4.9.0-rc8-00017-gcf0251f #3 [ 242.716571] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 242.724435] kworker/7:1 D 0 675 2 0x00000000 [ 242.729973] Workqueue: events_freezable mmc_rescan [ 242.734796] Call trace: [ 242.737269] [] __switch_to+0xa8/0xb4 [ 242.742437] [] __schedule+0x1c0/0x67c [ 242.747689] [] schedule+0x40/0xa0 [ 242.752594] [] schedule_timeout+0x1c4/0x35c [ 242.758366] [] wait_for_common+0xd0/0x15c [ 242.763964] [] wait_for_completion+0x28/0x34 [ 242.769825] [] mmc_wait_for_req_done+0x40/0x124 [ 242.775949] [] mmc_wait_for_req+0xc0/0xf8 [ 242.781549] [] mmc_wait_for_cmd+0x6c/0x84 [ 242.787149] [] mmc_io_rw_direct_host+0x9c/0x114 [ 242.793270] [] sdio_reset+0x34/0x7c [ 242.798347] [] mmc_rescan+0x2fc/0x360 [ ... ] Cc: stable@vger.kernel.org Signed-off-by: Daniel Lezcano --- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 3 +++ 1 file changed, 3 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi index 470461d..1e5129b 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi @@ -774,6 +774,7 @@ clocks = <&sys_ctrl 2>, <&sys_ctrl 1>; clock-names = "ciu", "biu"; resets = <&sys_ctrl PERIPH_RSTDIS0_MMC0>; + reset-names = "reset"; bus-width = <0x8>; vmmc-supply = <&ldo19>; pinctrl-names = "default"; @@ -797,6 +798,7 @@ clocks = <&sys_ctrl 4>, <&sys_ctrl 3>; clock-names = "ciu", "biu"; resets = <&sys_ctrl PERIPH_RSTDIS0_MMC1>; + reset-names = "reset"; vqmmc-supply = <&ldo7>; vmmc-supply = <&ldo10>; bus-width = <0x4>; @@ -815,6 +817,7 @@ clocks = <&sys_ctrl HI6220_MMC2_CIUCLK>, <&sys_ctrl HI6220_MMC2_CLK>; clock-names = "ciu", "biu"; resets = <&sys_ctrl PERIPH_RSTDIS0_MMC2>; + reset-names = "reset"; bus-width = <0x4>; broken-cd; pinctrl-names = "default", "idle";