diff options
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 03de76c7a177..1c83a44c547b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | |||
@@ -71,14 +71,18 @@ static int stmmac_probe_config_dt(struct platform_device *pdev, | |||
71 | plat->force_sf_dma_mode = 1; | 71 | plat->force_sf_dma_mode = 1; |
72 | } | 72 | } |
73 | 73 | ||
74 | dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*dma_cfg), GFP_KERNEL); | 74 | if (of_find_property(np, "snps,pbl", NULL)) { |
75 | if (!dma_cfg) | 75 | dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*dma_cfg), |
76 | return -ENOMEM; | 76 | GFP_KERNEL); |
77 | 77 | if (!dma_cfg) | |
78 | plat->dma_cfg = dma_cfg; | 78 | return -ENOMEM; |
79 | of_property_read_u32(np, "snps,pbl", &dma_cfg->pbl); | 79 | plat->dma_cfg = dma_cfg; |
80 | dma_cfg->fixed_burst = of_property_read_bool(np, "snps,fixed-burst"); | 80 | of_property_read_u32(np, "snps,pbl", &dma_cfg->pbl); |
81 | dma_cfg->mixed_burst = of_property_read_bool(np, "snps,mixed-burst"); | 81 | dma_cfg->fixed_burst = |
82 | of_property_read_bool(np, "snps,fixed-burst"); | ||
83 | dma_cfg->mixed_burst = | ||
84 | of_property_read_bool(np, "snps,mixed-burst"); | ||
85 | } | ||
82 | 86 | ||
83 | return 0; | 87 | return 0; |
84 | } | 88 | } |