Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1600062
| From | Sean Wang <sean.wang@mediatek.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next 4/4] net-next: dsa: add dsa support for Mediatek MT7530 switch |
| Date | 2017-03-14 08:10 +0100 |
| Message-ID | <tkOKK-4Zd-17@gated-at.bofh.it> (permalink) |
| References | <tkARr-34n-13@gated-at.bofh.it> <tkARr-34n-15@gated-at.bofh.it> <tkHpT-85V-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 2017-03-14 at 00:11 +0100, Andrew Lunn wrote:
> > +static int
> > +mt7530_setup(struct dsa_switch *ds)
> > +{
> > + struct mt7530_priv *priv = ds->priv;
> > + int ret, i, phy_mode;
> > + u8 cpup_mask = 0;
> > + u32 id, val;
> > + struct regmap *regmap;
> > +
> > + /* Make sure that cpu port specfied on the dt is appropriate */
> > + if (!dsa_is_cpu_port(ds, MT7530_CPU_PORT)) {
> > + dev_err(priv->dev, "port not matched with the CPU port\n");
> > + return -EINVAL;
> > + }
> > +
> > + regmap = devm_regmap_init(ds->dev, NULL, priv,
> > + &mt7530_regmap_config);
> > + if (IS_ERR(regmap))
> > + dev_warn(priv->dev, "phy regmap initialization failed");
> > +
> > + phy_mode = of_get_phy_mode(ds->ports[ds->dst->cpu_port].dn);
> > + if (phy_mode < 0) {
> > + dev_err(priv->dev, "Can't find phy-mode for master device\n");
> > + return phy_mode;
> > + }
> > + dev_info(priv->dev, "phy-mode for master device = %x\n", phy_mode);
>
> Hi Sean
>
> It is not documented in the binding that a phy-mode is mandatory for
> the cpu port.
>
> Andrew
Hi Andrew,
thanks for your reviewing. I'll also add the missing part into the next
one.
Sean
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH net-next 0/4] net-next: dsa: add Mediatek MT7530 support <sean.wang@mediatek.com> - 2017-03-13 17:20 +0100
[PATCH net-next 2/4] net-next: dsa: add Mediatek tag RX/TX handler <sean.wang@mediatek.com> - 2017-03-13 17:20 +0100
Re: [PATCH net-next 2/4] net-next: dsa: add Mediatek tag RX/TX handler Andrew Lunn <andrew@lunn.ch> - 2017-03-13 17:40 +0100
Re: [PATCH net-next 2/4] net-next: dsa: add Mediatek tag RX/TX handler Florian Fainelli <f.fainelli@gmail.com> - 2017-03-13 17:50 +0100
Re: [PATCH net-next 2/4] net-next: dsa: add Mediatek tag RX/TX handler Sean Wang <sean.wang@mediatek.com> - 2017-03-14 07:20 +0100
Re: [PATCH net-next 2/4] net-next: dsa: add Mediatek tag RX/TX handler Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-03-13 18:10 +0100
Re: [PATCH net-next 2/4] net-next: dsa: add Mediatek tag RX/TX handler Sean Wang <sean.wang@mediatek.com> - 2017-03-14 07:30 +0100
Re: [PATCH net-next 2/4] net-next: dsa: add Mediatek tag RX/TX handler Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-03-14 14:50 +0100
[PATCH net-next 3/4] net-next: ethernet: mediatek: add CDM able to recognize the tag for DSA <sean.wang@mediatek.com> - 2017-03-13 17:20 +0100
Re: [PATCH net-next 3/4] net-next: ethernet: mediatek: add CDM able to recognize the tag for DSA Andrew Lunn <andrew@lunn.ch> - 2017-03-13 17:40 +0100
Re: [PATCH net-next 3/4] net-next: ethernet: mediatek: add CDM able to recognize the tag for DSA Florian Fainelli <f.fainelli@gmail.com> - 2017-03-13 17:50 +0100
Re: [PATCH net-next 4/4] net-next: dsa: add dsa support for Mediatek MT7530 switch Andrew Lunn <andrew@lunn.ch> - 2017-03-13 17:50 +0100
Re: [PATCH net-next 0/4] net-next: dsa: add Mediatek MT7530 support John Crispin <john@phrozen.org> - 2017-03-13 18:00 +0100
Re: [PATCH net-next 4/4] net-next: dsa: add dsa support for Mediatek MT7530 switch Andrew Lunn <andrew@lunn.ch> - 2017-03-14 00:20 +0100
Re: [PATCH net-next 4/4] net-next: dsa: add dsa support for Mediatek MT7530 switch Sean Wang <sean.wang@mediatek.com> - 2017-03-14 08:10 +0100
csiph-web