On Wed, Jan 22, 2014 at 9:40 PM, Jonas Gorski <[email protected]> wrote: > Hi, > > On Wed, Jan 22, 2014 at 4:58 PM, Helmut Schaa > <[email protected]> wrote: >> The BCM53128 seems to be very similar to the BCM53125 but has some more >> ports. >> >> Signed-off-by: Helmut Schaa <[email protected]> >> --- >> .../generic/files/drivers/net/phy/b53/b53_common.c | 14 +++++++++++++ >> .../generic/files/drivers/net/phy/b53/b53_mdio.c | 24 >> ++++++++++++++++++++++ >> .../generic/files/drivers/net/phy/b53/b53_priv.h | 4 +++- >> 3 files changed, 41 insertions(+), 1 deletion(-) >> >> diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c >> b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c >> index f6a5418..72b08e1 100644 >> --- a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c >> +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c >> @@ -1130,6 +1130,19 @@ static const struct b53_chip_data b53_switch_chips[] >> = { >> .sw_ops = &b53_switch_ops, >> }, >> { >> + .chip_id = BCM53128_DEVICE_ID, >> + .dev_name = "BCM53128", >> + .alias = "bcm53128", >> + .vlans = 4096, >> + .enabled_ports = 0x1ff, >> + .cpu_port = B53_CPU_PORT, >> + .vta_regs = B53_VTA_REGS, >> + .duplex_reg = B53_DUPLEX_STAT_GE, >> + .jumbo_pm_reg = B53_JUMBO_PORT_MASK, >> + .jumbo_size_reg = B53_JUMBO_MAX_SIZE, >> + .sw_ops = &b53_switch_ops, >> + }, >> + { >> .chip_id = BCM63XX_DEVICE_ID, >> .dev_name = "BCM63xx", >> .alias = "bcm63xx", >> @@ -1363,6 +1376,7 @@ int b53_switch_detect(struct b53_device *dev) >> switch (id32) { >> case BCM53115_DEVICE_ID: >> case BCM53125_DEVICE_ID: >> + case BCM53128_DEVICE_ID: >> case BCM53010_DEVICE_ID: >> case BCM53011_DEVICE_ID: >> case BCM53012_DEVICE_ID: >> diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c >> b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c >> index cacf32b..b7e6b59 100644 >> --- a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c >> +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c >> @@ -389,6 +389,23 @@ static struct phy_driver b53_phy_driver_id3 = { >> }, >> }; >> >> +/* BCM53128 */ >> +static struct phy_driver b53_phy_driver_id4 = { >> + .phy_id = 0x03625e14, >> + .name = "Broadcom B53 (4)", >> + .phy_id_mask = 0x1ffffc00, >> + .features = 0, >> + .probe = b53_phy_probe, >> + .remove = b53_phy_remove, >> + .config_aneg = b53_phy_config_aneg, >> + .config_init = b53_phy_config_init, >> + .read_status = b53_phy_read_status, >> + .driver = { >> + .owner = THIS_MODULE, >> + }, >> +}; > > This one should be completely unnecessary: > > 0x03625e14 & 0x1ffffc00 == 0x3625c00, which is the phy_id of > driver_id2, so I don't see how it could ever match (or how id2 then > could match, depending on in which order linux probes).
Indeed, you're right. Let me fix this up ... > Apart from that I don't see any issues (adding support for BCM53118 is > probably analogue). I'd guess so as well but I only have access to a BCM53128. Helmut _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
