@@ -30,6 +30,7 @@
struct cpsw_phy_sel_priv {
struct device *dev;
+ u32 ignore_slave;
u32 __iomem *gmii_sel;
bool rmii_clock_external;
void (*cpsw_phy_sel)(struct cpsw_phy_sel_priv *priv,
@@ -78,10 +79,13 @@ static void cpsw_gmii_sel_am3352(struct cpsw_phy_sel_priv *priv,
mode <<= slave * 2;
if (priv->rmii_clock_external) {
- if (slave == 0)
- mode |= AM33XX_GMII_SEL_RMII1_IO_CLK_EN;
- else
- mode |= AM33XX_GMII_SEL_RMII2_IO_CLK_EN;
+ if (slave == 0) {
+ if (priv->ignore_slave != slave)
+ mode |= AM33XX_GMII_SEL_RMII1_IO_CLK_EN;
+ } else {
+ if (priv->ignore_slave != slave)
+ mode |= AM33XX_GMII_SEL_RMII2_IO_CLK_EN;
+ }
}
if (rgmii_id) {
@@ -221,6 +225,7 @@ static int cpsw_phy_sel_probe(struct platform_device *pdev)
priv->dev = &pdev->dev;
priv->cpsw_phy_sel = of_id->data;
+ priv->ignore_slave = 0xff;
priv->gmii_sel = devm_platform_ioremap_resource_byname(pdev, "gmii-sel");
if (IS_ERR(priv->gmii_sel))
@@ -229,6 +234,8 @@ static int cpsw_phy_sel_probe(struct platform_device *pdev)
if (of_find_property(pdev->dev.of_node, "rmii-clock-ext", NULL))
priv->rmii_clock_external = true;
+ of_property_read_u32(pdev->dev.of_node, "ignore-slave", &priv->ignore_slave);
+
dev_set_drvdata(&pdev->dev, priv);
return 0;