[PATCH linux 3/4] ftgmac100: Add devicetree option for the Aspeed g5 register interface
Joel Stanley
joel at jms.id.au
Fri Jun 10 18:46:52 AEST 2016
On Thu, Jun 9, 2016 at 11:44 PM, Andrew Jeffery <andrew at aj.id.au> wrote:
> @@ -1346,6 +1358,15 @@ static int ftgmac100_probe(struct platform_device *pdev)
> priv->use_ncsi = false;
> }
>
> + if (pdev->dev.of_node &&
> + of_get_property(pdev->dev.of_node, "aspeed-g5-interface", NULL)) {
We should get our device tree experts to chime in here.
An alternative could be to use
of_machine_is_compatible("aspeed,ast2500"). Then we don't need extra
properties.
> + priv->rxdes0_edorr_mask = (1 << 30);
> + priv->txdes0_edotr_mask = (1 << 30);
> + } else {
> + priv->rxdes0_edorr_mask = (1 << 15);
> + priv->txdes0_edotr_mask = (1 << 15);
> + }
> +
> netdev->ethtool_ops = &ftgmac100_ethtool_ops;
> netdev->netdev_ops = &ftgmac100_netdev_ops;
> if (pdev->dev.of_node &&
More information about the openbmc
mailing list