diff options
author | Niklas Cassel <niklas.cassel@axis.com> | 2016-12-07 15:20:08 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-08 13:07:10 -0500 |
commit | 4022d039a315951e59d95d22e79198d861ce4490 (patch) | |
tree | b6e62d85500ffa47e347dfa4f380f3c69eaabbdf /drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | |
parent | 89caaa2d80b7bf9bd8632cd3137254f8c685e5db (diff) | |
download | op-kernel-dev-4022d039a315951e59d95d22e79198d861ce4490.zip op-kernel-dev-4022d039a315951e59d95d22e79198d861ce4490.tar.gz |
net: smmac: allow configuring lower pbl values
The driver currently always sets the PBLx8/PBLx4 bit, which means that
the pbl values configured via the pbl/txpbl/rxpbl DT properties are
always multiplied by 8/4 in the hardware.
In order to allow the DT to configure lower pbl values, while at the
same time not changing behavior of any existing device trees using the
pbl/txpbl/rxpbl settings, add a property to disable the multiplication
of the pbl by 8/4 in the hardware.
Suggested-by: Rabin Vincent <rabinv@axis.com>
Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Acked-by: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 96afe05..082cd48 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -317,6 +317,7 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac) dma_cfg->pbl = DEFAULT_DMA_PBL; of_property_read_u32(np, "snps,txpbl", &dma_cfg->txpbl); of_property_read_u32(np, "snps,rxpbl", &dma_cfg->rxpbl); + dma_cfg->pblx8 = !of_property_read_bool(np, "snps,no-pbl-x8"); dma_cfg->aal = of_property_read_bool(np, "snps,aal"); dma_cfg->fixed_burst = of_property_read_bool(np, "snps,fixed-burst"); |