[U-Boot] [PATCH v2 1/4] net: phy: Add Broadcom BCM53xx switch driver
Florian Fainelli
f.fainelli at gmail.com
Sat Dec 9 18:53:01 UTC 2017
On 12/09/2017 10:40 AM, Florian Fainelli wrote:
> Add a minimalistic Broadcom BCM53xx (roboswitch) switch driver similar
> to the Marvell MV88E617x. This takes care of configuring the minimum
> amount out of the switch hardware such that each user visible port
> (configurable) and the CPU port can forward packets between each other
> while preserving isolation with other ports.
>
> This is useful for e.g: the Lamobo R1 board featuring a Broadcom
> BCM53125 switch.
>
> Reviewed-by: Stefan Roese <sr at denx.de>
> Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
> ---
[snip]
> +static int b53_probe(struct phy_device *phydev)
> +{
> + struct b53_device *dev;
> + int ret;
> +
> + dev = malloc(sizeof(*dev));
> + if (!dev)
> + return -ENOMEM;
> +
> + memset(dev, 0, sizeof(*dev));
> +
> + phydev->priv = dev;
> + dev->bus = phydev->bus;
> + dev->cpu_port = CONFIG_B53_CPU_PORT;
> +
> + ret = b53_switch_reset(phydev);
> + if (ret < 0)
> + return ret;
> +
> + phydev->priv = dev;
Looks like I missed Joe's comment here about the redundant assignment,
let me resubmit a v3 with this corrected.
--
Florian
More information about the U-Boot
mailing list