lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM6PR04MB5413CCFCC68AE2BF90C72C47F1210@AM6PR04MB5413.eurprd04.prod.outlook.com>
Date:   Wed, 16 Sep 2020 01:21:44 +0000
From:   Ran Wang <ran.wang_1@....com>
To:     kuldip dwivedi <kuldip.dwivedi@...esoftware.com>,
        Leo Li <leoyang.li@....com>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     Biwen Li <biwen.li@....com>, Varun Sethi <V.Sethi@....com>,
        Arokia Samy <arokia.samy@....com>,
        Ard Biesheuvel <Ard.Biesheuvel@....com>,
        Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@....com>,
        Paul Yang <Paul.Yang@....com>,
        kuldip dwivedi <kuldip.dwivedi@...esoftware.com>,
        tanveer <tanveer.alam@...esoftware.com>
Subject: RE: [PATCH v1] soc: fsl: rcpm: Add ACPI support

Hi Kuldip,

On Tuesday, September 15, 2020 7:07 PM, kuldip dwivedi wrote:
> Subject: [PATCH v1] soc: fsl: rcpm: Add ACPI support

Actually I also post a patch for this recently: https://lore.kernel.org/patchwork/patch/1299959/  :)

Regards,
Ran

> Add ACPI support in fsl RCPM driver. This is required to support ACPI S3 state.
> S3 is the ACPI sleep state that is known as "sleep" or "suspend to RAM".
> It essentially turns off most power of the system but keeps memory powered.

Actually the low power mode is to gate clocks rather than power down on Layerscape platforms.

> Signed-off-by: tanveer <tanveer.alam@...esoftware.com>
> Signed-off-by: kuldip dwivedi <kuldip.dwivedi@...esoftware.com>
> ---
> 
> Notes:
>     1. Add ACPI match table
>     2. NXP team members are added for confirming HID changes
>     3. There is only one node in ACPI so no need to check for
>        current device explicitly
>     4. These changes are tested on LX2160A and LS1046A platforms
> 
>  drivers/soc/fsl/rcpm.c | 22 +++++++++++++++++++---
>  1 file changed, 19 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c index
> a093dbe6d2cb..e75a436fb159 100644
> --- a/drivers/soc/fsl/rcpm.c
> +++ b/drivers/soc/fsl/rcpm.c
> @@ -2,10 +2,12 @@
>  //
>  // rcpm.c - Freescale QorIQ RCPM driver  // -// Copyright 2019 NXP
> +// Copyright 2019-2020 NXP
> +// Copyright 2020 Puresoftware Ltd.
>  //
>  // Author: Ran Wang <ran.wang_1@....com>
> 
> +#include <linux/acpi.h>
>  #include <linux/init.h>
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
> @@ -57,8 +59,13 @@ static int rcpm_pm_prepare(struct device *dev)
>  				rcpm->wakeup_cells + 1);
> 
>  		/*  Wakeup source should refer to current rcpm device */
> -		if (ret || (np->phandle != value[0]))
> -			continue;
> +		if (is_acpi_node(dev->fwnode)) {
> +			if (ret)
> +				continue;
> +		} else {
> +			if (ret || (np->phandle != value[0]))
> +				continue;
> +		}
>  		/* Property "#fsl,rcpm-wakeup-cells" of rcpm node defines the
>  		 * number of IPPDEXPCR register cells, and "fsl,rcpm-wakeup"
> @@ -139,10 +146,19 @@ static const struct of_device_id rcpm_of_match[] =
> {  };  MODULE_DEVICE_TABLE(of, rcpm_of_match);
> 
> +#ifdef CONFIG_ACPI
> +static const struct acpi_device_id rcpm_acpi_match[] = {
> +	{ "NXP0015", },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(acpi, rcpm_acpi_match); #endif
> +
>  static struct platform_driver rcpm_driver = {
>  	.driver = {
>  		.name = "rcpm",
>  		.of_match_table = rcpm_of_match,
> +		.acpi_match_table = ACPI_PTR(rcpm_acpi_match),
>  		.pm	= &rcpm_pm_ops,
>  	},
>  	.probe = rcpm_probe,
> --
> 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