Commit a460513e authored by Andy Shevchenko's avatar Andy Shevchenko Committed by David S. Miller

time64.h: Consolidated PSEC_PER_SEC definition

We have currently three users of the PSEC_PER_SEC each of them defining it
individually. Instead, move it to time64.h to be available for everyone.

There is a new user coming with the same constant in use. It will also
make its life easier.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3036ec03
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
* Copyright (c) 2017 Microsemi Corporation * Copyright (c) 2017 Microsemi Corporation
* Copyright 2020 NXP * Copyright 2020 NXP
*/ */
#include <linux/time64.h>
#include <soc/mscc/ocelot_ptp.h> #include <soc/mscc/ocelot_ptp.h>
#include <soc/mscc/ocelot_sys.h> #include <soc/mscc/ocelot_sys.h>
#include <soc/mscc/ocelot.h> #include <soc/mscc/ocelot.h>
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
#include <linux/phy/phy.h> #include <linux/phy/phy.h>
#include <linux/phy/phy-mipi-dphy.h> #include <linux/phy/phy-mipi-dphy.h>
#define PSEC_PER_SEC 1000000000000LL
/* /*
* Minimum D-PHY timings based on MIPI D-PHY specification. Derived * Minimum D-PHY timings based on MIPI D-PHY specification. Derived
* from the valid ranges specified in Section 6.9, Table 14, Page 41 * from the valid ranges specified in Section 6.9, Table 14, Page 41
......
...@@ -11,16 +11,16 @@ ...@@ -11,16 +11,16 @@
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h> #include <linux/reset.h>
#include <linux/time64.h>
#include <linux/phy/phy.h> #include <linux/phy/phy.h>
#include <linux/phy/phy-mipi-dphy.h> #include <linux/phy/phy-mipi-dphy.h>
#include <linux/pm_runtime.h>
#include <linux/mfd/syscon.h>
#define PSEC_PER_SEC 1000000000000LL
#define UPDATE(x, h, l) (((x) << (l)) & GENMASK((h), (l))) #define UPDATE(x, h, l) (((x) << (l)) & GENMASK((h), (l)))
......
...@@ -37,8 +37,6 @@ enum { ...@@ -37,8 +37,6 @@ enum {
#define PTP_CFG_MISC_PTP_EN BIT(2) #define PTP_CFG_MISC_PTP_EN BIT(2)
#define PSEC_PER_SEC 1000000000000LL
#define PTP_CFG_CLK_ADJ_CFG_ENA BIT(0) #define PTP_CFG_CLK_ADJ_CFG_ENA BIT(0)
#define PTP_CFG_CLK_ADJ_CFG_DIR BIT(1) #define PTP_CFG_CLK_ADJ_CFG_DIR BIT(1)
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#define NSEC_PER_MSEC 1000000L #define NSEC_PER_MSEC 1000000L
#define USEC_PER_SEC 1000000L #define USEC_PER_SEC 1000000L
#define NSEC_PER_SEC 1000000000L #define NSEC_PER_SEC 1000000000L
#define PSEC_PER_SEC 1000000000000LL
#define FSEC_PER_SEC 1000000000000000LL #define FSEC_PER_SEC 1000000000000000LL
#endif /* __VDSO_TIME64_H */ #endif /* __VDSO_TIME64_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment