diff mbox series

[02/10] ravb: Rename "no_ptp_cfg_active" and "ptp_cfg_active" variables

Message ID 20211001150636.7500-3-biju.das.jz@bp.renesas.com (mailing list archive)
State Accepted
Delegated to: Geert Uytterhoeven
Headers show
Series Add Gigabit Ethernet driver support | expand

Commit Message

Biju Das Oct. 1, 2021, 3:06 p.m. UTC
Rename the variable "no_ptp_cfg_active" with "gptp" and
"ptp_cfg_active" with "ccc_gac" to match the HW features.

There is no functional change.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Suggested-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
RFc->v1:
 * Renamed the variable "no_ptp_cfg_active" with "gptp" and
   "ptp_cfg_active" with "ccc_gac
---
 drivers/net/ethernet/renesas/ravb.h      |  4 ++--
 drivers/net/ethernet/renesas/ravb_main.c | 26 ++++++++++++------------
 2 files changed, 15 insertions(+), 15 deletions(-)

Comments

Sergey Shtylyov Oct. 1, 2021, 8:43 p.m. UTC | #1
On 10/1/21 6:06 PM, Biju Das wrote:

> Rename the variable "no_ptp_cfg_active" with "gptp" and

   This shouldn't be a rename but the extension of the meaning instead...

> "ptp_cfg_active" with "ccc_gac" to match the HW features.
> 
> There is no functional change.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Suggested-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> RFc->v1:
>  * Renamed the variable "no_ptp_cfg_active" with "gptp" and
>    "ptp_cfg_active" with "ccc_gac
> ---
>  drivers/net/ethernet/renesas/ravb.h      |  4 ++--
>  drivers/net/ethernet/renesas/ravb_main.c | 26 ++++++++++++------------
>  2 files changed, 15 insertions(+), 15 deletions(-)

