Message ID | 1538037450-18949-2-git-send-email-sgruszka@redhat.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Kalle Valo |
Headers | show |
Series | mt76x0: phy/rf fixups for PCIe | expand |
> Use dev_dbg to print BBP version. > > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> > --- > drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c > index 4fd2c65e196a..ca0a693654a3 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c > +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c > @@ -187,7 +187,6 @@ int mt76x0_wait_bbp_ready(struct mt76x0_dev *dev) > > do { > val = mt76_rr(dev, MT_BBP(CORE, 0)); > - printk("BBP version %08x\n", val); > if (val && ~val) > break; > } while (--i); > @@ -197,6 +196,7 @@ int mt76x0_wait_bbp_ready(struct mt76x0_dev *dev) > return -EIO; > } > > + dev_dbg(dev->mt76.dev, "BBP version %08x\n", val); > return 0; > } I guess we can drop mt76x0_wait_bbp_ready and use mt76x02_wait_for_mac instead Regards, Lorenzo > > -- > 1.9.3 >
> > > Use dev_dbg to print BBP version. > > > > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> > > --- > > drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c > > index 4fd2c65e196a..ca0a693654a3 100644 > > --- a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c > > +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c > > @@ -187,7 +187,6 @@ int mt76x0_wait_bbp_ready(struct mt76x0_dev *dev) > > > > do { > > val = mt76_rr(dev, MT_BBP(CORE, 0)); > > - printk("BBP version %08x\n", val); > > if (val && ~val) > > break; > > } while (--i); > > @@ -197,6 +196,7 @@ int mt76x0_wait_bbp_ready(struct mt76x0_dev *dev) > > return -EIO; > > } > > > > + dev_dbg(dev->mt76.dev, "BBP version %08x\n", val); > > return 0; > > } > > I guess we can drop mt76x0_wait_bbp_ready and use mt76x02_wait_for_mac instead > > Regards, > Lorenzo Please drop the comment, it is a different register. Maybe we can generalize mt76x02_wait_for_mac instead? Regards, Lorenzo > > > > > -- > > 1.9.3 > >
On Thu, Sep 27, 2018 at 11:26:30AM +0200, Lorenzo Bianconi wrote: > > Use dev_dbg to print BBP version. > > > > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> > > --- > > drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c > > index 4fd2c65e196a..ca0a693654a3 100644 > > --- a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c > > +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c > > @@ -187,7 +187,6 @@ int mt76x0_wait_bbp_ready(struct mt76x0_dev *dev) > > > > do { > > val = mt76_rr(dev, MT_BBP(CORE, 0)); > > - printk("BBP version %08x\n", val); > > if (val && ~val) > > break; > > } while (--i); > > @@ -197,6 +196,7 @@ int mt76x0_wait_bbp_ready(struct mt76x0_dev *dev) > > return -EIO; > > } > > > > + dev_dbg(dev->mt76.dev, "BBP version %08x\n", val); > > return 0; > > } > > I guess we can drop mt76x0_wait_bbp_ready and use mt76x02_wait_for_mac instead Why? Wait for BBP is diffrent, we read MT_BBP(CORE, 0)=0x2000 register, wait for MAC we read MT_MAC_CSR0=0x1000 ? Baside this patch is about replacing printk by dev_dbg. Thanks Stanislaw
On Thu, Sep 27, 2018 at 11:34:39AM +0200, Lorenzo Bianconi wrote: > Please drop the comment, it is a different register. Maybe we can Too late :-) > generalize mt76x02_wait_for_mac instead? Seems BBP(CORE,0) is not used by mt76x2, so merging it into mt76x02 is not correct. Thanks Stanislaw
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c index 4fd2c65e196a..ca0a693654a3 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c @@ -187,7 +187,6 @@ int mt76x0_wait_bbp_ready(struct mt76x0_dev *dev) do { val = mt76_rr(dev, MT_BBP(CORE, 0)); - printk("BBP version %08x\n", val); if (val && ~val) break; } while (--i); @@ -197,6 +196,7 @@ int mt76x0_wait_bbp_ready(struct mt76x0_dev *dev) return -EIO; } + dev_dbg(dev->mt76.dev, "BBP version %08x\n", val); return 0; }
Use dev_dbg to print BBP version. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> --- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)