From patchwork Fri May 19 20:04:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Gerlach X-Patchwork-Id: 9738005 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 304F8601C2 for ; Fri, 19 May 2017 20:06:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B01327CAF for ; Fri, 19 May 2017 20:06:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F38CB2838B; Fri, 19 May 2017 20:06:21 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9BB4827CAF for ; Fri, 19 May 2017 20:06:21 +0000 (UTC) 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:References:In-Reply-To: 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: List-Owner; bh=+g0Vrr2/783/C43u668m10R4rHkP3UAuiSBftdPW44U=; b=bGPJXh7zyHJ1/Z E57hQLJqht++XhMlLAGpvq67VrMrKbE0wfl/EMdICkOZK5hOjA0RPO5AC6swij4dxnIw1fMOT1fdP 3QRFhgqUVDcNJR06zbhS8imwnkLdj3mHOn6ZFVrxRonVH4tKD6GWIjXIL8P+zntMQOd51ScIiws+Z eOCReJDE+V0EnbPi3m+Xey7yioMDIaiXHSSGcp4uJWlqx0ie3h9cxKqwo8R65Skeg2q8wjoKVaaGk T0WtcrvRoZL6/r3z7ei0FnU+UKZWqMDr1dYmHWJeXYRFMF9OKN86Rz7wqKPedgfeU7QWwib6WrAlU boAtCElQvLFWv/Bp7TdA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dBoAF-0005oH-OX; Fri, 19 May 2017 20:06:19 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dBoAD-0005m7-2l for linux-arm-kernel@bombadil.infradead.org; Fri, 19 May 2017 20:06:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=z7xAnVmAm2XQoeIQsRYdvZPrRR+63Sr+b+I2eidwPTc=; b=lF9BH10I7CXAsioODaDZmxBg3 4gnbYDFVsZWuMUznVp3Uxo27EAUTTTKOV5m3beEw1IbKJiGRO5jpnXTciPbkDbwYWHvXzAQYhS4Br gW3rj8VCqIqYGF90D2c4Sj7zo+xkT4ZkVjvpxRAV2CbPHptRRdvPa9EmzEXWtwdvdZ4ZdbCwY8Tw8 j/ngvfGgFVQ8g9pRtx/To5+p5LCwlkcAPrhIkU0c7NkSAZBXQ5Gikpstp2Ze8aQOBZVEe8eflvgHY hz7YUPIqaz/34S++DCzklZsCgY0xe1GCtX373W+ztZ8pcQE9cJKtrkNY/6KA44dDFiPN6b/KLcX9h 0F5ymBnYQ==; Received: from fllnx209.ext.ti.com ([198.47.19.16]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dBoAB-0007IM-7T for linux-arm-kernel@lists.infradead.org; Fri, 19 May 2017 20:06:16 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v4JK4tv6031299; Fri, 19 May 2017 15:04:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1495224295; bh=d8t3m+4iUnFRLAC8boxYH9bKU1D7GvZdtv8EzrgVtXY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=L/RVuzPaUKnX30UNks1iXyYWcEvwd/KpNkoaIh3Aa0zStza/7ABtbtNcPgPZwCE6w +E4ibg3j1ky8f9CIbilqQisUgUHkZrjn5ZNuxFo76QK4a6VSJM5PldHZ8gAdgfcXVQ SsqiQKjZRtVXFo7ndOHAsJDlV6vRzA+/oTmvhaY8= Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v4JK4ogN007216; Fri, 19 May 2017 15:04:50 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.294.0; Fri, 19 May 2017 15:04:49 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v4JK4nVn003887; Fri, 19 May 2017 15:04:49 -0500 Received: from localhost (uda0274052.dhcp.ti.com [128.247.59.203]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id v4JK4n310892; Fri, 19 May 2017 15:04:49 -0500 (CDT) From: Dave Gerlach To: Tony Lindgren , Santosh Shilimkar , Russell King Subject: [PATCH v2 5/5] ARM: OMAP2+: Create dummy platform_device for pm33xx Date: Fri, 19 May 2017 15:04:38 -0500 Message-ID: <20170519200438.9502-6-d-gerlach@ti.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170519200438.9502-1-d-gerlach@ti.com> References: <20170519200438.9502-1-d-gerlach@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170519_160615_381870_00BDF6E0 X-CRM114-Status: UNSURE ( 9.81 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Keerthy J , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dave Gerlach 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 Add amx3_common_pm_init to create a dummy platform_device for pm33xx so that our pm33xx module can probe and am335x and am437x platforms to enable basic suspend to mem and standby support. Signed-off-by: Dave Gerlach --- arch/arm/mach-omap2/common.h | 7 +++++++ arch/arm/mach-omap2/io.c | 2 ++ arch/arm/mach-omap2/pm33xx-core.c | 12 ++++++++++++ 3 files changed, 21 insertions(+) diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 3089d3bfa19b..cd7724d040f8 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -77,6 +77,13 @@ static inline int omap4_pm_init_early(void) } #endif +#if defined(CONFIG_PM) && (defined(CONFIG_SOC_AM33XX) || \ + defined(CONFIG_SOC_AM43XX)) +void amx3_common_pm_init(void); +#else +static inline void amx3_common_pm_init(void) { } +#endif + extern void omap2_init_common_infrastructure(void); extern void omap_init_time(void); diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 5aafb8449c40..1bbbf19c93ea 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -652,6 +652,7 @@ void __init am33xx_init_early(void) void __init am33xx_init_late(void) { omap_common_late_init(); + amx3_common_pm_init(); } #endif @@ -676,6 +677,7 @@ void __init am43xx_init_late(void) { omap_common_late_init(); omap2_clk_enable_autoidle_all(); + amx3_common_pm_init(); } #endif diff --git a/arch/arm/mach-omap2/pm33xx-core.c b/arch/arm/mach-omap2/pm33xx-core.c index c84ffc4de2e9..b5d90841c27a 100644 --- a/arch/arm/mach-omap2/pm33xx-core.c +++ b/arch/arm/mach-omap2/pm33xx-core.c @@ -179,3 +179,15 @@ struct am33xx_pm_platform_data *am33xx_pm_get_pdata(void) else return NULL; } + +void __init amx3_common_pm_init(void) +{ + struct platform_device_info devinfo = { }; + struct am33xx_pm_platform_data *pdata; + + pdata = am33xx_pm_get_pdata(); + devinfo.name = "pm33xx"; + devinfo.data = pdata; + devinfo.size_data = sizeof(*pdata); + platform_device_register_full(&devinfo); +}