Skip to content

Commit 2b061b5

Browse files
bijudasdavem330
authored andcommitted
ravb: Rename "no_ptp_cfg_active" and "ptp_cfg_active" variables
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> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d9bc9ec commit 2b061b5

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

drivers/net/ethernet/renesas/ravb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,8 +1000,8 @@ struct ravb_hw_info {
10001000
unsigned internal_delay:1; /* AVB-DMAC has internal delays */
10011001
unsigned tx_counters:1; /* E-MAC has TX counters */
10021002
unsigned multi_irqs:1; /* AVB-DMAC and E-MAC has multiple irqs */
1003-
unsigned no_ptp_cfg_active:1; /* AVB-DMAC does not support gPTP active in config mode */
1004-
unsigned ptp_cfg_active:1; /* AVB-DMAC has gPTP support active in config mode */
1003+
unsigned gptp:1; /* AVB-DMAC has gPTP support */
1004+
unsigned ccc_gac:1; /* AVB-DMAC has gPTP support active in config mode */
10051005
};
10061006

10071007
struct ravb_private {

drivers/net/ethernet/renesas/ravb_main.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ static int ravb_set_ringparam(struct net_device *ndev,
12741274
if (netif_running(ndev)) {
12751275
netif_device_detach(ndev);
12761276
/* Stop PTP Clock driver */
1277-
if (info->no_ptp_cfg_active)
1277+
if (info->gptp)
12781278
ravb_ptp_stop(ndev);
12791279
/* Wait for DMA stopping */
12801280
error = ravb_stop_dma(ndev);
@@ -1306,7 +1306,7 @@ static int ravb_set_ringparam(struct net_device *ndev,
13061306
ravb_emac_init(ndev);
13071307

13081308
/* Initialise PTP Clock driver */
1309-
if (info->no_ptp_cfg_active)
1309+
if (info->gptp)
13101310
ravb_ptp_init(ndev, priv->pdev);
13111311

13121312
netif_device_attach(ndev);
@@ -1446,7 +1446,7 @@ static int ravb_open(struct net_device *ndev)
14461446
ravb_emac_init(ndev);
14471447

14481448
/* Initialise PTP Clock driver */
1449-
if (info->no_ptp_cfg_active)
1449+
if (info->gptp)
14501450
ravb_ptp_init(ndev, priv->pdev);
14511451

14521452
netif_tx_start_all_queues(ndev);
@@ -1460,7 +1460,7 @@ static int ravb_open(struct net_device *ndev)
14601460

14611461
out_ptp_stop:
14621462
/* Stop PTP Clock driver */
1463-
if (info->no_ptp_cfg_active)
1463+
if (info->gptp)
14641464
ravb_ptp_stop(ndev);
14651465
out_free_irq_nc_tx:
14661466
if (!info->multi_irqs)
@@ -1508,7 +1508,7 @@ static void ravb_tx_timeout_work(struct work_struct *work)
15081508
netif_tx_stop_all_queues(ndev);
15091509

15101510
/* Stop PTP Clock driver */
1511-
if (info->no_ptp_cfg_active)
1511+
if (info->gptp)
15121512
ravb_ptp_stop(ndev);
15131513

15141514
/* Wait for DMA stopping */
@@ -1543,7 +1543,7 @@ static void ravb_tx_timeout_work(struct work_struct *work)
15431543

15441544
out:
15451545
/* Initialise PTP Clock driver */
1546-
if (info->no_ptp_cfg_active)
1546+
if (info->gptp)
15471547
ravb_ptp_init(ndev, priv->pdev);
15481548

15491549
netif_tx_start_all_queues(ndev);
@@ -1752,7 +1752,7 @@ static int ravb_close(struct net_device *ndev)
17521752
ravb_write(ndev, 0, TIC);
17531753

17541754
/* Stop PTP Clock driver */
1755-
if (info->no_ptp_cfg_active)
1755+
if (info->gptp)
17561756
ravb_ptp_stop(ndev);
17571757

17581758
/* 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 = {
20182018
.internal_delay = 1,
20192019
.tx_counters = 1,
20202020
.multi_irqs = 1,
2021-
.ptp_cfg_active = 1,
2021+
.ccc_gac = 1,
20222022
};
20232023

20242024
static const struct ravb_hw_info ravb_gen2_hw_info = {
@@ -2037,7 +2037,7 @@ static const struct ravb_hw_info ravb_gen2_hw_info = {
20372037
.stats_len = ARRAY_SIZE(ravb_gstrings_stats),
20382038
.max_rx_len = RX_BUF_SZ + RAVB_ALIGN - 1,
20392039
.aligned_tx = 1,
2040-
.no_ptp_cfg_active = 1,
2040+
.gptp = 1,
20412041
};
20422042

20432043
static const struct of_device_id ravb_match_table[] = {
@@ -2080,7 +2080,7 @@ static void ravb_set_config_mode(struct net_device *ndev)
20802080
struct ravb_private *priv = netdev_priv(ndev);
20812081
const struct ravb_hw_info *info = priv->info;
20822082

2083-
if (info->no_ptp_cfg_active) {
2083+
if (info->gptp) {
20842084
ravb_modify(ndev, CCC, CCC_OPC, CCC_OPC_CONFIG);
20852085
/* Set CSEL value */
20862086
ravb_modify(ndev, CCC, CCC_CSEL, CCC_CSEL_HPB);
@@ -2301,7 +2301,7 @@ static int ravb_probe(struct platform_device *pdev)
23012301
INIT_LIST_HEAD(&priv->ts_skb_list);
23022302

23032303
/* Initialise PTP Clock driver */
2304-
if (info->ptp_cfg_active)
2304+
if (info->ccc_gac)
23052305
ravb_ptp_init(ndev, pdev);
23062306

23072307
/* Debug message level */
@@ -2349,7 +2349,7 @@ static int ravb_probe(struct platform_device *pdev)
23492349
priv->desc_bat_dma);
23502350

23512351
/* Stop PTP Clock driver */
2352-
if (info->ptp_cfg_active)
2352+
if (info->ccc_gac)
23532353
ravb_ptp_stop(ndev);
23542354
out_disable_refclk:
23552355
clk_disable_unprepare(priv->refclk);
@@ -2369,7 +2369,7 @@ static int ravb_remove(struct platform_device *pdev)
23692369
const struct ravb_hw_info *info = priv->info;
23702370

23712371
/* Stop PTP Clock driver */
2372-
if (info->ptp_cfg_active)
2372+
if (info->ccc_gac)
23732373
ravb_ptp_stop(ndev);
23742374

23752375
clk_disable_unprepare(priv->refclk);

0 commit comments

Comments
 (0)