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 <[email protected]>
> Signed-off-by: Florian Fainelli <[email protected]>
> ---

[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
_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to