Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp469036img; Thu, 21 Mar 2019 02:02:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxG5Z6mI67R1kRFMkTWurw3+5xCvZzJgjeMf6JFJ1BxykuK1Go4cJ9jn3av/UWfPqhfi9G2 X-Received: by 2002:a63:e306:: with SMTP id f6mr2325203pgh.263.1553158965905; Thu, 21 Mar 2019 02:02:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553158965; cv=none; d=google.com; s=arc-20160816; b=nReIbnG+qOPqQRHlV8grDAXtrNxLFzUEcFYrNgZw0cpW7QLz/3QyaWhY4r8M6JppO1 M7L3XwdAN0bTGtLjin+ka4GKLYr3CHqOyieh29INEhr3pgo4ZL/WVUNteMtpd3xrFqU2 RkLaYevJOfg3zgrDe75XC/+hMvqseShoFUatTEN8X6/WpFCf4THKnHNoEDyHnKjo9NPV V1zWkFNfWxv92C9j4KeQHC0tWUbdQLicY0O5f+qa6Ajqj9LLsWz13rBA1RB3kVsVgp62 5CeNTerJgTj/n2GO9PBPptIxsdCIcperYSt8Oc7USYWcwFSOfMzk97wTy76Nw+U1nST7 2Tkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=8+yQppJTTe/pk5v0k1esXlWZMsBnCPEdRVOFWj5sSpc=; b=rxSS5mnD607D6iBHSyRKXYCzRPxFagrbb6MAwkUr+3b2ACGir40s44u507xDmKb3du zzfu0/Zm2o4mjo6p45WuHJh9bdyqvQHetr2OS/STFjHQRJ8+NTPwphC2DzXRbY6pVR3t L29xNKlJzoz3T7K+j5G/ksw1sOd3pHgTbtQgDdMFAtUNF4C0FWvy1ndA7/+ukZ0xAsF3 AMU2RlA/E+AwpOuBxEk1dcMg138ItE+bvYx4/A1CG6xhwHoQ/YERu6l6KsGro4JqhvrB 71ekl8Xgrt966Y7JLWjUGKYNTjoRkbl6qY15cPMH1Ezd7qnefMaQ3eQjAXlZbBM9UU98 da/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=JgfmZGZP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1si3748277pgp.378.2019.03.21.02.02.30; Thu, 21 Mar 2019 02:02:45 -0700 (PDT) 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=@samsung.com header.s=mail20170921 header.b=JgfmZGZP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728016AbfCUJBX (ORCPT + 99 others); Thu, 21 Mar 2019 05:01:23 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:43875 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725985AbfCUJBX (ORCPT ); Thu, 21 Mar 2019 05:01:23 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190321090121euoutp025705c2b4454308e09a78c8c51adc59eb~N7cYgXD-f1403714037euoutp02l; Thu, 21 Mar 2019 09:01:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190321090121euoutp025705c2b4454308e09a78c8c51adc59eb~N7cYgXD-f1403714037euoutp02l DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1553158881; bh=8+yQppJTTe/pk5v0k1esXlWZMsBnCPEdRVOFWj5sSpc=; h=From:To:Cc:Subject:Date:References:From; b=JgfmZGZPskedRNLFZRPOsqP+hlBgKgGOhd6/UKr+/6Nj++uUEcvGagY0ohQxLLH5p 3pDgdlxS2PSMyRJHVTAQty89rc8PVKtArTLWc3Edd8WMrWFRWByC309zWGwhDyFvkp dTm0IGNlHZPieXV/IGwlbjWzP6LKiDK3aGLVDH5g= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190321090121eucas1p14596fdf5f851e2a120fcabe8e6015627~N7cYACYDV2911429114eucas1p10; Thu, 21 Mar 2019 09:01:21 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id EA.54.04294.0E2539C5; Thu, 21 Mar 2019 09:01:20 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190321090120eucas1p1d5122777e84f4e3c965946a8c5aead8b~N7cXco60s1997819978eucas1p19; Thu, 21 Mar 2019 09:01:20 +0000 (GMT) X-AuditID: cbfec7f4-835ff700000010c6-47-5c9352e07b23 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E8.36.04128.0E2539C5; Thu, 21 Mar 2019 09:01:20 +0000 (GMT) Received: from AMDC2765.digital.local ([106.120.51.73]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0POP00FDEL24A020@eusync1.samsung.com>; Thu, 21 Mar 2019 09:01:20 +0000 (GMT) From: Marek Szyprowski To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , MyungJoo Ham , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Lukasz Luba , Markus Reichl Subject: [PATCH] PM / devfreq: exynos-bus: Suspend all devices on system shutdown Date: Thu, 21 Mar 2019 10:01:10 +0100 Message-id: <20190321090110.26506-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrAIsWRmVeSWpSXmKPExsWy7djPc7oPgibHGKxebGWxccZ6VovrX56z Wpw/v4Hd4laDjMXlXXPYLD73HmG0mHF+H5PFyyM/GC3WHrnLbnG7cQWbA5fHrTv1HptWdbJ5 HHy3h8mjb8sqRo/Pm+QCWKO4bFJSczLLUov07RK4Mk7uPcRS8Jm7ovn6CbYGxj+cXYycHBIC JhJvXq9h7WLk4hASWMEoMXnNdkYI5zOjxNau6ywwVVs3PmKCSCxjlDjw+C6U859R4lxLLxtI FZuAoUTX2y4wW0QgXuL6n2MsIEXMAluZJLpb5zCDJIQFgiX2PLsDVsQioCpxedEeJhCbV8BW 4tTfc0wQ6+QlVm84wAzSLCHQwSax+f0cNoiEi0T7ha+sELaMxOXJ3SwQRc2MEg/PrWWHcHoY JS43zWCEqLKWOHz8IlgHswCfxKRt04HGcgDFeSU62oQgSjwkts28C7ZZSCBW4srCL0wTGMUX MDKsYhRPLS3OTU8tNspLLdcrTswtLs1L10vOz93ECIy30/+Of9nBuOtP0iFGAQ5GJR7eCIdJ MUKsiWXFlbmHGCU4mJVEeE1sJ8cI8aYkVlalFuXHF5XmpBYfYpTmYFES561meBAtJJCeWJKa nZpakFoEk2Xi4JRqYPThnGvufi6sanE7W0GdhsWO+MYpKXFv8uw43Pbz3n3uLPliE9sBI+Wb YQ9ebF0YnlI+6e7U2Fuye1beWCwu/dutqvmTTMLO35s0ngj4vZqTfuXbgvhlOd9O/p3deTRM sbTKRunD+hltcVpVE0WfqTx963ki9LIhX+StnbmdzbP2s4s2GvaeDldiKc5INNRiLipOBAAP oajlswIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNJMWRmVeSWpSXmKPExsVy+t/xy7oPgibHGDyYqWSxccZ6VovrX56z Wpw/v4Hd4laDjMXlXXPYLD73HmG0mHF+H5PFyyM/GC3WHrnLbnG7cQWbA5fHrTv1HptWdbJ5 HHy3h8mjb8sqRo/Pm+QCWKO4bFJSczLLUov07RK4Mk7uPcRS8Jm7ovn6CbYGxj+cXYycHBIC JhJbNz5i6mLk4hASWMIosWTqTnaQhJBAI5PE5te1IDabgKFE19suti5GDg4RgXiJk9NqQeqZ BbYzSex9+oEJpEZYIFhiz7M7bCA2i4CqxOVFe8DivAK2Eqf+nmOCWCYvsXrDAeYJjFwLGBlW MYqklhbnpucWG+kVJ+YWl+al6yXn525iBAbJtmM/t+xg7HoXfIhRgINRiYd3gcmkGCHWxLLi ytxDjBIczEoivCa2k2OEeFMSK6tSi/Lji0pzUosPMUpzsCiJ8543qIwSEkhPLEnNTk0tSC2C yTJxcEo1MCZ92m1wz1in1eDkDg/n19lX/u9+HtE+fX7ahEau9TNzt05+q/Ps22u1ZaeE9zSu 4l9oo7JVml3h2/8LR9YfWz9DSolHWGmDzHoFV8Nl0s/fRc8WPvck1vv44ch0+eRlE9YcnmIl fe6J/OdrrecUNxyf7qW0YdLK1Ru/+vgs57laf/Hv76s7LI5fUGIpzkg01GIuKk4EAEZWvMcO AgAA X-CMS-MailID: 20190321090120eucas1p1d5122777e84f4e3c965946a8c5aead8b CMS-TYPE: 201P X-CMS-RootMailID: 20190321090120eucas1p1d5122777e84f4e3c965946a8c5aead8b References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Force all Exynos buses to safe operation points before doing the system reboot operation. There are board on which some aggressive power saving operation points are behind the capabilities of the bootloader to properly reset the hardware and boot the board. This way one can avoid board crash early after reboot. This fixes reboot issue on OdroidU3 board both with eMMC and SD boot. Reported-by: Markus Reichl Signed-off-by: Marek Szyprowski --- This is an alternative to https://patchwork.kernel.org/patch/10781433/ limited only to Exynos-bus driver. --- drivers/devfreq/exynos-bus.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index c25658b26598..486cc5b422f1 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -514,6 +514,13 @@ static int exynos_bus_probe(struct platform_device *pdev) return ret; } +static void exynos_bus_shutdown(struct platform_device *pdev) +{ + struct exynos_bus *bus = dev_get_drvdata(&pdev->dev); + + devfreq_suspend_device(bus->devfreq); +} + #ifdef CONFIG_PM_SLEEP static int exynos_bus_resume(struct device *dev) { @@ -556,6 +563,7 @@ MODULE_DEVICE_TABLE(of, exynos_bus_of_match); static struct platform_driver exynos_bus_platdrv = { .probe = exynos_bus_probe, + .shutdown = exynos_bus_shutdown, .driver = { .name = "exynos-bus", .pm = &exynos_bus_pm, -- 2.17.1