Pārlūkot izejas kodu

Merged TI feature connectivity into ti-linux-4.19.y

* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
  Revert "arm64: dts: k3-j721e-main: Add Support for UHS modes"
  net: ti: icssg_prueth: Reduce verbosity of some debug messages
  net: ti: icssg_classifier: Keep FT1 disabled for default and disabled
  net: ti: icssg_prueth: Fix bug at ifdown under high ingress traffic
  net: ti: prueth: Hook up net device's ioctl to phy_mii_ioctl()
  net: ti: icssg_prueth: Hook up net device's ioctl to phy_mii_ioctl()

Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
LCPD Auto Merger 6 gadi atpakaļ
vecāks
revīzija
50ceb3c6e7

+ 2 - 2
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi

@@ -1930,7 +1930,7 @@
 		ti,otap-del-sel-ddr50 = <0xc>;
 		ti,trm-icp = <0x8>;
 		dma-coherent;
-		sdhci-caps-mask = <0x2 0x0>;
+		no-1-8-v;
 
 	};
 
@@ -1952,7 +1952,7 @@
 		ti,otap-del-sel-ddr50 = <0xc>;
 		ti,trm-icp = <0x8>;
 		dma-coherent;
-		sdhci-caps-mask = <0x2 0x0>;
+		no-1-8-v;
 	};
 
 	main_r5fss0: r5fss@5c00000 {

+ 5 - 36
drivers/net/ethernet/ti/icssg_classifier.c

@@ -264,25 +264,10 @@ void icssg_class_disable(struct regmap *miig_rt, int slice)
 		regmap_write(miig_rt, offset, data);
 	}
 
-	/* FT1 uses 6 bytes of DA address */
-	offset = offs[slice].ft1_start_len;
-	regmap_write(miig_rt, offset, FT1_LEN(6));
-
-	/* FT1 type EQ */
+	/* FT1 Disabled */
 	for (n = 0; n < ICSSG_NUM_FT1_SLOTS; n++)
-		rx_class_ft1_cfg_set_type(miig_rt, slice, n, FT1_CFG_TYPE_EQ);
-
-	/* FT1[0] DA compare address 00-00-00-00-00-00 */
-	offset = FT1_N_REG(slice, 0, FT1_DA0);
-	regmap_write(miig_rt, offset, 0);
-	offset = FT1_N_REG(slice, 0, FT1_DA1);
-	regmap_write(miig_rt, offset, 0);
-
-	/* FT1[0] mask FE-FF-FF-FF-FF-FF */
-	offset = FT1_N_REG(slice, 0, FT1_DA0_MASK);
-	regmap_write(miig_rt, offset, 0);
-	offset = FT1_N_REG(slice, 0, FT1_DA1_MASK);
-	regmap_write(miig_rt, offset, 0);
+		rx_class_ft1_cfg_set_type(miig_rt, slice, n,
+					  FT1_CFG_TYPE_DISABLED);
 
 	/* clear CFG2 */
 	regmap_write(miig_rt, offs[slice].rx_class_cfg2, 0);
@@ -296,28 +281,12 @@ void icssg_class_default(struct regmap *miig_rt, int slice)
 	/* defaults */
 	icssg_class_disable(miig_rt, slice);
 
-	/* FT1 uses 6 bytes of DA address */
-	offset = offs[slice].ft1_start_len;
-	regmap_write(miig_rt, offset, FT1_LEN(6));
-
-	/* FT1 slots type to EQ */
+	/* FT1 Disabled */
 	for (n = 0; n < ICSSG_NUM_FT1_SLOTS; n++) {
 		rx_class_ft1_cfg_set_type(miig_rt, slice, n,
-					  FT1_CFG_TYPE_EQ);
+					  FT1_CFG_TYPE_DISABLED);
 	}
 
