From patchwork Tue Oct 25 21:47:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 9395635 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B1C8A60231 for ; Tue, 25 Oct 2016 21:49:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86B4B2975E for ; Tue, 25 Oct 2016 21:49:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79F3429775; Tue, 25 Oct 2016 21:49:41 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EEEAE2975E for ; Tue, 25 Oct 2016 21:49:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bz9Zn-0003pg-Gl; Tue, 25 Oct 2016 21:48:07 +0000 Received: from mail-pf0-x229.google.com ([2607:f8b0:400e:c00::229]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bz9Zg-0003o1-E6 for linux-arm-kernel@lists.infradead.org; Tue, 25 Oct 2016 21:48:04 +0000 Received: by mail-pf0-x229.google.com with SMTP id s8so125981859pfj.2 for ; Tue, 25 Oct 2016 14:47:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LAiEX4gYoOAxzO7jmv4Y59vTuwKyEm47QAmEj2Mo4Bw=; b=qNewgdC3cp+tUZEOfPLsIHHcYhYgsh0+5mIHsOWaiV3R5N0vTrsVgWlUYvXFir0Kjg yKGfh9zF/1d+8sOd79S5cYXdkIqBQsRGqDa6ZKbyR9R4m2MZ7ShF92Wd7AXO/snFlUg6 I7YgiC7UgWuoMjqaDIb14BaKPKiCFnhOmXp1++Yj4HB+YVu7GOKbY0jpLoaT+LjFYiUp Gsx4s7TTfI+AgaqVsTFntyB4hz4WIE0Vfsq1CuCNl6WtKDfmpeWTM4MOPviRl8h5EaxW zuQ/A6Ef1wv/rXWVIldUvsOfXwpn9SVW75BG4B1foRxmBGX6K0oqhQ8UoUzSkiAtvLUO Re+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LAiEX4gYoOAxzO7jmv4Y59vTuwKyEm47QAmEj2Mo4Bw=; b=BiaenzWB+RL8osq3ft5uUOiu4xWI1HEB3ZSHML/rXeGdGXo8REW9zh65qJ7Knv8hOH v8K4CBGTCuIC13lhfjALzp3XN5YihRJ4aAKo3K4WSS9cKRwi9Ak5nxiCVBb/xiAiwpnu ytwC3lykxMLlWOX5x0DQJrDMsV6FwUKxV1laLqbQQHrhuGiZggbZ3QsJSdiv0d+P6SKj pGyWSgZnzqtvPgXggj2E0KQGpmRUM3StCVD3k52bHHkVsYWtsoZucRfGPRyU5EvgYli0 gGSEHxPltVdgGX/qcrmAwPYbmeK7tjUXecDt0zjL8DHfBZU3Cy70UQTzBEC4TQse1WG/ yffA== X-Gm-Message-State: ABUngveDz5fSQd1gdhBPcGREHDgP3c2I0bgnrgqLZ4hYAIO1KuJH1c1YqCGM8LmBATK4WJr0 X-Received: by 10.99.122.87 with SMTP id j23mr6269517pgn.134.1477432059714; Tue, 25 Oct 2016 14:47:39 -0700 (PDT) Received: from localhost (c-98-203-232-209.hsd1.wa.comcast.net. [98.203.232.209]) by smtp.gmail.com with ESMTPSA id 133sm35603689pfx.92.2016.10.25.14.47.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Oct 2016 14:47:38 -0700 (PDT) From: Kevin Hilman To: Sekhar Nori Subject: [PATCH] ARM: davinci: enable PM for DT boot Date: Tue, 25 Oct 2016 14:47:38 -0700 Message-Id: <20161025214738.27744-1-khilman@baylibre.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161025_144800_607980_3A038B25 X-CRM114-Status: GOOD ( 11.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Bartosz=20Go=C5=82aszewski?= , Alexandre Baillon , Axel Haslam , David Lechner 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 Currently system PM is only enabled for legacy (non-DT) boot. Enable for DT boot also. Tested on da850-lcdk using "rtcwake -m mem -s5 -d rtc0". Signed-off-by: Kevin Hilman --- arch/arm/mach-davinci/da8xx-dt.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c index c9f7e9274aa8..a8089fa40d86 100644 --- a/arch/arm/mach-davinci/da8xx-dt.c +++ b/arch/arm/mach-davinci/da8xx-dt.c @@ -43,8 +43,26 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = { #ifdef CONFIG_ARCH_DAVINCI_DA850 +static struct davinci_pm_config da850_pm_pdata = { + .sleepcount = 128, +}; + +static struct platform_device da850_pm_device = { + .name = "pm-davinci", + .dev = { + .platform_data = &da850_pm_pdata, + }, + .id = -1, +}; + static void __init da850_init_machine(void) { + int ret; + + ret = da850_register_pm(&da850_pm_device); + if (ret) + pr_warn("%s: suspend registration failed: %d\n", __func__, ret); + of_platform_default_populate(NULL, da850_auxdata_lookup, NULL); }