diff options
author | Min Li <min.li.xe@renesas.com> | 2020-12-08 10:41:54 -0500 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-12-09 15:00:55 -0800 |
commit | 251f4fe224d6c5399e71b57ab175db3b783dbca0 (patch) | |
tree | 2d04f2dbc4e1ff41c6839d99a44c1a46c7322518 /drivers/ptp/ptp_clockmatrix.h | |
parent | 9125abe7b9cb19f2d2b1c47a8c04dd81ce0d43b2 (diff) | |
download | lwn-251f4fe224d6c5399e71b57ab175db3b783dbca0.tar.gz lwn-251f4fe224d6c5399e71b57ab175db3b783dbca0.zip |
ptp: clockmatrix: reset device and check BOOT_STATUS
SM_RESET device only when loading full configuration and check
for BOOT_STATUS. Also remove polling for write trigger done in
_idtcm_settime().
Changes since v1:
-Correct warnings from strict checkpatch
Signed-off-by: Min Li <min.li.xe@renesas.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Link: https://lore.kernel.org/r/1607442117-13661-1-git-send-email-min.li.xe@renesas.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/ptp/ptp_clockmatrix.h')
-rw-r--r-- | drivers/ptp/ptp_clockmatrix.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/ptp/ptp_clockmatrix.h b/drivers/ptp/ptp_clockmatrix.h index 82840d72364a..713e41a09f3c 100644 --- a/drivers/ptp/ptp_clockmatrix.h +++ b/drivers/ptp/ptp_clockmatrix.h @@ -53,9 +53,14 @@ #define OUTPUT_MODULE_FROM_INDEX(index) (OUTPUT_0 + (index) * 0x10) -#define PEROUT_ENABLE_OUTPUT_MASK (0xdeadbeef) +#define PEROUT_ENABLE_OUTPUT_MASK (0xdeadbeef) -#define IDTCM_MAX_WRITE_COUNT (512) +#define IDTCM_MAX_WRITE_COUNT (512) + +#define FULL_FW_CFG_BYTES (SCRATCH - GPIO_USER_CONTROL) +#define FULL_FW_CFG_SKIPPED_BYTES (((SCRATCH >> 7) \ + - (GPIO_USER_CONTROL >> 7)) \ + * 4) /* 4 bytes skipped every 0x80 */ /* Values of DPLL_N.DPLL_MODE.PLL_MODE */ enum pll_mode { |