[...]
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index 8f2358caef34..dc7654abfe55 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -1274,7 +1274,7 @@ static int ravb_set_ringparam(struct net_device *ndev,
>  	if (netif_running(ndev)) {
>  		netif_device_detach(ndev);
>  		/* Stop PTP Clock driver */
> -		if (info->no_ptp_cfg_active)
> +		if (info->gptp)

   Where have you lost !info->ccc_gac?

>  			ravb_ptp_stop(ndev);
>  		/* Wait for DMA stopping */
>  		error = ravb_stop_dma(ndev);
> @@ -1306,7 +1306,7 @@ static int ravb_set_ringparam(struct net_device *ndev,
>  		ravb_emac_init(ndev);
>  
>  		/* Initialise PTP Clock driver */
> -		if (info->no_ptp_cfg_active)
> +		if (info->gptp)
>  			ravb_ptp_init(ndev, priv->pdev);

    The same question here...

>  		netif_device_attach(ndev);
> @@ -1446,7 +1446,7 @@ static int ravb_open(struct net_device *ndev)
>  	ravb_emac_init(ndev);
>  
>  	/* Initialise PTP Clock driver */
> -	if (info->no_ptp_cfg_active)
> +	if (info->gptp)

   ... and here.

>  		ravb_ptp_init(ndev, priv->pdev);
>  
>  	netif_tx_start_all_queues(ndev);
> @@ -1460,7 +1460,7 @@ static int ravb_open(struct net_device *ndev)
>  
>  out_ptp_stop:
>  	/* Stop PTP Clock driver */
> -	if (info->no_ptp_cfg_active)
> +	if (info->gptp)
>  		ravb_ptp_stop(ndev);

    ... and here.

>  out_free_irq_nc_tx:
>  	if (!info->multi_irqs)
> @@ -1508,7 +1508,7 @@ static void ravb_tx_timeout_work(struct work_struct *work)
>  	netif_tx_stop_all_queues(ndev);
>  
>  	/* Stop PTP Clock driver */
> -	if (info->no_ptp_cfg_active)
> +	if (info->gptp)

    ... and here.

>  		ravb_ptp_stop(ndev);
>  
>  	/* Wait for DMA stopping */
> @@ -1543,7 +1543,7 @@ static void ravb_tx_timeout_work(struct work_struct *work)
>  
>  out:
>  	/* Initialise PTP Clock driver */
> -	if (info->no_ptp_cfg_active)
> +	if (info->gptp)
>  		ravb_ptp_init(ndev, priv->pdev);

    ... and here.
 
>  	netif_tx_start_all_queues(ndev);
> @@ -1752,7 +1752,7 @@ static int ravb_close(struct net_device *ndev)
>  	ravb_write(ndev, 0, TIC);
>  
>  	/* Stop PTP Clock driver */
> -	if (info->no_ptp_cfg_active)
> +	if (info->gptp)

    ... and here.

>  		ravb_ptp_stop(ndev);
>  
>  	/* Set the config mode to stop the AVB-DMAC's processes */
> @@ -2018,7 +2018,7 @@ static const struct ravb_hw_info ravb_gen3_hw_info = {
>  	.internal_delay = 1,
>  	.tx_counters = 1,
>  	.multi_irqs = 1,
> -	.ptp_cfg_active = 1,

   Where is 'gptp'?

> +	.ccc_gac = 1,
>  };
>  
>  static const struct ravb_hw_info ravb_gen2_hw_info = {
[...]
> @@ -2080,7 +2080,7 @@ static void ravb_set_config_mode(struct net_device *ndev)
>  	struct ravb_private *priv = netdev_priv(ndev);
>  	const struct ravb_hw_info *info = priv->info;
>  
> -	if (info->no_ptp_cfg_active) {
> +	if (info->gptp) {

   Where have you lost !info->ccc_gac?

>  		ravb_modify(ndev, CCC, CCC_OPC, CCC_OPC_CONFIG);
>  		/* Set CSEL value */
>  		ravb_modify(ndev, CCC, CCC_CSEL, CCC_CSEL_HPB);
[...]

MBR, Sergey
Biju Das Oct. 2, 2021, 7:53 a.m. UTC | #2
Hi Sergei,

> Subject: Re: [PATCH 02/10] ravb: Rename "no_ptp_cfg_active" and
> "ptp_cfg_active" variables
> 
> On 10/1/21 6:06 PM, Biju Das wrote:
> 
> > Rename the variable "no_ptp_cfg_active" with "gptp" and
> 
>    This shouldn't be a rename but the extension of the meaning instead...

This is the original ptp support for both R-Car Gen3 and R-Car Gen2 without config in active mode. Later we added feature support active in config mode for R-Car Gen3 by patch[1].
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/ethernet/renesas/ravb_main.c?h=v5.15-rc3&id=f5d7837f96e53a8c9b6c49e1bc95cf0ae88b99e8

> 
> > "ptp_cfg_active" with "ccc_gac" to match the HW features.
> >
> > There is no functional change.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > Suggested-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > ---
> > RFc->v1:
> >  * Renamed the variable "no_ptp_cfg_active" with "gptp" and
> >    "ptp_cfg_active" with "ccc_gac
> > ---
> >  drivers/net/ethernet/renesas/ravb.h      |  4 ++--
> >  drivers/net/ethernet/renesas/ravb_main.c | 26
> > ++++++++++++------------
> >  2 files changed, 15 insertions(+), 15 deletions(-)
> 
> [...]
> > diff --git a/drivers/net/ethernet/renesas/ravb_main.c
> > b/drivers/net/ethernet/renesas/ravb_main.c
> > index 8f2358caef34..dc7654abfe55 100644
> > --- a/drivers/net/ethernet/renesas/ravb_main.c
> > +++ b/drivers/net/ethernet/renesas/ravb_main.c
> > @@ -1274,7 +1274,7 @@ static int ravb_set_ringparam(struct net_device
> *ndev,
> >  	if (netif_running(ndev)) {
> >  		netif_device_detach(ndev);
> >  		/* Stop PTP Clock driver */
> > -		if (info->no_ptp_cfg_active)
> > +		if (info->gptp)
> 
>    Where have you lost !info->ccc_gac?

  As per patch[1], the check is for R-Car Gen2. Why do you need additional check
as per the current driver? 

I see below you are proposing to enable both "gptp" and "ccc_gac" for R-Car Gen3, According to me it is a feature improvement for R-Car Gen3 in which, you can have

1) gPTP support active in config mode
2) gPTP support not active in config mode

But the existing driver code just support "gPTP support active in config mode" for R-Car Gen3.

Do you want me to do feature improvement as well, as part of Gbethernet support?

Please let me know your thoughts.

The same comments applies to all the comments you have mentioned below.

Regards,
Biju



> 
> >  			ravb_ptp_stop(ndev);
> >  		/* Wait for DMA stopping */
> >  		error = ravb_stop_dma(ndev);
> > @@ -1306,7 +1306,7 @@ static int ravb_set_ringparam(struct net_device
> *ndev,
> >  		ravb_emac_init(ndev);
> >
> >  		/* Initialise PTP Clock driver */
> > -		if (info->no_ptp_cfg_active)
> > +		if (info->gptp)
> >  			ravb_ptp_init(ndev, priv->pdev);
> 
>     The same question here...
> 
> >  		netif_device_attach(ndev);
> > @@ -1446,7 +1446,7 @@ static int ravb_open(struct net_device *ndev)
> >  	ravb_emac_init(ndev);
> >
> >  	/* Initialise PTP Clock driver */
> > -	if (info->no_ptp_cfg_active)
> > +	if (info->gptp)
> 
>    ... and here.
> 
> >  		ravb_ptp_init(ndev, priv->pdev);
> >
> >  	netif_tx_start_all_queues(ndev);
> > @@ -1460,7 +1460,7 @@ static int ravb_open(struct net_device *ndev)
> >
> >  out_ptp_stop:
> >  	/* Stop PTP Clock driver */
> > -	if (info->no_ptp_cfg_active)
> > +	if (info->gptp)
> >  		ravb_ptp_stop(ndev);
> 
>     ... and here.
> 
> >  out_free_irq_nc_tx:
> >  	if (!info->multi_irqs)
> > @@ -1508,7 +1508,7 @@ static void ravb_tx_timeout_work(struct
> work_struct *work)
> >  	netif_tx_stop_all_queues(ndev);
> >
> >  	/* Stop PTP Clock driver */
> > -	if (info->no_ptp_cfg_active)
> > +	if (info->gptp)
> 
>     ... and here.
> 
> >  		ravb_ptp_stop(ndev);
> >
> >  	/* Wait for DMA stopping */
> > @@ -1543,7 +1543,7 @@ static void ravb_tx_timeout_work(struct
> > work_struct *work)
> >
> >  out:
> >  	/* Initialise PTP Clock driver */
> > -	if (info->no_ptp_cfg_active)
> > +	if (info->gptp)
> >  		ravb_ptp_init(ndev, priv->pdev);
> 
>     ... and here.
> 
> >  	netif_tx_start_all_queues(ndev);
> > @@ -1752,7 +1752,7 @@ static int ravb_close(struct net_device *ndev)
> >  	ravb_write(ndev, 0, TIC);
> >
> >  	/* Stop PTP Clock driver */
> > -	if (info->no_ptp_cfg_active)
> > +	if (info->gptp)
> 
>     ... and here.
> 
> >  		ravb_ptp_stop(ndev);
> >
> >  	/* Set the config mode to stop the AVB-DMAC's processes */ @@
> > -2018,7 +2018,7 @@ static const struct ravb_hw_info ravb_gen3_hw_info =
> {
> >  	.internal_delay = 1,
> >  	.tx_counters = 1,
> >  	.multi_irqs = 1,
> > -	.ptp_cfg_active = 1,
> 
>    Where is 'gptp'?
> 
> > +	.ccc_gac = 1,
> >  };
> >
> >  static const struct ravb_hw_info ravb_gen2_hw_info = {
> [...]
> > @@ -2080,7 +2080,7 @@ static void ravb_set_config_mode(struct net_device
> *ndev)
> >  	struct ravb_private *priv = netdev_priv(ndev);
> >  	const struct ravb_hw_info *info = priv->info;
> >
> > -	if (info->no_ptp_cfg_active) {
> > +	if (info->gptp) {
> 
>    Where have you lost !info->ccc_gac?
> 
> >  		ravb_modify(ndev, CCC, CCC_OPC, CCC_OPC_CONFIG);
> >  		/* Set CSEL value */
> >  		ravb_modify(ndev, CCC, CCC_CSEL, CCC_CSEL_HPB);
> [...]
> 
> MBR, Sergey
Sergey Shtylyov Oct. 2, 2021, 6:19 p.m. UTC | #3
Hello!

   Damn, DaveM continues ignoring my review efforts... :-( will finish reviewing the series anyway.

On 10/2/21 10:53 AM, Biju Das wrote:

>> Subject: Re: [PATCH 02/10] ravb: Rename "no_ptp_cfg_active" and
>> "ptp_cfg_active" variables
>>
>> On 10/1/21 6:06 PM, Biju Das wrote:
>>
>>> Rename the variable "no_ptp_cfg_active" with "gptp" and
>>
>>    This shouldn't be a rename but the extension of the meaning instead...
> 
> This is the original ptp support for both R-Car Gen3 and R-Car Gen2 without config in active mode. Later we added feature support active in config mode for R-Car Gen3 by patch[1].
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/ethernet/renesas/ravb_main.c?h=v5.15-rc3&id=f5d7837f96e53a8c9b6c49e1bc95cf0ae88b99e8

   And? Do you think I don't remember the driver development history? :-)

>>> "ptp_cfg_active" with "ccc_gac" to match the HW features.
>>>
>>> There is no functional change.
>>>
>>> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
>>> Suggested-by: Sergey Shtylyov <s.shtylyov@omp.ru>
>>> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>>> ---
>>> RFc->v1:
>>>  * Renamed the variable "no_ptp_cfg_active" with "gptp" and
>>>    "ptp_cfg_active" with "ccc_gac
>>> ---
>>>  drivers/net/ethernet/renesas/ravb.h      |  4 ++--
>>>  drivers/net/ethernet/renesas/ravb_main.c | 26
>>> ++++++++++++------------
>>>  2 files changed, 15 insertions(+), 15 deletions(-)
>>
>> [...]
>>> diff --git a/drivers/net/ethernet/renesas/ravb_main.c
>>> b/drivers/net/ethernet/renesas/ravb_main.c
>>> index 8f2358caef34..dc7654abfe55 100644
>>> --- a/drivers/net/ethernet/renesas/ravb_main.c
>>> +++ b/drivers/net/ethernet/renesas/ravb_main.c
>>> @@ -1274,7 +1274,7 @@ static int ravb_set_ringparam(struct net_device
>> *ndev,
>>>  	if (netif_running(ndev)) {
>>>  		netif_device_detach(ndev);
>>>  		/* Stop PTP Clock driver */
>>> -		if (info->no_ptp_cfg_active)
>>> +		if (info->gptp)
>>
>>    Where have you lost !info->ccc_gac?
> 
>   As per patch[1], the check is for R-Car Gen2. Why do you need additional check
> as per the current driver?

   Because the driver now supports not only gen2, but also gen3, and RZ/G2L, finally.

> I see below you are proposing to enable both "gptp" and "ccc_gac" for R-Car Gen3,

   Yes, this is how the hardware evolved. gPTP hardware can (optionally) be active outside
the config mode, otherwise there's no difference b/w gen2 and gen3.

> According to me it is a feature improvement for R-Car Gen3 in which, you can have
> 
> 1) gPTP support active in config mode
> 2) gPTP support not active in config mode

   Right.

> But the existing driver code just support "gPTP support active in config mode" for R-Car Gen3.

   And?

> Do you want me to do feature improvement as well, as part of Gbethernet support?

   I thought we agreed on this patch in the previous iteration, To be more clear, by asking
to remove the "double negation", I meant using:

	if (info->gptp && !info->ccc_gac)

versus your:

	if (!info->no_gptp && !info->ccc_gac)

> Please let me know your thoughts.
> 
> The same comments applies to all the comments you have mentioned below.
> 
> Regards,
> Biju

[...]

MBR, Sergey
Biju Das Oct. 3, 2021, 7:05 a.m. UTC | #4
Hi Sergei,

> Subject: Re: [PATCH 02/10] ravb: Rename "no_ptp_cfg_active" and
> "ptp_cfg_active" variables
> 
> Hello!
> 
>    Damn, DaveM continues ignoring my review efforts... :-( will finish
> reviewing the series anyway.
> 
> On 10/2/21 10:53 AM, Biju Das wrote:
> 
> >> Subject: Re: [PATCH 02/10] ravb: Rename "no_ptp_cfg_active" and
> >> "ptp_cfg_active" variables
> >>
> >> On 10/1/21 6:06 PM, Biju Das wrote:
> >>
> >>> Rename the variable "no_ptp_cfg_active" with "gptp" and
> >>
> >>    This shouldn't be a rename but the extension of the meaning
> instead...
> >
> > This is the original ptp support for both R-Car Gen3 and R-Car Gen2
> without config in active mode. Later we added feature support active in
> config mode for R-Car Gen3 by patch[1].
> > [1]
> > https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.
> > kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git%2
> > Fcommit%2Fdrivers%2Fnet%2Fethernet%2Frenesas%2Fravb_main.c%3Fh%3Dv5.15
> > -rc3%26id%3Df5d7837f96e53a8c9b6c49e1bc95cf0ae88b99e8&amp;data=04%7C01%
> > 7Cbiju.das.jz%40bp.renesas.com%7Cb4a62982865a4f7cf38408d985d11fef%7C53
> > d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C637687955521294093%7CUnknown%
> > 7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJX
> > VCI6Mn0%3D%7C1000&amp;sdata=6rpdh6hEAUl1yMng2ruFrKflBiDGmq6RylI90Ije3t
> > 4%3D&amp;reserved=0
> 
>    And? Do you think I don't remember the driver development history? :-)
> 
> >>> "ptp_cfg_active" with "ccc_gac" to match the HW features.
> >>>
> >>> There is no functional change.
> >>>
> >>> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> >>> Suggested-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> >>> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >>> ---
> >>> RFc->v1:
> >>>  * Renamed the variable "no_ptp_cfg_active" with "gptp" and
> >>>    "ptp_cfg_active" with "ccc_gac
> >>> ---
> >>>  drivers/net/ethernet/renesas/ravb.h      |  4 ++--
> >>>  drivers/net/ethernet/renesas/ravb_main.c | 26
> >>> ++++++++++++------------
> >>>  2 files changed, 15 insertions(+), 15 deletions(-)
> >>
> >> [...]
> >>> diff --git a/drivers/net/ethernet/renesas/ravb_main.c
> >>> b/drivers/net/ethernet/renesas/ravb_main.c
> >>> index 8f2358caef34..dc7654abfe55 100644
> >>> --- a/drivers/net/ethernet/renesas/ravb_main.c
> >>> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> >>> @@ -1274,7 +1274,7 @@ static int ravb_set_ringparam(struct
> >>> net_device
> >> *ndev,
> >>>  	if (netif_running(ndev)) {
> >>>  		netif_device_detach(ndev);
> >>>  		/* Stop PTP Clock driver */
> >>> -		if (info->no_ptp_cfg_active)
> >>> +		if (info->gptp)
> >>
> >>    Where have you lost !info->ccc_gac?
> >
> >   As per patch[1], the check is for R-Car Gen2. Why do you need
> > additional check as per the current driver?
> 
>    Because the driver now supports not only gen2, but also gen3, and
> RZ/G2L, finally.
> 
> > I see below you are proposing to enable both "gptp" and "ccc_gac" for
> > R-Car Gen3,
> 
>    Yes, this is how the hardware evolved. gPTP hardware can (optionally)
> be active outside the config mode, otherwise there's no difference b/w
> gen2 and gen3.
> 
> > According to me it is a feature improvement for R-Car Gen3 in which,
> > you can have
> >
> > 1) gPTP support active in config mode
> > 2) gPTP support not active in config mode
> 
>    Right.
> 
> > But the existing driver code just support "gPTP support active in config
> mode" for R-Car Gen3.
> 
>    And?
> 
> > Do you want me to do feature improvement as well, as part of Gbethernet
> support?
> 
>    I thought we agreed on this patch in the previous iteration, To be more
> clear, by asking to remove the "double negation", I meant using:

I never thought of adding feature improvements as part of Gbethernet support. Any feature improvements after adding GbEthernet support.

If you expressed your ideas like adding gptp, ccc_gac for R-Car Gen3 earlier, then
I should have responded it is feature improvement. So please share your ideas in advance.

Regards,
Biju




> 
> 	if (info->gptp && !info->ccc_gac)
> 
> versus your:
> 
> 	if (!info->no_gptp && !info->ccc_gac)
> 
> > Please let me know your thoughts.
> >
> > The same comments applies to all the comments you have mentioned below.
> >
> > Regards,
> > Biju
> 
> [...]
> 
> MBR, Sergey
diff mbox series

Patch

diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h
index 7363abae6e59..a33fbcb4aac3 100644
--- a/drivers/net/ethernet/renesas/ravb.h
+++ b/drivers/net/ethernet/renesas/ravb.h
@@ -1000,8 +1000,8 @@  struct ravb_hw_info {
 	unsigned internal_delay:1;	/* AVB-DMAC has internal delays */
 	unsigned tx_counters:1;		/* E-MAC has TX counters */
 	unsigned multi_irqs:1;		/* AVB-DMAC and E-MAC has multiple irqs */
-	unsigned no_ptp_cfg_active:1;	/* AVB-DMAC does not support gPTP active in config mode */
-	unsigned ptp_cfg_active:1;	/* AVB-DMAC has gPTP support active in config mode */
+	unsigned gptp:1;		/* AVB-DMAC has gPTP support */
+	unsigned ccc_gac:1;		/* AVB-DMAC has gPTP support active in config mode */
 };
 
 struct ravb_private {
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index 8f2358caef34..dc7654abfe55 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -1274,7 +1274,7 @@  static int ravb_set_ringparam(struct net_device *ndev,
 	if (netif_running(ndev)) {
 		netif_device_detach(ndev);
 		/* Stop PTP Clock driver */
-		if (info->no_ptp_cfg_active)
+		if (info->gptp)
 			ravb_ptp_stop(ndev);
 		/* Wait for DMA stopping */
 		error = ravb_stop_dma(ndev);
@@ -1306,7 +1306,7 @@  static int ravb_set_ringparam(struct net_device *ndev,
 		ravb_emac_init(ndev);
 
 		/* Initialise PTP Clock driver */
-		if (info->no_ptp_cfg_active)
+		if (info->gptp)
 			ravb_ptp_init(ndev, priv->pdev);
 
 		netif_device_attach(ndev);
@@ -1446,7 +1446,7 @@  static int ravb_open(struct net_device *ndev)
 	ravb_emac_init(ndev);
 
 	/* Initialise PTP Clock driver */
-	if (info->no_ptp_cfg_active)
+	if (info->gptp)
 		ravb_ptp_init(ndev, priv->pdev);
 
 	netif_tx_start_all_queues(ndev);
@@ -1460,7 +1460,7 @@  static int ravb_open(struct net_device *ndev)
 
 out_ptp_stop:
 	/* Stop PTP Clock driver */
-	if (info->no_ptp_cfg_active)
+	if (info->gptp)
 		ravb_ptp_stop(ndev);
 out_free_irq_nc_tx:
 	if (!info->multi_irqs)
@@ -1508,7 +1508,7 @@  static void ravb_tx_timeout_work(struct work_struct *work)
 	netif_tx_stop_all_queues(ndev);
 
 	/* Stop PTP Clock driver */
-	if (info->no_ptp_cfg_active)
+	if (info->gptp)
 		ravb_ptp_stop(ndev);
 
 	/* Wait for DMA stopping */
@@ -1543,7 +1543,7 @@  static void ravb_tx_timeout_work(struct work_struct *work)
 
 out:
 	/* Initialise PTP Clock driver */
-	if (info->no_ptp_cfg_active)
+	if (info->gptp)
 		ravb_ptp_init(ndev, priv->pdev);
 
 	netif_tx_start_all_queues(ndev);
@@ -1752,7 +1752,7 @@  static int ravb_close(struct net_device *ndev)
 	ravb_write(ndev, 0, TIC);
 
 	/* Stop PTP Clock driver */
-	if (info->no_ptp_cfg_active)
+	if (info->gptp)
 		ravb_ptp_stop(ndev);
 
 	/* Set the config mode to stop the AVB-DMAC's processes */
@@ -2018,7 +2018,7 @@  static const struct ravb_hw_info ravb_gen3_hw_info = {
 	.internal_delay = 1,
 	.tx_counters = 1,
 	.multi_irqs = 1,
-	.ptp_cfg_active = 1,
+	.ccc_gac = 1,
 };
 
 static const struct ravb_hw_info ravb_gen2_hw_info = {
@@ -2037,7 +2037,7 @@  static const struct ravb_hw_info ravb_gen2_hw_info = {
 	.stats_len = ARRAY_SIZE(ravb_gstrings_stats),
 	.max_rx_len = RX_BUF_SZ + RAVB_ALIGN - 1,
 	.aligned_tx = 1,
-	.no_ptp_cfg_active = 1,
+	.gptp = 1,
 };
 
 static const struct of_device_id ravb_match_table[] = {
@@ -2080,7 +2080,7 @@  static void ravb_set_config_mode(struct net_device *ndev)
 	struct ravb_private *priv = netdev_priv(ndev);
 	const struct ravb_hw_info *info = priv->info;
 
-	if (info->no_ptp_cfg_active) {
+	if (info->gptp) {
 		ravb_modify(ndev, CCC, CCC_OPC, CCC_OPC_CONFIG);
 		/* Set CSEL value */
 		ravb_modify(ndev, CCC, CCC_CSEL, CCC_CSEL_HPB);
@@ -2301,7 +2301,7 @@  static int ravb_probe(struct platform_device *pdev)
 	INIT_LIST_HEAD(&priv->ts_skb_list);
 
 	/* Initialise PTP Clock driver */
-	if (info->ptp_cfg_active)
+	if (info->ccc_gac)
 		ravb_ptp_init(ndev, pdev);
 
 	/* Debug message level */
@@ -2349,7 +2349,7 @@  static int ravb_probe(struct platform_device *pdev)
 			  priv->desc_bat_dma);
 
 	/* Stop PTP Clock driver */
-	if (info->ptp_cfg_active)
+	if (info->ccc_gac)
 		ravb_ptp_stop(ndev);
 out_disable_refclk:
 	clk_disable_unprepare(priv->refclk);
@@ -2369,7 +2369,7 @@  static int ravb_remove(struct platform_device *pdev)
 	const struct ravb_hw_info *info = priv->info;
 
 	/* Stop PTP Clock driver */
-	if (info->ptp_cfg_active)
+	if (info->ccc_gac)
 		ravb_ptp_stop(ndev);
 
 	clk_disable_unprepare(priv->refclk);