[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a93c0673-2876-5bb2-29aa-0d0208b97b10@omp.ru>
Date: Fri, 15 Dec 2023 00:03:59 +0300
From: Sergey Shtylyov <s.shtylyov@....ru>
To: Claudiu <claudiu.beznea@...on.dev>, <davem@...emloft.net>,
<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
<richardcochran@...il.com>, <p.zabel@...gutronix.de>,
<yoshihiro.shimoda.uh@...esas.com>, <wsa+renesas@...g-engineering.com>,
<geert+renesas@...der.be>
CC: <netdev@...r.kernel.org>, <linux-renesas-soc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Claudiu Beznea
<claudiu.beznea.uj@...renesas.com>
Subject: Re: [PATCH net-next v2 11/21] net: ravb: Move DBAT configuration to
the driver's ndo_open API
On 12/14/23 2:45 PM, Claudiu wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
>
> 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: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@....ru>
[...]
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index 04eaa1967651..6b8ca08be35e 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -1822,6 +1822,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);
> @@ -2841,7 +2842,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);
>
How about also removing the DBAT write from ravb_resume()?
MBR, Sergey
Powered by blists - more mailing lists