net: ravb: Move PTP initialization in the driver's ndo_open API for ccc_gac platorms
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Fri, 2 Feb 2024 08:41:33 +0000 (10:41 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 6 Feb 2024 10:14:57 +0000 (11:14 +0100)
commita6a85ba36fd0d3e5595a4fcf57e0811826254ff7
tree34397fab539a541ea949918a07a85d8f982e9ecd
parentcd1fb46e02de3c70d6379b00c0e860ca44954574
net: ravb: Move PTP initialization in the driver's ndo_open API for ccc_gac platorms

The initialization sequence for PTP is the same for platforms with ccc_gac
and gptp (according to "Figure 50.71 Flow of gPTP Initialization (Normal,
Common to All Modes)" of the R-Car Series, 3rd generation hardware
manual and "Figure 37A.53 Flow of gPTP Initialization (Normal, Common to
All Modes)" of the RZ/G Series hardware manual).

As some IP variants switch to reset mode (and thus the registers content is
lost) when setting clocks (due to module standby functionality) to be able
to implement runtime PM, move the PTP initialization to the driver's
ndo_open API.

This commit prepares the code for the addition of runtime PM.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/renesas/ravb_main.c