Add initial support for Intel Elkhart Lake PSE TIO controller.
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
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@intel.com>");
MODULE_AUTHOR("Pandith N <pandith.n@intel.com>");
MODULE_AUTHOR("Thejesh Reddy T R <thejesh.reddy.t.r@intel.com>");
MODULE_AUTHOR("Subramanian Mohan <subramanian.mohan@intel.com>");
-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
--
2.34.1
On Wed, Feb 26, 2025 at 11:45:26AM +0530, Raag Jadav wrote:
> Add initial support for Intel Elkhart Lake PSE TIO controller.
...
> +static const struct pps_tio_data ehl_pse_data = {
> + .regs = {
> + .ctl = TIOCTL_PSE,
> + .compv = TIOCOMPV_PSE,
> + .ec = TIOEC_PSE,
> + },
> +};
Same as previous comment, please move it further in the code closer to the ID
table which is the user of this data.
--
With Best Regards,
Andy Shevchenko
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@intel.com>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
> ---
> 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@intel.com>");
> MODULE_AUTHOR("Pandith N <pandith.n@intel.com>");
> MODULE_AUTHOR("Thejesh Reddy T R <thejesh.reddy.t.r@intel.com>");
> MODULE_AUTHOR("Subramanian Mohan <subramanian.mohan@intel.com>");
> -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@enneenne.com
Linux Device Driver giometti@linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming
© 2016 - 2025 Red Hat, Inc.