mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
ptp_qoriq: support automatic configuration for ptp timer
This patch is to support automatic configuration for ptp timer. If required ptp dts properties are not provided, driver could try to calculate a set of default configurations to initialize the ptp timer. This makes the driver work for many boards which don't have the required ptp dts properties in current kernel. Also the users could set dts properties by themselves according to their requirement. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a16b5da54d
commit
91305f2812
2 changed files with 113 additions and 4 deletions
|
@ -127,9 +127,13 @@ struct qoriq_ptp_registers {
|
|||
|
||||
|
||||
#define DRIVER "ptp_qoriq"
|
||||
#define DEFAULT_CKSEL 1
|
||||
#define N_EXT_TS 2
|
||||
|
||||
#define DEFAULT_CKSEL 1
|
||||
#define DEFAULT_TMR_PRSC 2
|
||||
#define DEFAULT_FIPER1_PERIOD 1000000000
|
||||
#define DEFAULT_FIPER2_PERIOD 100000
|
||||
|
||||
struct qoriq_ptp {
|
||||
void __iomem *base;
|
||||
struct qoriq_ptp_registers regs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue