Commit 293dcd65 authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman

staging: mt7621-pci: show N_FTS status using a loop

There are some printk's which can be replaced properly
using dev_* kernel functions. Use dev_info to show
N_FTS status for each port using a loop instead of duplicating
lines of code.
Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 02d72eef
...@@ -500,14 +500,11 @@ static int mt7621_pci_probe(struct platform_device *pdev) ...@@ -500,14 +500,11 @@ static int mt7621_pci_probe(struct platform_device *pdev)
bypass_pipe_rst(pcie); bypass_pipe_rst(pcie);
set_phy_for_ssc(pcie); set_phy_for_ssc(pcie);
val = read_config(pcie, 0, 0x70c); list_for_each_entry_safe(port, tmp, &pcie->ports, list) {
printk("Port 0 N_FTS = %x\n", (unsigned int)val); u32 slot = port->slot;
val = read_config(pcie, slot, 0x70c);
val = read_config(pcie, 1, 0x70c); dev_info(dev, "Port %d N_FTS = %x\n", (unsigned int)val, slot);
printk("Port 1 N_FTS = %x\n", (unsigned int)val); }
val = read_config(pcie, 2, 0x70c);
printk("Port 2 N_FTS = %x\n", (unsigned int)val);
rt_sysc_m32(0, RALINK_PCIE_RST, RALINK_RSTCTRL); rt_sysc_m32(0, RALINK_PCIE_RST, RALINK_RSTCTRL);
rt_sysc_m32(0x30, 2 << 4, SYSC_REG_SYSTEM_CONFIG1); rt_sysc_m32(0x30, 2 << 4, SYSC_REG_SYSTEM_CONFIG1);
......
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