rtl83xx: pr_info->pr_debug
authorJohn Crispin <john@phrozen.org>
Tue, 24 Nov 2020 09:59:01 +0000 (10:59 +0100)
committerJohn Crispin <john@phrozen.org>
Tue, 24 Nov 2020 14:16:38 +0000 (15:16 +0100)
Signed-off-by: John Crispin <john@phrozen.org>
target/linux/rtl838x/files-5.4/drivers/net/dsa/rtl83xx/common.c
target/linux/rtl838x/files-5.4/drivers/net/dsa/rtl83xx/debugfs.c
target/linux/rtl838x/files-5.4/drivers/net/dsa/rtl83xx/dsa.c
target/linux/rtl838x/files-5.4/drivers/net/dsa/rtl83xx/phy.c
target/linux/rtl838x/files-5.4/drivers/net/dsa/rtl83xx/rtl838x.c
target/linux/rtl838x/files-5.4/drivers/net/dsa/rtl83xx/rtl839x.c
target/linux/rtl838x/files-5.4/drivers/net/dsa/rtl83xx/storm.c

index 9a995834b131bcff0907907172e1b51543fe6789..cee36683e512ebfeea834d558f67f003cf2eaf7c 100644 (file)
@@ -29,7 +29,7 @@ static void dump_fdb(struct rtl838x_switch_priv *priv)
                if (!e.valid) /* Check for invalid entry */
                        continue;
 
-               pr_info("-> port %02d: mac %pM, vid: %d, rvid: %d, MC: %d, %d\n",
+               pr_debug("-> port %02d: mac %pM, vid: %d, rvid: %d, MC: %d, %d\n",
                        e.port, &e.mac[0], e.vid, e.rvid, e.is_ip_mc, e.is_ipv6_mc);
        }
 
@@ -142,7 +142,7 @@ static void rtl8380_sds_rst(int mac)
        sw_w32_mask(0x3, 0x3, RTL838X_SDS4_REG28 + offset);
        sw_w32_mask(0, 0x1 << 6, RTL838X_SDS4_DUMMY0 + offset);
        sw_w32_mask(0x1 << 6, 0, RTL838X_SDS4_DUMMY0 + offset);
-       pr_info("SERDES reset: %d\n", mac);
+       pr_debug("SERDES reset: %d\n", mac);
 }
 
 static int __init rtl8380_sds_power(int mac, int val)
@@ -170,10 +170,10 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv)
        int ret;
        u32 pn;
 
-       pr_info("In %s\n", __func__);
+       pr_debug("In %s\n", __func__);
        mii_np = of_find_compatible_node(NULL, NULL, "realtek,rtl838x-mdio");
        if (mii_np) {
-               pr_info("Found compatible MDIO node!\n");
+               pr_debug("Found compatible MDIO node!\n");
        } else {
                dev_err(priv->dev, "no %s child node found", "mdio-bus");
                return -ENODEV;
@@ -181,7 +181,7 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv)
 
        priv->mii_bus = of_mdio_find_bus(mii_np);
        if (!priv->mii_bus) {
-               pr_info("Deferring probe of mdio bus\n");
+               pr_debug("Deferring probe of mdio bus\n");
                return -EPROBE_DEFER;
        }
        if (!of_device_is_available(mii_np))
@@ -215,7 +215,7 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv)
                // Check for the integrated SerDes of the RTL8380M first
                if (of_property_read_bool(dn, "phy-is-integrated")
                        && priv->id == 0x8380 && pn >= 24) {
-                       pr_info("----> FÓUND A SERDES\n");
+                       pr_debug("----> FÓUND A SERDES\n");
                        priv->ports[pn].phy = PHY_RTL838X_SDS;
                        continue;
                }
@@ -253,12 +253,12 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv)
 
        /* Power on fibre ports and reset them if necessary */
        if (priv->ports[24].phy == PHY_RTL838X_SDS) {
-               pr_info("Powering on fibre ports & reset\n");
+               pr_debug("Powering on fibre ports & reset\n");
                rtl8380_sds_power(24, 1);
                rtl8380_sds_power(26, 1);
        }
 
-       pr_info("%s done\n", __func__);
+       pr_debug("%s done\n", __func__);
        return 0;
 }
 
@@ -273,8 +273,8 @@ static int __init rtl83xx_get_l2aging(struct rtl838x_switch_priv *priv)
        else
                t = (t * 3) / 5;
 
