linux/Documentation/devicetree/bindings
Marcin Wojtas dc35a10f68 net: mvneta: bm: add support for hardware buffer management
Buffer manager (BM) is a dedicated hardware unit that can be used by all
ethernet ports of Armada XP and 38x SoC's. It allows to offload CPU on RX
path by sparing DRAM access on refilling buffer pool, hardware-based
filling of descriptor ring data and better memory utilization due to HW
arbitration for using 'short' pools for small packets.

Tests performed with A388 SoC working as a network bridge between two
packet generators showed increase of maximum processed 64B packets by
~20k (~555k packets with BM enabled vs ~535 packets without BM). Also
when pushing 1500B-packets with a line rate achieved, CPU load decreased
from around 25% without BM to 20% with BM.

BM comprise up to 4 buffer pointers' (BP) rings kept in DRAM, which
are called external BP pools - BPPE. Allocating and releasing buffer
pointers (BP) to/from BPPE is performed indirectly by write/read access
to a dedicated internal SRAM, where internal BP pools (BPPI) are placed.
BM hardware controls status of BPPE automatically, as well as assigning
proper buffers to RX descriptors. For more details please refer to
Functional Specification of Armada XP or 38x SoC.

In order to enable support for a separate hardware block, common for all
ports, a new driver has to be implemented ('mvneta_bm'). It provides
initialization sequence of address space, clocks, registers, SRAM,
empty pools' structures and also obtaining optional configuration
from DT (please refer to device tree binding documentation). mvneta_bm
exposes also a necessary API to mvneta driver, as well as a dedicated
structure with BM information (bm_priv), whose presence is used as a
flag notifying of BM usage by port. It has to be ensured that mvneta_bm
probe is executed prior to the ones in ports' driver. In case BM is not
used or its probe fails, mvneta falls back to use software buffer
management.

A sequence executed in mvneta_probe function is modified in order to have
an access to needed resources before possible port's BM initialization is
done. According to port-pools mapping provided by DT appropriate registers
are configured and the buffer pools are filled. RX path is modified
accordingly. Becaues the hardware allows a wide variety of configuration
options, following assumptions are made:
* using BM mechanisms can be selectively disabled/enabled basing
  on DT configuration among the ports
* 'long' pool's single buffer size is tied to port's MTU
* using 'long' pool by port is obligatory and it cannot be shared
* using 'short' pool for smaller packets is optional
* one 'short' pool can be shared among all ports

This commit enables hardware buffer management operation cooperating with
existing mvneta driver. New device tree binding documentation is added and
the one of mvneta is updated accordingly.

