diff options
author | AnjanaSuraj <anjana.r@puresoftware.com> | 2022-04-07 11:54:59 +0530 |
---|---|---|
committer | Xiaobo Xie <xiaobo.xie@nxp.com> | 2022-05-30 13:06:55 +0200 |
commit | 6809b4d8f301e24ba9588868c61cf9d78c84d41c (patch) | |
tree | d1ed46226ead5c72b4e23a793ed04ae8221d4ca5 /include | |
parent | 0f79a180f4273c225defddfc145bfc84ef841844 (diff) |
ptp: ptp_qoriq: add ACPI probe support
Add ACPI support for QorIQ PTP clock so that it can be probed
in both DT and ACPI cases.
Signed-off-by: AnjanaSuraj <anjana.r@puresoftware.com>
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fsl/ptp_qoriq.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/fsl/ptp_qoriq.h b/include/linux/fsl/ptp_qoriq.h index 01acebe37fab..9188c2e9d3eb 100644 --- a/include/linux/fsl/ptp_qoriq.h +++ b/include/linux/fsl/ptp_qoriq.h @@ -138,6 +138,19 @@ struct ptp_qoriq_registers { #define DEFAULT_FIPER2_PERIOD 1000000000 #define DEFAULT_FIPER3_PERIOD 1000000000 +#define CLK_DSDT_PROPS ((fwnode_property_read_u32(ptp_fwnode, \ + "tclk-period", &ptp_qoriq->tclk_period)) || \ + (fwnode_property_read_u32(ptp_fwnode, \ + "fsl,tmr-prsc", &ptp_qoriq->tmr_prsc)) || \ + (fwnode_property_read_u32(ptp_fwnode, \ + "fsl,tmr-add", &ptp_qoriq->tmr_add)) || \ + (fwnode_property_read_u32(ptp_fwnode, \ + "fsl,tmr-fiper1", &ptp_qoriq->tmr_fiper1)) || \ + (fwnode_property_read_u32(ptp_fwnode, \ + "fsl,tmr-fiper2", &ptp_qoriq->tmr_fiper1)) || \ + (fwnode_property_read_u32(ptp_fwnode, \ + "fsl,max-adj", &ptp_qoriq->caps.max_adj))) \ + struct ptp_qoriq { void __iomem *base; struct ptp_qoriq_registers regs; |