Re: [PATCH v1 3/4] pps: generators: tio: Introduce Intel Elkhart Lake PSE TIO

From: Rodolfo Giometti
Date: Wed Feb 26 2025 - 02:57:26 EST


On 26/02/25 07:15, Raag Jadav wrote:
Add initial support for Intel Elkhart Lake PSE TIO controller.

Signed-off-by: Raag Jadav <raag.jadav@xxxxxxxxx>

Acked-by: Rodolfo Giometti <giometti@xxxxxxxxxxxx>

---
drivers/pps/generators/pps_gen_tio.c | 17 ++++++++++++++++-
drivers/pps/generators/pps_gen_tio.h | 5 +++++
2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/drivers/pps/generators/pps_gen_tio.c b/drivers/pps/generators/pps_gen_tio.c
index 89b08301d21e..8339d8c8f8bb 100644
--- a/drivers/pps/generators/pps_gen_tio.c
+++ b/drivers/pps/generators/pps_gen_tio.c
@@ -22,6 +22,14 @@
#include "pps_gen_tio.h"
+static const struct pps_tio_data ehl_pse_data = {
+ .regs = {
+ .ctl = TIOCTL_PSE,
+ .compv = TIOCOMPV_PSE,
+ .ec = TIOEC_PSE,
+ },
+};
+
static const struct pps_tio_data pmc_data = {
.regs = {
.ctl = TIOCTL_PMC,
@@ -240,9 +248,16 @@ static const struct acpi_device_id intel_pmc_tio_acpi_match[] = {
};
MODULE_DEVICE_TABLE(acpi, intel_pmc_tio_acpi_match);
+static const struct platform_device_id pps_gen_tio_ids[] = {
+ { "pps-gen-tio", (kernel_ulong_t)&ehl_pse_data },
+ { }
+};
+MODULE_DEVICE_TABLE(platform, pps_gen_tio_ids);
+
static struct platform_driver pps_gen_tio_driver = {
.probe = pps_gen_tio_probe,
.remove = pps_gen_tio_remove,
+ .id_table = pps_gen_tio_ids,
.driver = {
.name = "intel-pps-gen-tio",
.acpi_match_table = intel_pmc_tio_acpi_match,
@@ -255,5 +270,5 @@ MODULE_AUTHOR("Lakshmi Sowjanya D <lakshmi.sowjanya.d@xxxxxxxxx>");
MODULE_AUTHOR("Pandith N <pandith.n@xxxxxxxxx>");
MODULE_AUTHOR("Thejesh Reddy T R <thejesh.reddy.t.r@xxxxxxxxx>");
MODULE_AUTHOR("Subramanian Mohan <subramanian.mohan@xxxxxxxxx>");
-MODULE_DESCRIPTION("Intel PMC Time-Aware IO Generator Driver");
+MODULE_DESCRIPTION("Intel Time-Aware IO Generator Driver");
MODULE_LICENSE("GPL");
diff --git a/drivers/pps/generators/pps_gen_tio.h b/drivers/pps/generators/pps_gen_tio.h
index e652f976e455..bbf5b994e7ff 100644
--- a/drivers/pps/generators/pps_gen_tio.h
+++ b/drivers/pps/generators/pps_gen_tio.h
@@ -14,6 +14,11 @@
#include <linux/pps_gen_kernel.h>
#include <linux/spinlock_types.h>
+/* EHL PSE Registers */
+#define TIOCTL_PSE 0x00
+#define TIOCOMPV_PSE 0x04
+#define TIOEC_PSE 0x24
+
/* PMC Registers */
#define TIOCTL_PMC 0x00
#define TIOCOMPV_PMC 0x10

--
GNU/Linux Solutions e-mail: giometti@xxxxxxxxxxxx
Linux Device Driver giometti@xxxxxxxx
Embedded Systems phone: +39 349 2432127
UNIX programming