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>
This commit is contained in:
parent
d9bc9ec45e
commit
2b061b545c
@ -1000,8 +1000,8 @@ struct ravb_hw_info {
|
|||||||
unsigned internal_delay:1; /* AVB-DMAC has internal delays */
|
unsigned internal_delay:1; /* AVB-DMAC has internal delays */
|
||||||
unsigned tx_counters:1; /* E-MAC has TX counters */
|
unsigned tx_counters:1; /* E-MAC has TX counters */
|
||||||
unsigned multi_irqs:1; /* AVB-DMAC and E-MAC has multiple irqs */
|
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 gptp:1; /* AVB-DMAC has gPTP support */
|
||||||
unsigned ptp_cfg_active:1; /* AVB-DMAC has gPTP support active in config mode */
|
unsigned ccc_gac:1; /* AVB-DMAC has gPTP support active in config mode */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ravb_private {
|
struct ravb_private {
|
||||||
|
@ -1274,7 +1274,7 @@ static int ravb_set_ringparam(struct net_device *ndev,
|
|||||||
if (netif_running(ndev)) {
|
if (netif_running(ndev)) {
|
||||||
netif_device_detach(ndev);
|
netif_device_detach(ndev);
|
||||||
/* Stop PTP Clock driver */
|
/* Stop PTP Clock driver */
|
||||||
if (info->no_ptp_cfg_active)
|
if (info->gptp)
|
||||||
ravb_ptp_stop(ndev);
|
ravb_ptp_stop(ndev);
|
||||||
/* Wait for DMA stopping */
|
/* Wait for DMA stopping */
|
||||||
error = ravb_stop_dma(ndev);
|
error = ravb_stop_dma(ndev);
|
||||||
@ -1306,7 +1306,7 @@ static int ravb_set_ringparam(struct net_device *ndev,
|
|||||||
ravb_emac_init(ndev);
|
ravb_emac_init(ndev);
|
||||||
|
|
||||||
/* Initialise PTP Clock driver */
|
/* Initialise PTP Clock driver */
|
||||||
if (info->no_ptp_cfg_active)
|
if (info->gptp)
|
||||||
ravb_ptp_init(ndev, priv->pdev);
|
ravb_ptp_init(ndev, priv->pdev);
|
||||||
|
|
||||||
netif_device_attach(ndev);
|
netif_device_attach(ndev);
|
||||||
@ -1446,7 +1446,7 @@ static int ravb_open(struct net_device *ndev)
|
|||||||
ravb_emac_init(ndev);
|
ravb_emac_init(ndev);
|
||||||
|
|
||||||
/* Initialise PTP Clock driver */
|
/* Initialise PTP Clock driver */
|
||||||
if (info->no_ptp_cfg_active)
|
if (info->gptp)
|
||||||
ravb_ptp_init(ndev, priv->pdev);
|
ravb_ptp_init(ndev, priv->pdev);
|
||||||
|
|
||||||
netif_tx_start_all_queues(ndev);
|
netif_tx_start_all_queues(ndev);
|
||||||
@ -1460,7 +1460,7 @@ static int ravb_open(struct net_device *ndev)
|
|||||||
|
|
||||||
out_ptp_stop:
|
out_ptp_stop:
|
||||||
/* Stop PTP Clock driver */
|
/* Stop PTP Clock driver */
|
||||||
if (info->no_ptp_cfg_active)
|
if (info->gptp)
|
||||||
ravb_ptp_stop(ndev);
|
ravb_ptp_stop(ndev);
|
||||||
out_free_irq_nc_tx:
|
out_free_irq_nc_tx:
|
||||||
if (!info->multi_irqs)
|
if (!info->multi_irqs)
|
||||||
@ -1508,7 +1508,7 @@ static void ravb_tx_timeout_work(struct work_struct *work)
|
|||||||
netif_tx_stop_all_queues(ndev);
|
netif_tx_stop_all_queues(ndev);
|
||||||
|
|
||||||
/* Stop PTP Clock driver */
|
/* Stop PTP Clock driver */
|
||||||
if (info->no_ptp_cfg_active)
|
if (info->gptp)
|
||||||
ravb_ptp_stop(ndev);
|
ravb_ptp_stop(ndev);
|
||||||
|
|
||||||
/* Wait for DMA stopping */
|
/* Wait for DMA stopping */
|
||||||
@ -1543,7 +1543,7 @@ static void ravb_tx_timeout_work(struct work_struct *work)
|
|||||||
|
|
||||||
out:
|
out:
|
||||||
/* Initialise PTP Clock driver */
|
/* Initialise PTP Clock driver */
|
||||||
if (info->no_ptp_cfg_active)
|
if (info->gptp)
|
||||||
ravb_ptp_init(ndev, priv->pdev);
|
ravb_ptp_init(ndev, priv->pdev);
|
||||||
|
|
||||||
netif_tx_start_all_queues(ndev);
|
netif_tx_start_all_queues(ndev);
|
||||||
@ -1752,7 +1752,7 @@ static int ravb_close(struct net_device *ndev)
|
|||||||
ravb_write(ndev, 0, TIC);
|
ravb_write(ndev, 0, TIC);
|
||||||
|
|
||||||
/* Stop PTP Clock driver */
|
/* Stop PTP Clock driver */
|
||||||
if (info->no_ptp_cfg_active)
|
if (info->gptp)
|
||||||
ravb_ptp_stop(ndev);
|
ravb_ptp_stop(ndev);
|
||||||
|
|
||||||
/* Set the config mode to stop the AVB-DMAC's processes */
|
/* 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,
|
.internal_delay = 1,
|
||||||
.tx_counters = 1,
|
.tx_counters = 1,
|
||||||
.multi_irqs = 1,
|
.multi_irqs = 1,
|
||||||
.ptp_cfg_active = 1,
|
.ccc_gac = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct ravb_hw_info ravb_gen2_hw_info = {
|
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),
|
.stats_len = ARRAY_SIZE(ravb_gstrings_stats),
|
||||||
.max_rx_len = RX_BUF_SZ + RAVB_ALIGN - 1,
|
.max_rx_len = RX_BUF_SZ + RAVB_ALIGN - 1,
|
||||||
.aligned_tx = 1,
|
.aligned_tx = 1,
|
||||||
.no_ptp_cfg_active = 1,
|
.gptp = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct of_device_id ravb_match_table[] = {
|
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);
|
struct ravb_private *priv = netdev_priv(ndev);
|
||||||
const struct ravb_hw_info *info = priv->info;
|
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);
|
ravb_modify(ndev, CCC, CCC_OPC, CCC_OPC_CONFIG);
|
||||||
/* Set CSEL value */
|
/* Set CSEL value */
|
||||||
ravb_modify(ndev, CCC, CCC_CSEL, CCC_CSEL_HPB);
|
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);
|
INIT_LIST_HEAD(&priv->ts_skb_list);
|
||||||
|
|
||||||
/* Initialise PTP Clock driver */
|
/* Initialise PTP Clock driver */
|
||||||
if (info->ptp_cfg_active)
|
if (info->ccc_gac)
|
||||||
ravb_ptp_init(ndev, pdev);
|
ravb_ptp_init(ndev, pdev);
|
||||||
|
|
||||||
/* Debug message level */
|
/* Debug message level */
|
||||||
@ -2349,7 +2349,7 @@ out_dma_free:
|
|||||||
priv->desc_bat_dma);
|
priv->desc_bat_dma);
|
||||||
|
|
||||||
/* Stop PTP Clock driver */
|
/* Stop PTP Clock driver */
|
||||||
if (info->ptp_cfg_active)
|
if (info->ccc_gac)
|
||||||
ravb_ptp_stop(ndev);
|
ravb_ptp_stop(ndev);
|
||||||
out_disable_refclk:
|
out_disable_refclk:
|
||||||
clk_disable_unprepare(priv->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;
|
const struct ravb_hw_info *info = priv->info;
|
||||||
|
|
||||||
/* Stop PTP Clock driver */
|
/* Stop PTP Clock driver */
|
||||||
if (info->ptp_cfg_active)
|
if (info->ccc_gac)
|
||||||
ravb_ptp_stop(ndev);
|
ravb_ptp_stop(ndev);
|
||||||
|
|
||||||
clk_disable_unprepare(priv->refclk);
|
clk_disable_unprepare(priv->refclk);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user