-	/* FT1[0] DA compare address 00-00-00-00-00-00 */
-	offset = FT1_N_REG(slice, 0, FT1_DA0);
-	regmap_write(miig_rt, offset, 0);
-	offset = FT1_N_REG(slice, 0, FT1_DA1);
-	regmap_write(miig_rt, offset, 0);
-
-	/* FT1[0] mask 00-00-00-00-00-00 */
-	offset = FT1_N_REG(slice, 0, FT1_DA0_MASK);
-	regmap_write(miig_rt, offset, 0);
-	offset = FT1_N_REG(slice, 0, FT1_DA1_MASK);
-	regmap_write(miig_rt, offset, 0);
-
 	/* Setup Classifier */
 	for (n = 0; n < 5; n++) {
 		/* match on Broadcast or MAC_PRU address */

+ 10 - 8
drivers/net/ethernet/ti/icssg_prueth.c

@@ -232,12 +232,12 @@ static int prueth_init_rx_chns(struct prueth_emac *emac,
 
 	if (!strncmp(name, "rxmgm", 5)) {
 		emac->rx_mgm_flow_id_base = k3_nav_udmax_rx_get_flow_id_base(rx_chn->rx_chn);
-		netdev_info(ndev, "mgm flow id base = %d\n",
-			    emac->rx_mgm_flow_id_base);
+		netdev_dbg(ndev, "mgm flow id base = %d\n",
+			   emac->rx_mgm_flow_id_base);
 	} else {
 		emac->rx_flow_id_base = k3_nav_udmax_rx_get_flow_id_base(rx_chn->rx_chn);
-		netdev_info(ndev, "flow id base = %d\n",
-			    emac->rx_flow_id_base);
+		netdev_dbg(ndev, "flow id base = %d\n",
+			   emac->rx_flow_id_base);
 	}
 
 	fdqring_id = K3_RINGACC_RING_ID_ANY;
@@ -1222,6 +1222,7 @@ static int emac_ndo_stop(struct net_device *ndev)
 	netif_stop_queue(ndev);
 
 	/* block packets from wire */
+	phy_stop(emac->phydev);
 	icssg_class_disable(prueth->miig_rt, prueth_emac_slice(emac));
 
 	/* tear down and disable UDMA channels */
@@ -1259,9 +1260,6 @@ static int emac_ndo_stop(struct net_device *ndev)
 	napi_disable(&emac->napi_tx);
 	napi_disable(&emac->napi_rx);
 
-	/* stop PHY */
-	phy_stop(emac->phydev);
-
 	/* stop PRUs */
 	prueth_emac_stop(emac);
 
@@ -1397,14 +1395,18 @@ static int emac_get_ts_config(struct net_device *ndev, struct ifreq *ifr)
 
 static int emac_ndo_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd)
 {
+	struct prueth_emac *emac = netdev_priv(ndev);
+
 	switch (cmd) {
 	case SIOCGHWTSTAMP:
 		return emac_get_ts_config(ndev, ifr);
 	case SIOCSHWTSTAMP:
 		return emac_set_ts_config(ndev, ifr);
 	default:
-		return -EOPNOTSUPP;
+		break;
 	}
+
+	return phy_mii_ioctl(emac->phydev, ifr, cmd);
 }
 
 static const struct net_device_ops emac_netdev_ops = {

+ 8 - 0
drivers/net/ethernet/ti/prueth.c

@@ -1243,6 +1243,13 @@ static void emac_ndo_set_rx_mode(struct net_device *ndev)
 	writel(reg, sram + EMAC_PROMISCUOUS_MODE_OFFSET);
 }
 
+static int emac_ndo_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd)
+{
+	struct prueth_emac *emac = netdev_priv(ndev);
+
+	return phy_mii_ioctl(emac->phydev, ifr, cmd);
+}
+
 static const struct net_device_ops emac_netdev_ops = {
 	.ndo_open = emac_ndo_open,
 	.ndo_stop = emac_ndo_stop,
@@ -1253,6 +1260,7 @@ static const struct net_device_ops emac_netdev_ops = {
 	.ndo_tx_timeout = emac_ndo_tx_timeout,
 	.ndo_get_stats = emac_ndo_get_stats,
 	.ndo_set_rx_mode = emac_ndo_set_rx_mode,
+	.ndo_do_ioctl = emac_ndo_ioctl,
 };
 
 /**