Commit 5d8e498f authored by David S. Miller's avatar David S. Miller

Merge branch 'ravb-fixes'

Sergei Shtylyov says:

====================
ravb: fix the fallout of R-Car gen3 gPTP support

   Here's a set of 2 patches against DaveM's 'net.git' repo fixing up the
incomplete commit f5d7837f ("ravb: ptp: Add CONFIG mode support").
I'm proposing these as fixes but they can be merged as cleanups as well...

[1/2] ravb: kill duplicate setting of CCC.CSEL
[2/2] ravb: skip gPTP start/stop on R-Car gen3
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents dba36b38 50bfd838
...@@ -1139,7 +1139,8 @@ static int ravb_set_ringparam(struct net_device *ndev, ...@@ -1139,7 +1139,8 @@ 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 */
ravb_ptp_stop(ndev); if (priv->chip_id == RCAR_GEN2)
ravb_ptp_stop(ndev);
/* Wait for DMA stopping */ /* Wait for DMA stopping */
error = ravb_stop_dma(ndev); error = ravb_stop_dma(ndev);
if (error) { if (error) {
...@@ -1170,7 +1171,8 @@ static int ravb_set_ringparam(struct net_device *ndev, ...@@ -1170,7 +1171,8 @@ 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 */
ravb_ptp_init(ndev, priv->pdev); if (priv->chip_id == RCAR_GEN2)
ravb_ptp_init(ndev, priv->pdev);
netif_device_attach(ndev); netif_device_attach(ndev);
} }
...@@ -1298,7 +1300,8 @@ static void ravb_tx_timeout_work(struct work_struct *work) ...@@ -1298,7 +1300,8 @@ 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 */
ravb_ptp_stop(ndev); if (priv->chip_id == RCAR_GEN2)
ravb_ptp_stop(ndev);
/* Wait for DMA stopping */ /* Wait for DMA stopping */
ravb_stop_dma(ndev); ravb_stop_dma(ndev);
...@@ -1311,7 +1314,8 @@ static void ravb_tx_timeout_work(struct work_struct *work) ...@@ -1311,7 +1314,8 @@ static void ravb_tx_timeout_work(struct work_struct *work)
ravb_emac_init(ndev); ravb_emac_init(ndev);
/* Initialise PTP Clock driver */ /* Initialise PTP Clock driver */
ravb_ptp_init(ndev, priv->pdev); if (priv->chip_id == RCAR_GEN2)
ravb_ptp_init(ndev, priv->pdev);
netif_tx_start_all_queues(ndev); netif_tx_start_all_queues(ndev);
} }
...@@ -1814,10 +1818,6 @@ static int ravb_probe(struct platform_device *pdev) ...@@ -1814,10 +1818,6 @@ static int ravb_probe(struct platform_device *pdev)
CCC_OPC_CONFIG | CCC_GAC | CCC_CSEL_HPB, CCC); CCC_OPC_CONFIG | CCC_GAC | CCC_CSEL_HPB, CCC);
} }
/* Set CSEL value */
ravb_write(ndev, (ravb_read(ndev, CCC) & ~CCC_CSEL) | CCC_CSEL_HPB,
CCC);
/* Set GTI value */ /* Set GTI value */
error = ravb_set_gti(ndev); error = ravb_set_gti(ndev);
if (error) if (error)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment