* [PATCH v2 1/3] platform/x86: amd-pmc: fix compilation without CONFIG_RTC_SYSTOHC_DEVICE
@ 2021-10-26 17:14 Mario Limonciello
2021-10-26 17:14 ` [PATCH v2 2/3] platform/x86: amd-pmc: Downgrade dev_info message to dev_dbg Mario Limonciello
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Mario Limonciello @ 2021-10-26 17:14 UTC (permalink / raw)
To: Hans de Goede, Mark Gross, open list:X86 PLATFORM DRIVERS,
Shyam Sundar S K
Cc: Mario Limonciello, Alexandre Belloni
If the configuration hasn't specified this parameter the rest of the new
RTC functionality should just be ignored.
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Suggested-by: Hans de Goede <hdegoede@redhat.com>
Fixes: 59348401ebed ("platform/x86: amd-pmc: Add special handling for timer based S0i3 wakeup")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
Changes from v1->v2:
* Hardcode the device instead of #ifdef
drivers/platform/x86/amd-pmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/amd-pmc.c b/drivers/platform/x86/amd-pmc.c
index 678bf6874c63..b8d77a18e95a 100644
--- a/drivers/platform/x86/amd-pmc.c
+++ b/drivers/platform/x86/amd-pmc.c
@@ -425,7 +425,7 @@ static int amd_pmc_verify_czn_rtc(struct amd_pmc_dev *pdev, u32 *arg)
if (pdev->major < 64 || (pdev->major == 64 && pdev->minor < 53))
return 0;
- rtc_device = rtc_class_open(CONFIG_RTC_SYSTOHC_DEVICE);
+ rtc_device = rtc_class_open("rtc0");
if (!rtc_device)
return 0;
rc = rtc_read_alarm(rtc_device, &alarm);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/3] platform/x86: amd-pmc: Downgrade dev_info message to dev_dbg
2021-10-26 17:14 [PATCH v2 1/3] platform/x86: amd-pmc: fix compilation without CONFIG_RTC_SYSTOHC_DEVICE Mario Limonciello
@ 2021-10-26 17:14 ` Mario Limonciello
2021-10-26 17:14 ` [PATCH v2 3/3] platform/x86: amd-pmc: Drop check for valid alarm time Mario Limonciello
2021-10-27 14:07 ` [PATCH v2 1/3] platform/x86: amd-pmc: fix compilation without CONFIG_RTC_SYSTOHC_DEVICE Hans de Goede
2 siblings, 0 replies; 4+ messages in thread
From: Mario Limonciello @ 2021-10-26 17:14 UTC (permalink / raw)
To: Hans de Goede, Mark Gross, open list:X86 PLATFORM DRIVERS,
Shyam Sundar S K
Cc: Mario Limonciello, Alexandre Belloni
For the majority of users this information will not be informative
as they've chosen to program the RTC before going to sleep.
Suggested-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/platform/x86/amd-pmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/amd-pmc.c b/drivers/platform/x86/amd-pmc.c
index b8d77a18e95a..81f3b9d79f43 100644
--- a/drivers/platform/x86/amd-pmc.c
+++ b/drivers/platform/x86/amd-pmc.c
@@ -457,7 +457,7 @@ static int amd_pmc_verify_czn_rtc(struct amd_pmc_dev *pdev, u32 *arg)
*arg |= (duration << 16);
rc = rtc_alarm_irq_enable(rtc_device, 0);
- dev_info(pdev->dev, "wakeup timer programmed for %lld seconds\n", duration);
+ dev_dbg(pdev->dev, "wakeup timer programmed for %lld seconds\n", duration);
return rc;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 3/3] platform/x86: amd-pmc: Drop check for valid alarm time
2021-10-26 17:14 [PATCH v2 1/3] platform/x86: amd-pmc: fix compilation without CONFIG_RTC_SYSTOHC_DEVICE Mario Limonciello
2021-10-26 17:14 ` [PATCH v2 2/3] platform/x86: amd-pmc: Downgrade dev_info message to dev_dbg Mario Limonciello
@ 2021-10-26 17:14 ` Mario Limonciello
2021-10-27 14:07 ` [PATCH v2 1/3] platform/x86: amd-pmc: fix compilation without CONFIG_RTC_SYSTOHC_DEVICE Hans de Goede
2 siblings, 0 replies; 4+ messages in thread
From: Mario Limonciello @ 2021-10-26 17:14 UTC (permalink / raw)
To: Hans de Goede, Mark Gross, open list:X86 PLATFORM DRIVERS,
Shyam Sundar S K
Cc: Mario Limonciello, Alexandre Belloni
This is already checked when calling rtc_read_alarm.
Suggested-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/platform/x86/amd-pmc.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/platform/x86/amd-pmc.c b/drivers/platform/x86/amd-pmc.c
index 81f3b9d79f43..b7e50ed050a8 100644
--- a/drivers/platform/x86/amd-pmc.c
+++ b/drivers/platform/x86/amd-pmc.c
@@ -435,9 +435,6 @@ static int amd_pmc_verify_czn_rtc(struct amd_pmc_dev *pdev, u32 *arg)
dev_dbg(pdev->dev, "alarm not enabled\n");
return 0;
}
- rc = rtc_valid_tm(&alarm.time);
- if (rc)
- return rc;
rc = rtc_read_time(rtc_device, &tm);
if (rc)
return rc;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/3] platform/x86: amd-pmc: fix compilation without CONFIG_RTC_SYSTOHC_DEVICE
2021-10-26 17:14 [PATCH v2 1/3] platform/x86: amd-pmc: fix compilation without CONFIG_RTC_SYSTOHC_DEVICE Mario Limonciello
2021-10-26 17:14 ` [PATCH v2 2/3] platform/x86: amd-pmc: Downgrade dev_info message to dev_dbg Mario Limonciello
2021-10-26 17:14 ` [PATCH v2 3/3] platform/x86: amd-pmc: Drop check for valid alarm time Mario Limonciello
@ 2021-10-27 14:07 ` Hans de Goede
2 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2021-10-27 14:07 UTC (permalink / raw)
To: Mario Limonciello, Mark Gross, open list:X86 PLATFORM DRIVERS,
Shyam Sundar S K
Cc: Alexandre Belloni
Hi,
On 10/26/21 19:14, Mario Limonciello wrote:
> If the configuration hasn't specified this parameter the rest of the new
> RTC functionality should just be ignored.
>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Suggested-by: Hans de Goede <hdegoede@redhat.com>
> Fixes: 59348401ebed ("platform/x86: amd-pmc: Add special handling for timer based S0i3 wakeup")
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Thank you for your patch-series, I've applied the series to my
review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.
Regards,
Hans
> ---
> Changes from v1->v2:
> * Hardcode the device instead of #ifdef
>
> drivers/platform/x86/amd-pmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/amd-pmc.c b/drivers/platform/x86/amd-pmc.c
> index 678bf6874c63..b8d77a18e95a 100644
> --- a/drivers/platform/x86/amd-pmc.c
> +++ b/drivers/platform/x86/amd-pmc.c
> @@ -425,7 +425,7 @@ static int amd_pmc_verify_czn_rtc(struct amd_pmc_dev *pdev, u32 *arg)
> if (pdev->major < 64 || (pdev->major == 64 && pdev->minor < 53))
> return 0;
>
> - rtc_device = rtc_class_open(CONFIG_RTC_SYSTOHC_DEVICE);
> + rtc_device = rtc_class_open("rtc0");
> if (!rtc_device)
> return 0;
> rc = rtc_read_alarm(rtc_device, &alarm);
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-27 14:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 17:14 [PATCH v2 1/3] platform/x86: amd-pmc: fix compilation without CONFIG_RTC_SYSTOHC_DEVICE Mario Limonciello
2021-10-26 17:14 ` [PATCH v2 2/3] platform/x86: amd-pmc: Downgrade dev_info message to dev_dbg Mario Limonciello
2021-10-26 17:14 ` [PATCH v2 3/3] platform/x86: amd-pmc: Drop check for valid alarm time Mario Limonciello
2021-10-27 14:07 ` [PATCH v2 1/3] platform/x86: amd-pmc: fix compilation without CONFIG_RTC_SYSTOHC_DEVICE Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).