eth: mcux: Enable PTP IRQ only if the ptp node is enabled
This covers the case of 1 controller having PTP enabled and the other not. Signed-off-by: Armand Ciejak <armand@riedonetworks.com>
This commit is contained in:
parent
c627ef37ed
commit
df119d2bbf
1 changed files with 4 additions and 0 deletions
|
@ -1366,6 +1366,7 @@ static void eth_0_config_func(void)
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_PTP_CLOCK_MCUX)
|
||||
#if DT_NODE_HAS_STATUS(PTP_INST_NODEID(0), okay)
|
||||
IRQ_CONNECT(DT_IRQ_BY_NAME(PTP_INST_NODEID(0), ieee1588_tmr, irq),
|
||||
DT_IRQ_BY_NAME(PTP_INST_NODEID(0), ieee1588_tmr, priority),
|
||||
eth_mcux_ptp_isr,
|
||||
|
@ -1373,6 +1374,7 @@ static void eth_0_config_func(void)
|
|||
0);
|
||||
irq_enable(DT_IRQ_BY_NAME(PTP_INST_NODEID(0), ieee1588_tmr, irq));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */
|
||||
|
||||
|
@ -1475,6 +1477,7 @@ static void eth_1_config_func(void)
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_PTP_CLOCK_MCUX)
|
||||
#if DT_NODE_HAS_STATUS(PTP_INST_NODEID(1), okay)
|
||||
IRQ_CONNECT(DT_IRQ_BY_NAME(PTP_INST_NODEID(1), ieee1588_tmr, irq),
|
||||
DT_IRQ_BY_NAME(PTP_INST_NODEID(1), ieee1588_tmr, priority),
|
||||
eth_mcux_ptp_isr,
|
||||
|
@ -1482,6 +1485,7 @@ static void eth_1_config_func(void)
|
|||
0);
|
||||
irq_enable(DT_IRQ_BY_NAME(PTP_INST_NODEID(1), ieee1588_tmr, irq));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue