Move the DMA configuration validation from stmmac_init_dma_engine()
to the start of the driver probe function. The platform glue is
expected to supply the DMA configuration, and a non-zero programmable
burst length (bpl).
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1vvuY3-0000000Avnq-1Spv@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
u32 chan = 0;
int ret = 0;
- if (!priv->plat->dma_cfg || !priv->plat->dma_cfg->pbl) {
- netdev_err(priv->dev, "Invalid DMA configuration\n");
- return -EINVAL;
- }
-
ret = stmmac_prereset_configure(priv);
if (ret)
return ret;
u32 rxq;
int i, ret = 0;
+ if (!plat_dat->dma_cfg || !plat_dat->dma_cfg->pbl) {
+ dev_err(device, "invalid DMA configuration\n");
+ return -EINVAL;
+ }
+
ndev = devm_alloc_etherdev_mqs(device, sizeof(struct stmmac_priv),
MTL_MAX_TX_QUEUES, MTL_MAX_RX_QUEUES);
if (!ndev)