From mboxrd@z Thu Jan 1 00:00:00 1970 From: mark.rutland@arm.com (Mark Rutland) Date: Thu, 3 Nov 2016 15:25:46 +0000 Subject: [RFC PATCH 0/3] ARM64: meson-gxbb: Add support for system suspend In-Reply-To: <1478183365-23708-1-git-send-email-narmstrong@baylibre.com> References: <1478183365-23708-1-git-send-email-narmstrong@baylibre.com> Message-ID: <20161103152545.GB25852@remoulade> To: linus-amlogic@lists.infradead.org List-Id: linus-amlogic.lists.infradead.org On Thu, Nov 03, 2016 at 03:29:22PM +0100, Neil Armstrong wrote: > Thie patchset is a very experiment patchset to support the System Suspend > feature of the Amlogic Meson GX SoCs. > > These SoCs implements system suspend using a non-standard PSCI CPU_SUSPEND > parameter to enter system suspend. This sounds like a violation of the CPU_SUSPEND semantics. > A small driver is added to properly fill the platform_suspend_ops and make > to correct SMC call. Ignoring the fact that this is a blatant violation of the PSCI CPU_SUSPEND semantics, this certainly should not be a separate driver. > In order to wake up from an alarm, these SoCs have a special memory mapped > register where an alarm time delay in seconds is stored. > In order to reuse the RTC wakealarm feature, implement a fake RTC device > that uses the system time to calculate a delay to write to the register. > > Note that this RFC is here to seek a better way to handle these platform > specific features. > > Neil Armstrong (3): > ARM64: meson: Add Amlogic Meson GX PM Suspend > rtc: Add Amlogic Virtual Wake RTC > ARM64: dts: meson-gxbb: Add support for PM and Virtual RTC > > arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 9 ++ > drivers/firmware/meson/Kconfig | 6 + > drivers/firmware/meson/Makefile | 1 + > drivers/firmware/meson/meson_gx_pm.c | 86 +++++++++++++++ > drivers/rtc/Kconfig | 10 ++ > drivers/rtc/Makefile | 1 + > drivers/rtc/rtc-meson-vrtc.c | 164 ++++++++++++++++++++++++++++ > 7 files changed, 277 insertions(+) > create mode 100644 drivers/firmware/meson/meson_gx_pm.c > create mode 100644 drivers/rtc/rtc-meson-vrtc.c > > -- > 1.9.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Sender: rtc-linux@googlegroups.com Received: from foss.arm.com (foss.arm.com. [217.140.101.70]) by gmr-mx.google.com with ESMTP id gg10si3061208pac.1.2016.11.03.08.25.49 for ; Thu, 03 Nov 2016 08:25:49 -0700 (PDT) Date: Thu, 3 Nov 2016 15:25:46 +0000 From: Mark Rutland To: Neil Armstrong Cc: khilman@baylibre.com, carlo@caione.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rtc-linux@googlegroups.com Subject: [rtc-linux] Re: [RFC PATCH 0/3] ARM64: meson-gxbb: Add support for system suspend Message-ID: <20161103152545.GB25852@remoulade> References: <1478183365-23708-1-git-send-email-narmstrong@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 In-Reply-To: <1478183365-23708-1-git-send-email-narmstrong@baylibre.com> Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , On Thu, Nov 03, 2016 at 03:29:22PM +0100, Neil Armstrong wrote: > Thie patchset is a very experiment patchset to support the System Suspend > feature of the Amlogic Meson GX SoCs. > > These SoCs implements system suspend using a non-standard PSCI CPU_SUSPEND > parameter to enter system suspend. This sounds like a violation of the CPU_SUSPEND semantics. > A small driver is added to properly fill the platform_suspend_ops and make > to correct SMC call. Ignoring the fact that this is a blatant violation of the PSCI CPU_SUSPEND semantics, this certainly should not be a separate driver. > In order to wake up from an alarm, these SoCs have a special memory mapped > register where an alarm time delay in seconds is stored. > In order to reuse the RTC wakealarm feature, implement a fake RTC device > that uses the system time to calculate a delay to write to the register. > > Note that this RFC is here to seek a better way to handle these platform > specific features. > > Neil Armstrong (3): > ARM64: meson: Add Amlogic Meson GX PM Suspend > rtc: Add Amlogic Virtual Wake RTC > ARM64: dts: meson-gxbb: Add support for PM and Virtual RTC > > arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 9 ++ > drivers/firmware/meson/Kconfig | 6 + > drivers/firmware/meson/Makefile | 1 + > drivers/firmware/meson/meson_gx_pm.c | 86 +++++++++++++++ > drivers/rtc/Kconfig | 10 ++ > drivers/rtc/Makefile | 1 + > drivers/rtc/rtc-meson-vrtc.c | 164 ++++++++++++++++++++++++++++ > 7 files changed, 277 insertions(+) > create mode 100644 drivers/firmware/meson/meson_gx_pm.c > create mode 100644 drivers/rtc/rtc-meson-vrtc.c > > -- > 1.9.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 From: mark.rutland@arm.com (Mark Rutland) Date: Thu, 3 Nov 2016 15:25:46 +0000 Subject: [RFC PATCH 0/3] ARM64: meson-gxbb: Add support for system suspend In-Reply-To: <1478183365-23708-1-git-send-email-narmstrong@baylibre.com> References: <1478183365-23708-1-git-send-email-narmstrong@baylibre.com> Message-ID: <20161103152545.GB25852@remoulade> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Nov 03, 2016 at 03:29:22PM +0100, Neil Armstrong wrote: > Thie patchset is a very experiment patchset to support the System Suspend > feature of the Amlogic Meson GX SoCs. > > These SoCs implements system suspend using a non-standard PSCI CPU_SUSPEND > parameter to enter system suspend. This sounds like a violation of the CPU_SUSPEND semantics. > A small driver is added to properly fill the platform_suspend_ops and make > to correct SMC call. Ignoring the fact that this is a blatant violation of the PSCI CPU_SUSPEND semantics, this certainly should not be a separate driver. > In order to wake up from an alarm, these SoCs have a special memory mapped > register where an alarm time delay in seconds is stored. > In order to reuse the RTC wakealarm feature, implement a fake RTC device > that uses the system time to calculate a delay to write to the register. > > Note that this RFC is here to seek a better way to handle these platform > specific features. > > Neil Armstrong (3): > ARM64: meson: Add Amlogic Meson GX PM Suspend > rtc: Add Amlogic Virtual Wake RTC > ARM64: dts: meson-gxbb: Add support for PM and Virtual RTC > > arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 9 ++ > drivers/firmware/meson/Kconfig | 6 + > drivers/firmware/meson/Makefile | 1 + > drivers/firmware/meson/meson_gx_pm.c | 86 +++++++++++++++ > drivers/rtc/Kconfig | 10 ++ > drivers/rtc/Makefile | 1 + > drivers/rtc/rtc-meson-vrtc.c | 164 ++++++++++++++++++++++++++++ > 7 files changed, 277 insertions(+) > create mode 100644 drivers/firmware/meson/meson_gx_pm.c > create mode 100644 drivers/rtc/rtc-meson-vrtc.c > > -- > 1.9.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757828AbcKCPZv (ORCPT ); Thu, 3 Nov 2016 11:25:51 -0400 Received: from foss.arm.com ([217.140.101.70]:39918 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750905AbcKCPZu (ORCPT ); Thu, 3 Nov 2016 11:25:50 -0400 Date: Thu, 3 Nov 2016 15:25:46 +0000 From: Mark Rutland To: Neil Armstrong Cc: khilman@baylibre.com, carlo@caione.org, a.zummo@towertech.it, alexandre.belloni@free-electrons.com, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rtc-linux@googlegroups.com Subject: Re: [RFC PATCH 0/3] ARM64: meson-gxbb: Add support for system suspend Message-ID: <20161103152545.GB25852@remoulade> References: <1478183365-23708-1-git-send-email-narmstrong@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1478183365-23708-1-git-send-email-narmstrong@baylibre.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 03, 2016 at 03:29:22PM +0100, Neil Armstrong wrote: > Thie patchset is a very experiment patchset to support the System Suspend > feature of the Amlogic Meson GX SoCs. > > These SoCs implements system suspend using a non-standard PSCI CPU_SUSPEND > parameter to enter system suspend. This sounds like a violation of the CPU_SUSPEND semantics. > A small driver is added to properly fill the platform_suspend_ops and make > to correct SMC call. Ignoring the fact that this is a blatant violation of the PSCI CPU_SUSPEND semantics, this certainly should not be a separate driver. > In order to wake up from an alarm, these SoCs have a special memory mapped > register where an alarm time delay in seconds is stored. > In order to reuse the RTC wakealarm feature, implement a fake RTC device > that uses the system time to calculate a delay to write to the register. > > Note that this RFC is here to seek a better way to handle these platform > specific features. > > Neil Armstrong (3): > ARM64: meson: Add Amlogic Meson GX PM Suspend > rtc: Add Amlogic Virtual Wake RTC > ARM64: dts: meson-gxbb: Add support for PM and Virtual RTC > > arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 9 ++ > drivers/firmware/meson/Kconfig | 6 + > drivers/firmware/meson/Makefile | 1 + > drivers/firmware/meson/meson_gx_pm.c | 86 +++++++++++++++ > drivers/rtc/Kconfig | 10 ++ > drivers/rtc/Makefile | 1 + > drivers/rtc/rtc-meson-vrtc.c | 164 ++++++++++++++++++++++++++++ > 7 files changed, 277 insertions(+) > create mode 100644 drivers/firmware/meson/meson_gx_pm.c > create mode 100644 drivers/rtc/rtc-meson-vrtc.c > > -- > 1.9.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel