Commit ccacb703 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by David S. Miller

stmmac: intel: Fix indentation to put on one line affected code

There is no competition to get more LOCs into the kernel, and driver can look
better and have improved readability without those additional line breaks.

While at it, shorten info structures that they are all PCI, at the end it's
a PCI driver for Intel hardware.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d5383b03
...@@ -83,13 +83,9 @@ static int intel_serdes_powerup(struct net_device *ndev, void *priv_data) ...@@ -83,13 +83,9 @@ static int intel_serdes_powerup(struct net_device *ndev, void *priv_data)
serdes_phy_addr = intel_priv->mdio_adhoc_addr; serdes_phy_addr = intel_priv->mdio_adhoc_addr;
/* assert clk_req */ /* assert clk_req */
data = mdiobus_read(priv->mii, serdes_phy_addr, data = mdiobus_read(priv->mii, serdes_phy_addr, SERDES_GCR0);
SERDES_GCR0);
data |= SERDES_PLL_CLK; data |= SERDES_PLL_CLK;
mdiobus_write(priv->mii, serdes_phy_addr, SERDES_GCR0, data);
mdiobus_write(priv->mii, serdes_phy_addr,
SERDES_GCR0, data);
/* check for clk_ack assertion */ /* check for clk_ack assertion */
data = serdes_status_poll(priv, serdes_phy_addr, data = serdes_status_poll(priv, serdes_phy_addr,
...@@ -103,13 +99,9 @@ static int intel_serdes_powerup(struct net_device *ndev, void *priv_data) ...@@ -103,13 +99,9 @@ static int intel_serdes_powerup(struct net_device *ndev, void *priv_data)
} }
/* assert lane reset */ /* assert lane reset */
data = mdiobus_read(priv->mii, serdes_phy_addr, data = mdiobus_read(priv->mii, serdes_phy_addr, SERDES_GCR0);
SERDES_GCR0);
data |= SERDES_RST; data |= SERDES_RST;
mdiobus_write(priv->mii, serdes_phy_addr, SERDES_GCR0, data);
mdiobus_write(priv->mii, serdes_phy_addr,
SERDES_GCR0, data);
/* check for assert lane reset reflection */ /* check for assert lane reset reflection */
data = serdes_status_poll(priv, serdes_phy_addr, data = serdes_status_poll(priv, serdes_phy_addr,
...@@ -123,14 +115,12 @@ static int intel_serdes_powerup(struct net_device *ndev, void *priv_data) ...@@ -123,14 +115,12 @@ static int intel_serdes_powerup(struct net_device *ndev, void *priv_data)
} }
/* move power state to P0 */ /* move power state to P0 */
data = mdiobus_read(priv->mii, serdes_phy_addr, data = mdiobus_read(priv->mii, serdes_phy_addr, SERDES_GCR0);
SERDES_GCR0);
data &= ~SERDES_PWR_ST_MASK; data &= ~SERDES_PWR_ST_MASK;
data |= SERDES_PWR_ST_P0 << SERDES_PWR_ST_SHIFT; data |= SERDES_PWR_ST_P0 << SERDES_PWR_ST_SHIFT;
mdiobus_write(priv->mii, serdes_phy_addr, mdiobus_write(priv->mii, serdes_phy_addr, SERDES_GCR0, data);
SERDES_GCR0, data);
/* Check for P0 state */ /* Check for P0 state */
data = serdes_status_poll(priv, serdes_phy_addr, data = serdes_status_poll(priv, serdes_phy_addr,
...@@ -159,14 +149,12 @@ static void intel_serdes_powerdown(struct net_device *ndev, void *intel_data) ...@@ -159,14 +149,12 @@ static void intel_serdes_powerdown(struct net_device *ndev, void *intel_data)
serdes_phy_addr = intel_priv->mdio_adhoc_addr; serdes_phy_addr = intel_priv->mdio_adhoc_addr;
/* move power state to P3 */ /* move power state to P3 */
data = mdiobus_read(priv->mii, serdes_phy_addr, data = mdiobus_read(priv->mii, serdes_phy_addr, SERDES_GCR0);
SERDES_GCR0);
data &= ~SERDES_PWR_ST_MASK; data &= ~SERDES_PWR_ST_MASK;
data |= SERDES_PWR_ST_P3 << SERDES_PWR_ST_SHIFT; data |= SERDES_PWR_ST_P3 << SERDES_PWR_ST_SHIFT;
mdiobus_write(priv->mii, serdes_phy_addr, mdiobus_write(priv->mii, serdes_phy_addr, SERDES_GCR0, data);
SERDES_GCR0, data);
/* Check for P3 state */ /* Check for P3 state */
data = serdes_status_poll(priv, serdes_phy_addr, data = serdes_status_poll(priv, serdes_phy_addr,
...@@ -180,13 +168,9 @@ static void intel_serdes_powerdown(struct net_device *ndev, void *intel_data) ...@@ -180,13 +168,9 @@ static void intel_serdes_powerdown(struct net_device *ndev, void *intel_data)
} }
/* de-assert clk_req */ /* de-assert clk_req */
data = mdiobus_read(priv->mii, serdes_phy_addr, data = mdiobus_read(priv->mii, serdes_phy_addr, SERDES_GCR0);
SERDES_GCR0);
data &= ~SERDES_PLL_CLK; data &= ~SERDES_PLL_CLK;
mdiobus_write(priv->mii, serdes_phy_addr, SERDES_GCR0, data);
mdiobus_write(priv->mii, serdes_phy_addr,
SERDES_GCR0, data);
/* check for clk_ack de-assert */ /* check for clk_ack de-assert */
data = serdes_status_poll(priv, serdes_phy_addr, data = serdes_status_poll(priv, serdes_phy_addr,
...@@ -200,13 +184,9 @@ static void intel_serdes_powerdown(struct net_device *ndev, void *intel_data) ...@@ -200,13 +184,9 @@ static void intel_serdes_powerdown(struct net_device *ndev, void *intel_data)
} }
/* de-assert lane reset */ /* de-assert lane reset */
data = mdiobus_read(priv->mii, serdes_phy_addr, data = mdiobus_read(priv->mii, serdes_phy_addr, SERDES_GCR0);
SERDES_GCR0);
data &= ~SERDES_RST; data &= ~SERDES_RST;
mdiobus_write(priv->mii, serdes_phy_addr, SERDES_GCR0, data);
mdiobus_write(priv->mii, serdes_phy_addr,
SERDES_GCR0, data);
/* check for de-assert lane reset reflection */ /* check for de-assert lane reset reflection */
data = serdes_status_poll(priv, serdes_phy_addr, data = serdes_status_poll(priv, serdes_phy_addr,
...@@ -367,7 +347,7 @@ static int ehl_sgmii_data(struct pci_dev *pdev, ...@@ -367,7 +347,7 @@ static int ehl_sgmii_data(struct pci_dev *pdev,
return ehl_common_data(pdev, plat); return ehl_common_data(pdev, plat);
} }
static struct stmmac_pci_info ehl_sgmii1g_pci_info = { static struct stmmac_pci_info ehl_sgmii1g_info = {
.setup = ehl_sgmii_data, .setup = ehl_sgmii_data,
}; };
...@@ -381,7 +361,7 @@ static int ehl_rgmii_data(struct pci_dev *pdev, ...@@ -381,7 +361,7 @@ static int ehl_rgmii_data(struct pci_dev *pdev,
return ehl_common_data(pdev, plat); return ehl_common_data(pdev, plat);
} }
static struct stmmac_pci_info ehl_rgmii1g_pci_info = { static struct stmmac_pci_info ehl_rgmii1g_info = {
.setup = ehl_rgmii_data, .setup = ehl_rgmii_data,
}; };
...@@ -400,7 +380,7 @@ static int ehl_pse0_rgmii1g_data(struct pci_dev *pdev, ...@@ -400,7 +380,7 @@ static int ehl_pse0_rgmii1g_data(struct pci_dev *pdev,
return ehl_pse0_common_data(pdev, plat); return ehl_pse0_common_data(pdev, plat);
} }
static struct stmmac_pci_info ehl_pse0_rgmii1g_pci_info = { static struct stmmac_pci_info ehl_pse0_rgmii1g_info = {
.setup = ehl_pse0_rgmii1g_data, .setup = ehl_pse0_rgmii1g_data,
}; };
...@@ -413,7 +393,7 @@ static int ehl_pse0_sgmii1g_data(struct pci_dev *pdev, ...@@ -413,7 +393,7 @@ static int ehl_pse0_sgmii1g_data(struct pci_dev *pdev,
return ehl_pse0_common_data(pdev, plat); return ehl_pse0_common_data(pdev, plat);
} }
static struct stmmac_pci_info ehl_pse0_sgmii1g_pci_info = { static struct stmmac_pci_info ehl_pse0_sgmii1g_info = {
.setup = ehl_pse0_sgmii1g_data, .setup = ehl_pse0_sgmii1g_data,
}; };
...@@ -432,7 +412,7 @@ static int ehl_pse1_rgmii1g_data(struct pci_dev *pdev, ...@@ -432,7 +412,7 @@ static int ehl_pse1_rgmii1g_data(struct pci_dev *pdev,
return ehl_pse1_common_data(pdev, plat); return ehl_pse1_common_data(pdev, plat);
} }
static struct stmmac_pci_info ehl_pse1_rgmii1g_pci_info = { static struct stmmac_pci_info ehl_pse1_rgmii1g_info = {
.setup = ehl_pse1_rgmii1g_data, .setup = ehl_pse1_rgmii1g_data,
}; };
...@@ -445,7 +425,7 @@ static int ehl_pse1_sgmii1g_data(struct pci_dev *pdev, ...@@ -445,7 +425,7 @@ static int ehl_pse1_sgmii1g_data(struct pci_dev *pdev,
return ehl_pse1_common_data(pdev, plat); return ehl_pse1_common_data(pdev, plat);
} }
static struct stmmac_pci_info ehl_pse1_sgmii1g_pci_info = { static struct stmmac_pci_info ehl_pse1_sgmii1g_info = {
.setup = ehl_pse1_sgmii1g_data, .setup = ehl_pse1_sgmii1g_data,
}; };
...@@ -470,7 +450,7 @@ static int tgl_sgmii_data(struct pci_dev *pdev, ...@@ -470,7 +450,7 @@ static int tgl_sgmii_data(struct pci_dev *pdev,
return tgl_common_data(pdev, plat); return tgl_common_data(pdev, plat);
} }
static struct stmmac_pci_info tgl_sgmii1g_pci_info = { static struct stmmac_pci_info tgl_sgmii1g_info = {
.setup = tgl_sgmii_data, .setup = tgl_sgmii_data,
}; };
...@@ -573,7 +553,7 @@ static int quark_default_data(struct pci_dev *pdev, ...@@ -573,7 +553,7 @@ static int quark_default_data(struct pci_dev *pdev,
return 0; return 0;
} }
static const struct stmmac_pci_info quark_pci_info = { static const struct stmmac_pci_info quark_info = {
.setup = quark_default_data, .setup = quark_default_data,
}; };
...@@ -598,8 +578,7 @@ static int intel_eth_pci_probe(struct pci_dev *pdev, ...@@ -598,8 +578,7 @@ static int intel_eth_pci_probe(struct pci_dev *pdev,
struct stmmac_resources res; struct stmmac_resources res;
int ret; int ret;
intel_priv = devm_kzalloc(&pdev->dev, sizeof(*intel_priv), intel_priv = devm_kzalloc(&pdev->dev, sizeof(*intel_priv), GFP_KERNEL);
GFP_KERNEL);
if (!intel_priv) if (!intel_priv)
return -ENOMEM; return -ENOMEM;
...@@ -736,26 +715,19 @@ static SIMPLE_DEV_PM_OPS(intel_eth_pm_ops, intel_eth_pci_suspend, ...@@ -736,26 +715,19 @@ static SIMPLE_DEV_PM_OPS(intel_eth_pm_ops, intel_eth_pci_suspend,
#define PCI_DEVICE_ID_INTEL_TGL_SGMII1G_ID 0xa0ac #define PCI_DEVICE_ID_INTEL_TGL_SGMII1G_ID 0xa0ac
static const struct pci_device_id intel_eth_pci_id_table[] = { static const struct pci_device_id intel_eth_pci_id_table[] = {
{ PCI_DEVICE_DATA(INTEL, QUARK_ID, &quark_pci_info) }, { PCI_DEVICE_DATA(INTEL, QUARK_ID, &quark_info) },
{ PCI_DEVICE_DATA(INTEL, EHL_RGMII1G_ID, &ehl_rgmii1g_pci_info) }, { PCI_DEVICE_DATA(INTEL, EHL_RGMII1G_ID, &ehl_rgmii1g_info) },
{ PCI_DEVICE_DATA(INTEL, EHL_SGMII1G_ID, &ehl_sgmii1g_pci_info) }, { PCI_DEVICE_DATA(INTEL, EHL_SGMII1G_ID, &ehl_sgmii1g_info) },
{ PCI_DEVICE_DATA(INTEL, EHL_SGMII2G5_ID, &ehl_sgmii1g_pci_info) }, { PCI_DEVICE_DATA(INTEL, EHL_SGMII2G5_ID, &ehl_sgmii1g_info) },
{ PCI_DEVICE_DATA(INTEL, EHL_PSE0_RGMII1G_ID, { PCI_DEVICE_DATA(INTEL, EHL_PSE0_RGMII1G_ID, &ehl_pse0_rgmii1g_info) },
&ehl_pse0_rgmii1g_pci_info) }, { PCI_DEVICE_DATA(INTEL, EHL_PSE0_SGMII1G_ID, &ehl_pse0_sgmii1g_info) },
{ PCI_DEVICE_DATA(INTEL, EHL_PSE0_SGMII1G_ID, { PCI_DEVICE_DATA(INTEL, EHL_PSE0_SGMII2G5_ID, &ehl_pse0_sgmii1g_info) },
&ehl_pse0_sgmii1g_pci_info) }, { PCI_DEVICE_DATA(INTEL, EHL_PSE1_RGMII1G_ID, &ehl_pse1_rgmii1g_info) },
{ PCI_DEVICE_DATA(INTEL, EHL_PSE0_SGMII2G5_ID, { PCI_DEVICE_DATA(INTEL, EHL_PSE1_SGMII1G_ID, &ehl_pse1_sgmii1g_info) },
&ehl_pse0_sgmii1g_pci_info) }, { PCI_DEVICE_DATA(INTEL, EHL_PSE1_SGMII2G5_ID, &ehl_pse1_sgmii1g_info) },
{ PCI_DEVICE_DATA(INTEL, EHL_PSE1_RGMII1G_ID, { PCI_DEVICE_DATA(INTEL, TGL_SGMII1G_ID, &tgl_sgmii1g_info) },
&ehl_pse1_rgmii1g_pci_info) },
{ PCI_DEVICE_DATA(INTEL, EHL_PSE1_SGMII1G_ID,
&ehl_pse1_sgmii1g_pci_info) },
{ PCI_DEVICE_DATA(INTEL, EHL_PSE1_SGMII2G5_ID,
&ehl_pse1_sgmii1g_pci_info) },
{ PCI_DEVICE_DATA(INTEL, TGL_SGMII1G_ID, &tgl_sgmii1g_pci_info) },
{} {}
}; };
MODULE_DEVICE_TABLE(pci, intel_eth_pci_id_table); MODULE_DEVICE_TABLE(pci, intel_eth_pci_id_table);
static struct pci_driver intel_eth_pci_driver = { static struct pci_driver intel_eth_pci_driver = {
......
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