Commit cd1fb46e authored by Claudiu Beznea's avatar Claudiu Beznea Committed by Paolo Abeni
Browse files

net: ravb: Move DBAT configuration to the driver's ndo_open API



DBAT setup was done in the driver's probe API. As some IP variants switch
to reset mode (and thus registers content is lost) when setting clocks
(due to module standby functionality) to be able to implement runtime PM
move the DBAT configuration in the driver's ndo_open API.

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

Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 23698a9a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1865,6 +1865,7 @@ static int ravb_open(struct net_device *ndev)
		napi_enable(&priv->napi[RAVB_NC]);

	ravb_set_delay_mode(ndev);
	ravb_write(ndev, priv->desc_bat_dma, DBAT);

	/* Device init */
	error = ravb_dmac_init(ndev);
@@ -2808,7 +2809,6 @@ static int ravb_probe(struct platform_device *pdev)
	}
	for (q = RAVB_BE; q < DBAT_ENTRY_NUM; q++)
		priv->desc_bat[q].die_dt = DT_EOS;
	ravb_write(ndev, priv->desc_bat_dma, DBAT);

	/* Initialise HW timestamp list */
	INIT_LIST_HEAD(&priv->ts_skb_list);