[PATCH v9 net-next 03/15] net: mvpp2: add CM3 SRAM memory map
Andrew Lunn
andrew at lunn.ch
Sun Feb 7 16:32:09 EST 2021
> +static int mvpp2_get_sram(struct platform_device *pdev,
> + struct mvpp2 *priv)
> +{
> + struct resource *res;
> +
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> + if (!res) {
> + if (has_acpi_companion(&pdev->dev))
> + dev_warn(&pdev->dev, "ACPI is too old, Flow control not supported\n");
> + else
> + dev_warn(&pdev->dev, "DT is too old, Flow control not supported\n");
> + return 0;
> + }
> +
> + priv->cm3_base = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(priv->cm3_base))
> + return PTR_ERR(priv->cm3_base);
> +
> + return 0;
> +}
This looks much better. Thanks
Reviewed-by: Andrew Lunn <andrew at lunn.ch>
Andrew
More information about the linux-arm-kernel
mailing list