RE: [EXT] Re: [RESEND PATCH v8 net-next 03/15] net: mvpp2: add CM3 SRAM memory map
From: Stefan Chulski <hidden>
Date: 2021-02-07 12:22:52
Also in:
linux-arm-kernel, linux-devicetree, lkml
From: Stefan Chulski <hidden>
Date: 2021-02-07 12:22:52
Also in:
linux-arm-kernel, linux-devicetree, lkml
quoted
} +static int mvpp2_get_sram(struct platform_device *pdev, + struct mvpp2 *priv) +{ + struct device_node *dn = pdev->dev.of_node; + static bool defer_once; + struct resource *res; + + if (has_acpi_companion(&pdev->dev)) { + res = platform_get_resource(pdev, IORESOURCE_MEM, 2); + if (!res) { + dev_warn(&pdev->dev, "ACPI is too old, Flow controlnot supported\n");quoted
+ return 0; + } + priv->cm3_base = devm_ioremap_resource(&pdev->dev,res);quoted
+ if (IS_ERR(priv->cm3_base)) + return PTR_ERR(priv->cm3_base); + } else { + priv->sram_pool = of_gen_pool_get(dn, "cm3-mem", 0); + if (!priv->sram_pool) { + if (!defer_once) { + defer_once = true; + /* Try defer once */ + return -EPROBE_DEFER; + } + dev_warn(&pdev->dev, "DT is too old, Flow controlnotquoted
+supported\n");This warning will show on every DT system with no cm3-mem property, right?
All DT system would has cm3-mem property if " add CM3 SRAM memory to cp11x ethernet device tree " patch applied. This is also only warning message, without any functional impact. Regards, Stefan.