-       pr_info("L2 AGING time: %d sec\n", t);
-       pr_info("Dynamic aging for ports: %x\n", sw_r32(priv->r->l2_port_aging_out));
+       pr_debug("L2 AGING time: %d sec\n", t);
+       pr_debug("Dynamic aging for ports: %x\n", sw_r32(priv->r->l2_port_aging_out));
        return t;
 }
 
@@ -285,7 +285,7 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
        u64 irq_mask;
 
-       pr_info("Probing RTL838X switch device\n");
+       pr_debug("Probing RTL838X switch device\n");
        if (!pdev->dev.of_node) {
                dev_err(dev, "No DT found\n");
                return -EINVAL;
@@ -321,7 +321,7 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
                priv->fib_entries = 16384;
                rtl8390_get_version(priv);
        }
-       pr_info("Chip version %c\n", priv->version);
+       pr_debug("Chip version %c\n", priv->version);
 
        err = rtl83xx_mdio_probe(priv);
        if (err) {
@@ -378,7 +378,7 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
 static int rtl83xx_sw_remove(struct platform_device *pdev)
 {
        // TODO:
-       pr_info("Removing platform driver for rtl83xx-sw\n");
+       pr_debug("Removing platform driver for rtl83xx-sw\n");
        return 0;
 }
 
index 67e6e30ba00c42272d24975ee888c4df1e92780c..b2bb9049d028acf0aa32e760af8bff8445bf35b9 100644 (file)
@@ -69,7 +69,7 @@ void rtl838x_dbgfs_init(struct rtl838x_switch_priv *priv)
        /* Create one directory per port */
        for (i = 0; i < priv->cpu_port; i++) {
                if (priv->ports[i].phy) {
-                       pr_info("debugfs, port %d\n", i);
+                       pr_debug("debugfs, port %d\n", i);
                        ret = rtl838x_dbgfs_port_init(rtl838x_dir, priv, i);
                        if (ret)
                                goto err;
index 3600bbbd1b9a7df4d3f5b94e71612bf45009b79b..2a44bd131a4d11fa60de9d0f394733455c7a8156 100644 (file)
@@ -19,16 +19,16 @@ static void rtl83xx_print_matrix(void)
        if (soc_info.family == RTL8380_FAMILY_ID) {
                ptr8 = RTL838X_SW_BASE + RTL838X_PORT_ISO_CTRL(0);
                for (i = 0; i < 28; i += 8)
-                       pr_info("> %8x %8x %8x %8x %8x %8x %8x %8x\n",
+                       pr_debug("> %8x %8x %8x %8x %8x %8x %8x %8x\n",
                                ptr8[i + 0], ptr8[i + 1], ptr8[i + 2], ptr8[i + 3],
                                ptr8[i + 4], ptr8[i + 5], ptr8[i + 6], ptr8[i + 7]);
-               pr_info("CPU_PORT> %8x\n", ptr8[28]);
+               pr_debug("CPU_PORT> %8x\n", ptr8[28]);
        } else {
                ptr9 = RTL838X_SW_BASE + RTL839X_PORT_ISO_CTRL(0);
                for (i = 0; i < 52; i += 4)
-                       pr_info("> %16llx %16llx %16llx %16llx\n",
+                       pr_debug("> %16llx %16llx %16llx %16llx\n",
                                ptr9[i + 0], ptr9[i + 1], ptr9[i + 2], ptr9[i + 3]);
-               pr_info("CPU_PORT> %16llx\n", ptr9[52]);
+               pr_debug("CPU_PORT> %16llx\n", ptr9[52]);
        }
 
 }
@@ -98,7 +98,7 @@ static void rtl83xx_enable_phy_polling(struct rtl838x_switch_priv *priv)
                        v |= BIT(i);
        }
 
-       pr_info("%s: %16llx\n", __func__, v);
+       pr_debug("%s: %16llx\n", __func__, v);
        priv->r->set_port_reg_le(v, priv->r->smi_poll_ctrl);
 
        /* PHY update complete */
@@ -175,7 +175,7 @@ static int rtl83xx_setup(struct dsa_switch *ds)
        struct rtl838x_switch_priv *priv = ds->priv;
        u64 port_bitmap = BIT_ULL(priv->cpu_port);
 
-       pr_info("%s called\n", __func__);
+       pr_debug("%s called\n", __func__);
 
        /* Disable MAC polling the PHY so that we can start configuration */
        priv->r->set_port_reg_le(0ULL, priv->r->smi_poll_ctrl);
@@ -203,7 +203,7 @@ static int rtl83xx_setup(struct dsa_switch *ds)
 
        /* Enable MAC Polling PHY again */
        rtl83xx_enable_phy_polling(priv);
-       pr_info("Please wait until PHY is settled\n");
+       pr_debug("Please wait until PHY is settled\n");
        msleep(1000);
        return 0;
 }
@@ -215,7 +215,7 @@ static void rtl83xx_phylink_validate(struct dsa_switch *ds, int port,
        struct rtl838x_switch_priv *priv = ds->priv;
        __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
 
-       pr_info("In %s port %d", __func__, port);
+       pr_debug("In %s port %d", __func__, port);
 
        if (!phy_interface_mode_is_rgmii(state->interface) &&
            state->interface != PHY_INTERFACE_MODE_1000BASEX &&
@@ -313,7 +313,7 @@ static void rtl83xx_phylink_mac_config(struct dsa_switch *ds, int port,
        u32 reg;
        int speed_bit = priv->family_id == RTL8380_FAMILY_ID ? 4 : 3;
 
-       pr_info("%s port %d, mode %x\n", __func__, port, mode);
+       pr_debug("%s port %d, mode %x\n", __func__, port, mode);
 
        if (port == priv->cpu_port) {
                /* Set Speed, duplex, flow control
@@ -335,7 +335,7 @@ static void rtl83xx_phylink_mac_config(struct dsa_switch *ds, int port,
        /* Auto-Negotiation does not work for MAC in RTL8390 */
        if (priv->family_id == RTL8380_FAMILY_ID) {
                if (mode == MLO_AN_PHY) {
-                       pr_info("PHY autonegotiates\n");
+                       pr_debug("PHY autonegotiates\n");
                        reg |= BIT(2);
                        sw_w32(reg, priv->r->mac_force_mode_ctrl(port));
                        return;
@@ -343,7 +343,7 @@ static void rtl83xx_phylink_mac_config(struct dsa_switch *ds, int port,
        }
 
        if (mode != MLO_AN_FIXED)
-               pr_info("Fixed state.\n");
+               pr_debug("Fixed state.\n");
 
        if (priv->family_id == RTL8380_FAMILY_ID) {
                /* Clear id_mode_dis bit, and the existing port mode, let
@@ -446,7 +446,7 @@ static int rtl83xx_port_enable(struct dsa_switch *ds, int port,
 {
        struct rtl838x_switch_priv *priv = ds->priv;
 
-       pr_info("%s: %x %d", __func__, (u32) priv, port);
+       pr_debug("%s: %x %d", __func__, (u32) priv, port);
        priv->ports[port].enable = true;
 
        if (dsa_is_cpu_port(ds, port))
@@ -465,7 +465,7 @@ static void rtl83xx_port_disable(struct dsa_switch *ds, int port)
 {
        struct rtl838x_switch_priv *priv = ds->priv;
 
-       pr_info("%s %x: %d", __func__, (u32)priv, port);
+       pr_debug("%s %x: %d", __func__, (u32)priv, port);
        /* you can only disable user ports */
        if (!dsa_is_user_port(ds, port))
                return;
@@ -484,7 +484,7 @@ static int rtl83xx_get_mac_eee(struct dsa_switch *ds, int port,
 {
        struct rtl838x_switch_priv *priv = ds->priv;
 
-       pr_info("%s: port %d", __func__, port);
+       pr_debug("%s: port %d", __func__, port);
        e->supported = SUPPORTED_100baseT_Full | SUPPORTED_1000baseT_Full;
        if (sw_r32(priv->r->mac_force_mode_ctrl(port)) & BIT(9))
                e->advertised |= ADVERTISED_100baseT_Full;
@@ -493,7 +493,7 @@ static int rtl83xx_get_mac_eee(struct dsa_switch *ds, int port,
                e->advertised |= ADVERTISED_1000baseT_Full;
 
        e->eee_enabled = priv->ports[port].eee_enabled;
-       pr_info("enabled: %d, active %x\n", e->eee_enabled, e->advertised);
+       pr_debug("enabled: %d, active %x\n", e->eee_enabled, e->advertised);
 
        if (sw_r32(RTL838X_MAC_EEE_ABLTY) & BIT(port)) {
                e->lp_advertised = ADVERTISED_100baseT_Full;
@@ -501,7 +501,7 @@ static int rtl83xx_get_mac_eee(struct dsa_switch *ds, int port,
        }
 
        e->eee_active = !!(e->advertised & e->lp_advertised);
-       pr_info("active: %d, lp %x\n", e->eee_active, e->lp_advertised);
+       pr_debug("active: %d, lp %x\n", e->eee_active, e->lp_advertised);
 
        return 0;
 }
@@ -511,20 +511,20 @@ static int rtl83xx_set_mac_eee(struct dsa_switch *ds, int port,
 {
        struct rtl838x_switch_priv *priv = ds->priv;
 
-       pr_info("%s: port %d", __func__, port);
+       pr_debug("%s: port %d", __func__, port);
        if (e->eee_enabled) {
-               pr_info("Globally enabling EEE\n");
+               pr_debug("Globally enabling EEE\n");
                sw_w32_mask(0x4, 0, RTL838X_SMI_GLB_CTRL);
        }
        if (e->eee_enabled) {
-               pr_info("Enabling EEE for MAC %d\n", port);
+               pr_debug("Enabling EEE for MAC %d\n", port);
                sw_w32_mask(0, 3 << 9, priv->r->mac_force_mode_ctrl(port));
                sw_w32_mask(0, BIT(port), RTL838X_EEE_PORT_TX_EN);
                sw_w32_mask(0, BIT(port), RTL838X_EEE_PORT_RX_EN);
                priv->ports[port].eee_enabled = true;
                e->eee_enabled = true;
        } else {
-               pr_info("Disabling EEE for MAC %d\n", port);
+               pr_debug("Disabling EEE for MAC %d\n", port);
                sw_w32_mask(3 << 9, 0, priv->r->mac_force_mode_ctrl(port));
                sw_w32_mask(BIT(port), 0, RTL838X_EEE_PORT_TX_EN);
                sw_w32_mask(BIT(port), 0, RTL838X_EEE_PORT_RX_EN);
@@ -563,7 +563,7 @@ static int rtl83xx_port_bridge_join(struct dsa_switch *ds, int port,
        u64 port_bitmap = BIT_ULL(priv->cpu_port);
        int i;
 
-       pr_info("%s %x: %d %llx", __func__, (u32)priv, port, port_bitmap);
+       pr_debug("%s %x: %d %llx", __func__, (u32)priv, port, port_bitmap);
        mutex_lock(&priv->reg_mutex);
        for (i = 0; i < ds->num_ports; i++) {
                /* Add this port to the port matrix of the other ports in the
@@ -602,7 +602,7 @@ static void rtl83xx_port_bridge_leave(struct dsa_switch *ds, int port,
        u64 port_bitmap = BIT_ULL(priv->cpu_port);
        int i;
 
-       pr_info("%s %x: %d", __func__, (u32)priv, port);
+       pr_debug("%s %x: %d", __func__, (u32)priv, port);
        mutex_lock(&priv->reg_mutex);
        for (i = 0; i < ds->num_ports; i++) {
                /* Remove this port from the port matrix of the other ports
@@ -641,7 +641,7 @@ static void rtl83xx_port_stp_state_set(struct dsa_switch *ds, int port,
        struct rtl838x_switch_priv *priv = ds->priv;
        int n = priv->family_id == RTL8380_FAMILY_ID ? 2 : 4;
 
-       pr_info("%s: port %d state %2x\n", __func__, port, state);
+       pr_debug("%s: port %d state %2x\n", __func__, port, state);
 
        /* CPU PORT can only be configured on RTL838x */
        if (port >= priv->cpu_port || port > 51)
@@ -715,7 +715,7 @@ static void rtl83xx_fast_age(struct dsa_switch *ds, int port)
        struct rtl838x_switch_priv *priv = ds->priv;
        int s = priv->family_id == RTL8390_FAMILY_ID ? 2 : 0;
 
-       pr_info("FAST AGE port %d\n", port);
+       pr_debug("FAST AGE port %d\n", port);
        mutex_lock(&priv->reg_mutex);
        /* RTL838X_L2_TBL_FLUSH_CTRL register bits, 839x has 1 bit larger
         * port fields:
@@ -740,7 +740,7 @@ static int rtl83xx_vlan_filtering(struct dsa_switch *ds, int port,
 {
        struct rtl838x_switch_priv *priv = ds->priv;
 
-       pr_info("%s: port %d\n", __func__, port);
+       pr_debug("%s: port %d\n", __func__, port);
        mutex_lock(&priv->reg_mutex);
 
        if (vlan_filtering) {
@@ -769,7 +769,7 @@ static int rtl83xx_vlan_prepare(struct dsa_switch *ds, int port,
        struct rtl838x_vlan_info info;
        struct rtl838x_switch_priv *priv = ds->priv;
 
-       pr_info("%s: port %d\n", __func__, port);
+       pr_debug("%s: port %d\n", __func__, port);
 
        mutex_lock(&priv->reg_mutex);
 
@@ -780,7 +780,7 @@ static int rtl83xx_vlan_prepare(struct dsa_switch *ds, int port,
 
        priv->r->vlan_tables_read(0, &info);
 
-       pr_info("Tagged ports %llx, untag %llx, prof %x, MC# %d, UC# %d, FID %x\n",
+       pr_debug("Tagged ports %llx, untag %llx, prof %x, MC# %d, UC# %d, FID %x\n",
                info.tagged_ports, info.untagged_ports, info.profile_id,
                info.hash_mc, info.hash_uc, info.fid);
 
@@ -796,7 +796,7 @@ static void rtl83xx_vlan_add(struct dsa_switch *ds, int port,
        int v;
        u64 portmask;
 
-       pr_info("%s port %d, vid_end %d, vid_end %d, flags %x\n", __func__,
+       pr_debug("%s port %d, vid_end %d, vid_end %d, flags %x\n", __func__,
                port, vlan->vid_begin, vlan->vid_end, vlan->flags);
 
        if (vlan->vid_begin > 4095 || vlan->vid_end > 4095) {
@@ -843,7 +843,7 @@ static int rtl83xx_vlan_del(struct dsa_switch *ds, int port,
        int v;
        u64 portmask;
 
-       pr_info("%s: port %d, vid_end %d, vid_end %d, flags %x\n", __func__,
+       pr_debug("%s: port %d, vid_end %d, vid_end %d, flags %x\n", __func__,
                port, vlan->vid_begin, vlan->vid_end, vlan->flags);
 
        if (vlan->vid_begin > 4095 || vlan->vid_end > 4095) {
@@ -862,14 +862,14 @@ static int rtl83xx_vlan_del(struct dsa_switch *ds, int port,
                        /* Get untagged port memberships of this vlan */
                        priv->r->vlan_tables_read(v, &info);
                        portmask = info.untagged_ports & (~(1ULL << port));
-                       pr_info("Untagged ports, VLAN %d: %llx\n", v, portmask);
+                       pr_debug("Untagged ports, VLAN %d: %llx\n", v, portmask);
                        priv->r->vlan_set_untagged(v, portmask);
                }
 
                /* Get tagged port memberships of this vlan */
                priv->r->vlan_tables_read(v, &info);
                info.tagged_ports &= (~(1ULL << port));
-               pr_info("Tagged ports, VLAN %d: %llx\n", v, info.tagged_ports);
+               pr_debug("Tagged ports, VLAN %d: %llx\n", v, info.tagged_ports);
                priv->r->vlan_set_tagged(v, &info);
        }
        mutex_unlock(&priv->reg_mutex);
@@ -947,7 +947,7 @@ static int rtl83xx_port_fdb_del(struct dsa_switch *ds, int port,
        u64 entry;
        int idx = -1, err = 0, i;
 
-       pr_info("In %s, mac %llx, vid: %d, key: %x\n", __func__, mac, vid, key);
+       pr_debug("In %s, mac %llx, vid: %d, key: %x\n", __func__, mac, vid, key);
        mutex_lock(&priv->reg_mutex);
        for (i = 0; i < 4; i++) {
                entry = priv->r->read_l2_entry_using_hash(key, i, &e);
@@ -1007,7 +1007,7 @@ static int rtl83xx_port_fdb_dump(struct dsa_switch *ds, int port,
                        mac = ether_addr_to_u64(&e.mac[0]);
                        pkey = rtl838x_hash(priv, mac << 12 | fid);
                        fid = (pkey & 0x3ff) | (fid & ~0x3ff);
-                       pr_info("-> mac %016llx, fid: %d\n", mac, fid);
+                       pr_debug("-> mac %016llx, fid: %d\n", mac, fid);
                        cb(e.mac, e.vid, e.is_static, data);
                }
        }
@@ -1034,7 +1034,7 @@ static int rtl83xx_port_mirror_add(struct dsa_switch *ds, int port,
        int group;
        struct rtl838x_switch_priv *priv = ds->priv;
 
-       pr_info("In %s\n", __func__);
+       pr_debug("In %s\n", __func__);
 
        for (group = 0; group < 4; group++) {
                if (priv->mirror_group_ports[group] == mirror->to_local_port)
@@ -1086,7 +1086,7 @@ static void rtl83xx_port_mirror_del(struct dsa_switch *ds, int port,
        int group = 0;
        struct rtl838x_switch_priv *priv = ds->priv;
 
-       pr_info("In %s\n", __func__);
+       pr_debug("In %s\n", __func__);
        for (group = 0; group < 4; group++) {
                if (priv->mirror_group_ports[group] == mirror->to_local_port)
                        break;
index 85ab17626e2a7c626c822c6082d6409830c8da60..5b734d4a529dab125c45b4d7735d2d9ddf857988 100644 (file)
@@ -169,7 +169,7 @@ static struct fw_header *rtl838x_request_fw(struct phy_device *phydev,
        }
 
        h = (struct fw_header *) fw->data;
-       pr_info("Firmware loaded. Size %d, magic: %08x\n", fw->size, h->magic);
+       pr_debug("Firmware loaded. Size %d, magic: %08x\n", fw->size, h->magic);
 
        if (h->magic != 0x83808380) {
                pr_err("Wrong firmware file: MAGIC mismatch.\n");
@@ -320,7 +320,7 @@ static int rtl8380_configure_ext_rtl8218b(struct phy_device *phydev)
        phy_id = val << 16;
        read_phy(mac, 0, 3, &val);
        phy_id |= val;
-       pr_info("Phy on MAC %d: %x\n", mac, phy_id);
+       pr_debug("Phy on MAC %d: %x\n", mac, phy_id);
 
        /* Read internal PHY ID */
        write_phy(mac, 31, 27, 0x0002);
@@ -548,21 +548,21 @@ static void rtl8380_rtl8214fc_media_set(int mac, bool set_fibre)
        static int reg[] = {16, 19, 20, 21};
        int val, media, power;
 
-       pr_info("%s: port %d, set_fibre: %d\n", __func__, mac, set_fibre);
+       pr_debug("%s: port %d, set_fibre: %d\n", __func__, mac, set_fibre);
        write_phy(base, 0xfff, 29, 8);
        read_phy(base, 0x266, reg[mac % 4], &val);
 
        media = (val >> 10) & 0x3;
-       pr_info("Current media %x\n", media);
+       pr_debug("Current media %x\n", media);
        if (media & 0x2) {
-               pr_info("Powering off COPPER\n");
+               pr_debug("Powering off COPPER\n");
                write_phy(base, 0xfff, 29, 1);
                /* Ensure power is off */
                read_phy(base, 0xa40, 16, &power);
                if (!(power & BIT(11)))
                        write_phy(base, 0xa40, 16, power | BIT(11));
        } else {
-               pr_info("Powering off FIBRE");
+               pr_debug("Powering off FIBRE");
                write_phy(base, 0xfff, 29, 3);
                /* Ensure power is off */
                read_phy(base, 0xa40, 16, &power);
@@ -582,14 +582,14 @@ static void rtl8380_rtl8214fc_media_set(int mac, bool set_fibre)
        write_phy(base, 0xfff, 29, 0);
 
        if (set_fibre) {
-               pr_info("Powering on FIBRE");
+               pr_debug("Powering on FIBRE");
                write_phy(base, 0xfff, 29, 3);
                /* Ensure power is off */
                read_phy(base, 0xa40, 16, &power);
                if (power & BIT(11))
                        write_phy(base, 0xa40, 16, power & ~BIT(11));
        } else {
-               pr_info("Powering on COPPER\n");
+               pr_debug("Powering on COPPER\n");
                write_phy(base, 0xfff, 29, 1);
                /* Ensure power is off */
                read_phy(base, 0xa40, 16, &power);
@@ -1076,7 +1076,7 @@ static int rtl8380_configure_serdes(struct phy_device *phydev)
 
        /* Back up serdes power off value */
        sds_conf_value = sw_r32(RTL838X_SDS_CFG_REG);
-       pr_info("SDS power down value: %x\n", sds_conf_value);
+       pr_debug("SDS power down value: %x\n", sds_conf_value);
 
        /* take serdes into reset */
        i = 0;
@@ -1106,7 +1106,7 @@ static int rtl8380_configure_serdes(struct phy_device *phydev)
        v |= 0x4 << 5 | 0x4;
        sw_w32(v, RTL838X_SDS_MODE_SEL);
 
-       pr_info("PLL control register: %x\n", sw_r32(RTL838X_PLL_CML_CTRL));
+       pr_debug("PLL control register: %x\n", sw_r32(RTL838X_PLL_CML_CTRL));
        sw_w32_mask(0xfffffff0, 0xaaaaaaaf & 0xf, RTL838X_PLL_CML_CTRL);
        i = 0;
        while (rtl8380_sds01_qsgmii_6275b[2 * i]) {
@@ -1145,10 +1145,10 @@ static int rtl8380_configure_serdes(struct phy_device *phydev)
                i++;
        }
 
-       pr_info("SDS power down value now: %x\n", sw_r32(RTL838X_SDS_CFG_REG));
+       pr_debug("SDS power down value now: %x\n", sw_r32(RTL838X_SDS_CFG_REG));
        sw_w32(sds_conf_value, RTL838X_SDS_CFG_REG);
 
-       pr_info("Configuration of SERDES done\n");
+       pr_debug("Configuration of SERDES done\n");
        return 0;
 }
 
@@ -1289,7 +1289,7 @@ static int rtl8393_serdes_probe(struct phy_device *phydev)
        struct rtl838x_phy_priv *priv;
        int addr = phydev->mdio.addr;
 
-       pr_info("%s: id: %d\n", __func__, addr);
+       pr_debug("%s: id: %d\n", __func__, addr);
        if (soc_info.family != RTL8390_FAMILY_ID)
                return -ENODEV;
 
index 246d75bb2853dd96fa2985620041d6d702fc620a..4983e4fc743fb4cee8f13d82d4727dce361a543a 100644 (file)
@@ -177,7 +177,7 @@ static u64 rtl838x_read_l2_entry_using_hash(u32 hash, u32 position, struct rtl83
                e->valid = false;
 
        if (e->valid)
-               pr_info("Found in Hash: R1 %x R2 %x R3 %x\n", r[0], r[1], r[2]);
+               pr_debug("Found in Hash: R1 %x R2 %x R3 %x\n", r[0], r[1], r[2]);
 
        entry = (((u64) r[1]) << 32) | (r[2] & 0xfffff000) | (r[0] & 0xfff);
        return entry;
@@ -214,7 +214,7 @@ static u64 rtl838x_read_cam(int idx, struct rtl838x_l2_entry *e)
                e->valid = false;
 
        if (e->valid)
-               pr_info("Found in CAM: R1 %x R2 %x R3 %x\n", r[0], r[1], r[2]);
+               pr_debug("Found in CAM: R1 %x R2 %x R3 %x\n", r[0], r[1], r[2]);
 
        entry = (((u64) r[1]) << 32) | (r[2] & 0xfffff000) | (r[0] & 0xfff);
        return entry;
@@ -296,7 +296,7 @@ irqreturn_t rtl838x_switch_irq(int irq, void *dev_id)
 
        /* Clear status */
        sw_w32(ports, RTL838X_ISR_PORT_LINK_STS_CHG);
-       pr_info("RTL8380 Link change: status: %x, ports %x\n", status, ports);
+       pr_debug("RTL8380 Link change: status: %x, ports %x\n", status, ports);
 
        for (i = 0; i < 28; i++) {
                if (ports & BIT(i)) {
@@ -463,7 +463,7 @@ void rtl838x_vlan_profile_dump(int index)
 
        profile = sw_r32(RTL838X_VLAN_PROFILE(index));
 
-       pr_info("VLAN %d: L2 learning: %d, L2 Unknown MultiCast Field %x, \
+       pr_debug("VLAN %d: L2 learning: %d, L2 Unknown MultiCast Field %x, \
                IPv4 Unknown MultiCast Field %x, IPv6 Unknown MultiCast Field: %x",
                index, profile & 1, (profile >> 1) & 0x1ff, (profile >> 10) & 0x1ff,
                (profile >> 19) & 0x1ff);
index 38b942e42646396d6f0436d05fd5bd3c56b33fb8..f5aaba8f9102c39dc1e05b59398fcf6855ed5667 100644 (file)
@@ -225,7 +225,7 @@ static u64 rtl839x_read_l2_entry_using_hash(u32 hash, u32 position, struct rtl83
                        e->suspended = !!(r[2] & BIT(17));
                        e->next_hop = !!(r[2] & BIT(16));
                        if (e->next_hop)
-                               pr_info("Found next hop entry, need to read data\n");
+                               pr_debug("Found next hop entry, need to read data\n");
                        e->age = (r[2] >> 21) & 3;
                        e->valid = true;
                        if (!(r[2] & 0xc0fd0000)) /* Check for valid entry */
@@ -282,7 +282,7 @@ static u64 rtl839x_read_cam(int idx, struct rtl838x_l2_entry *e)
                e->valid = false;
 
        if (e->valid)
-               pr_info("Found in CAM: R1 %x R2 %x R3 %x\n", r[0], r[1], r[2]);
+               pr_debug("Found in CAM: R1 %x R2 %x R3 %x\n", r[0], r[1], r[2]);
 
        entry = (((u64) r[0]) << 12) | ((r[1] & 0xfffffff0) << 12) | ((r[2] >> 4) & 0xfff);
        return entry;
@@ -364,7 +364,7 @@ irqreturn_t rtl839x_switch_irq(int irq, void *dev_id)
 
        /* Clear status */
        rtl839x_set_port_reg_le(ports, RTL839X_ISR_PORT_LINK_STS_CHG);
-       pr_info("RTL8390 Link change: status: %x, ports %llx\n", status, ports);
+       pr_debug("RTL8390 Link change: status: %x, ports %llx\n", status, ports);
 
        for (i = 0; i < 52; i++) {
                if (ports & (1ULL << i)) {
@@ -384,7 +384,7 @@ int rtl8390_sds_power(int mac, int val)
        u32 offset = (mac == 48) ? 0x0 : 0x100;
        u32 mode = val ? 0 : 1;
 
-       pr_info("In %s: mac %d, set %d\n", __func__, mac, val);
+       pr_debug("In %s: mac %d, set %d\n", __func__, mac, val);
 
        if ((mac != 48) && (mac != 49)) {
                pr_err("%s: not an SFP port: %d\n", __func__, mac);
@@ -465,7 +465,7 @@ void rtl8390_get_version(struct rtl838x_switch_priv *priv)
 
        sw_w32_mask(0xf << 28, 0xa << 28, RTL839X_CHIP_INFO);
        info = sw_r32(RTL839X_CHIP_INFO);
-       pr_info("Chip-Info: %x\n", info);
+       pr_debug("Chip-Info: %x\n", info);
        priv->version = RTL8390_VERSION_A;
 }
 
@@ -501,7 +501,7 @@ void rtl839x_vlan_profile_dump(int index)
        profile1 = sw_r32(RTL839X_VLAN_PROFILE(index) + 4);
        profile = sw_r32(RTL839X_VLAN_PROFILE(index));
 
-       pr_info("VLAN %d: L2 learning: %d, L2 Unknown MultiCast Field %x, \
+       pr_debug("VLAN %d: L2 learning: %d, L2 Unknown MultiCast Field %x, \
                IPv4 Unknown MultiCast Field %x, IPv6 Unknown MultiCast Field: %x",
                index, profile & 1, (profile >> 1) & 0xfff, (profile >> 13) & 0xfff,
                (profile1) & 0xfff);
index 9789459b1d4d1011b32cd79cc2d8e54fe3641e83..b972e0bdc69a14e5da6361810c3398effa142a86 100644 (file)
@@ -17,7 +17,7 @@ void __init rtl83xx_storm_control_init(struct rtl838x_switch_priv *priv)
 {
        int i;
 
-       pr_info("Enabling Storm control\n");
+       pr_debug("Enabling Storm control\n");
        // TICK_PERIOD_PPS
        if (priv->id == 0x8380)
                sw_w32_mask(0x3ff << 20, 434 << 20, RTL838X_SCHED_LB_TICK_TKN_CTRL_0);