[gregory.clement@free-electrons.com: removed the suspend/resume part]

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-14 12:19:46 -04:00
..
arc
arm ARM: 64-bit DT updates for v4.5 2016-01-20 18:21:32 -08:00
ata ata: ahci_brcmstb: add support for MIPS-based platforms 2015-12-31 21:19:35 -05:00
board
bus bus: uniphier-system-bus: add UniPhier System Bus driver 2015-12-22 11:22:39 -08:00
c6x
clock Fixes for wrong register offsets in both rk3036 and rk3368. 2016-01-29 17:24:28 -08:00
cpufreq Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2016-01-14 17:04:19 -08:00
cris
crypto crypto: rockchip - add DT bindings documentation 2015-11-27 21:19:28 +08:00
devfreq/event
display ARM: DT updates for v4.5 2016-01-20 18:16:29 -08:00
dma dmaengine fixes for 4.5-rc1 2016-01-20 10:15:21 -08:00
edac
eeprom dt-bindings: i2c: eeprom: add another EEPROM device 2016-01-10 09:39:39 +01:00
extcon extcon: add Maxim MAX3355 driver 2015-12-21 11:44:00 +09:00
fpga
fuse
gpio GPIO bulk updates for the v4.5 kernel cycle: 2016-01-17 12:32:01 -08:00
gpu
h8300
hsi
hwlock
hwmon
i2c Merge branch 'i2c/for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2016-01-14 11:25:37 -08:00
iio Documentation: add the binding file for Freescale imx7d ADC driver 2015-12-12 16:25:43 +00:00
input Merge branch 'next' into for-linus 2016-01-21 17:27:27 -08:00
interrupt-controller dt-bindings: arm, gic-v3: require that reserved cells are always 0 2016-02-12 16:15:25 -06:00
iommu iommu/ipmmu-vmsa: Include SoC part number in DT binding docs 2015-11-26 14:43:18 +01:00
leds
lpddr2
mailbox
media Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2016-01-17 13:40:25 -08:00
memory-controllers dt-bindings: Misc fix for the ATH79 DDR controllers 2015-12-09 15:30:55 -06:00
metag
mfd mfd: arizona: Add device tree binding documentation for new clock driver 2016-01-14 08:43:51 +00:00
mips dt/bindings: Add bindings for PIC32/MZDA platforms 2016-01-24 02:53:03 +01:00
misc dt-bindings: Consolidate SRAM bindings from all vendors 2015-12-09 15:29:37 -06:00
mmc mmc: sh_mmcif: Document r8a7793 DT bindings 2015-12-22 11:32:01 +01:00
mtd DeviceTree updates for 4.5: 2016-01-14 11:13:28 -08:00
net net: mvneta: bm: add support for hardware buffer management 2016-03-14 12:19:46 -04:00
nios2
nvmem
opp PM / OPP: Rename OPP nodes as opp@<opp-hz> 2015-11-23 23:38:36 +01:00
pci PCI: rcar: Add device tree support for r8a7793 2016-02-05 14:13:53 -06:00
phy Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-01-24 12:50:56 -08:00
pinctrl pinctrl: mediatek: Modify pinctrl bindings for mt2701 2016-01-07 11:10:59 +01:00
power
power_supply
powerpc
pps
pwm pwm: Add PWM driver for OMAP using dual-mode timers 2015-12-16 17:25:37 +01:00
regmap
regulator Revert "regulator: tps65217: remove tps65217.dtsi file" 2016-02-19 09:05:53 -08:00
remoteproc
reserved-memory
reset reset: hisilicon: document hisi-hi6220 reset controllers bindings 2015-11-20 15:41:28 +01:00
rng
rtc rtc: s3c: Document required clocks in the DT binding 2016-02-12 16:16:31 -06:00
scsi devicetree: bindings: scsi: HiSi SAS 2015-11-25 22:12:50 -05:00
security/tpm
serial serial: fsl-imx-uart: Fix typo in fsl,dte-mode description 2016-02-12 16:16:01 -06:00
serio
soc ARM: SoC driver updates for v4.5 2016-01-20 18:42:30 -08:00
sound Merge remote-tracking branches 'asoc/fix/amd', 'asoc/fix/arizona', 'asoc/fix/dpcm', 'asoc/fix/dwc', 'asoc/fix/fsl' and 'asoc/fix/fsl-ssi' into asoc-linus 2016-02-10 19:23:04 +00:00
spi ARM: DT updates for v4.5 2016-01-20 18:16:29 -08:00
spmi
sram misc: sram: add optional ioremap without write combining 2016-03-14 12:19:45 -04:00
staging docs: dts: Add documentation for hi6220 SoC ION node 2015-12-21 13:36:01 -08:00
thermal thermal: rcar: enable to use thermal-zone on DT 2016-02-09 14:05:11 -08:00
timer Document: DT: Add bindings for mediatek MT2701 SoC Platform 2015-11-20 13:59:04 +01:00
ufs
usb DeviceTree updates for 4.5: 2016-01-14 11:13:28 -08:00
virtio
w1
watchdog ARM: 64-bit DT updates for v4.5 2016-01-20 18:21:32 -08:00
x86
xillybus
ABI.txt
btmrvl.txt
chosen.txt
common-properties.txt
graph.txt
ipmi.txt
marvell.txt
resource-names.txt
submitting-patches.txt
unittest.txt
vendor-prefixes.txt of: Add vendor prefix for I/F/I 2016-02-20 14:56:00 +01:00
xilinx.txt