1*e790a4ceSJonathan Corbet====================================================================== 2*e790a4ceSJonathan CorbetTexas Instruments Keystone Navigator Queue Management SubSystem driver 3*e790a4ceSJonathan Corbet====================================================================== 4*e790a4ceSJonathan Corbet 5*e790a4ceSJonathan CorbetDriver source code path 6*e790a4ceSJonathan Corbet drivers/soc/ti/knav_qmss.c 7*e790a4ceSJonathan Corbet drivers/soc/ti/knav_qmss_acc.c 8*e790a4ceSJonathan Corbet 9*e790a4ceSJonathan CorbetThe QMSS (Queue Manager Sub System) found on Keystone SOCs is one of 10*e790a4ceSJonathan Corbetthe main hardware sub system which forms the backbone of the Keystone 11*e790a4ceSJonathan Corbetmulti-core Navigator. QMSS consist of queue managers, packed-data structure 12*e790a4ceSJonathan Corbetprocessors(PDSP), linking RAM, descriptor pools and infrastructure 13*e790a4ceSJonathan CorbetPacket DMA. 14*e790a4ceSJonathan CorbetThe Queue Manager is a hardware module that is responsible for accelerating 15*e790a4ceSJonathan Corbetmanagement of the packet queues. Packets are queued/de-queued by writing or 16*e790a4ceSJonathan Corbetreading descriptor address to a particular memory mapped location. The PDSPs 17*e790a4ceSJonathan Corbetperform QMSS related functions like accumulation, QoS, or event management. 18*e790a4ceSJonathan CorbetLinking RAM registers are used to link the descriptors which are stored in 19*e790a4ceSJonathan Corbetdescriptor RAM. Descriptor RAM is configurable as internal or external memory. 20*e790a4ceSJonathan CorbetThe QMSS driver manages the PDSP setups, linking RAM regions, 21*e790a4ceSJonathan Corbetqueue pool management (allocation, push, pop and notify) and descriptor 22*e790a4ceSJonathan Corbetpool management. 23*e790a4ceSJonathan Corbet 24*e790a4ceSJonathan Corbetknav qmss driver provides a set of APIs to drivers to open/close qmss queues, 25*e790a4ceSJonathan Corbetallocate descriptor pools, map the descriptors, push/pop to queues etc. For 26*e790a4ceSJonathan Corbetdetails of the available APIs, please refers to include/linux/soc/ti/knav_qmss.h 27*e790a4ceSJonathan Corbet 28*e790a4ceSJonathan CorbetDT documentation is available at 29*e790a4ceSJonathan CorbetDocumentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt 30*e790a4ceSJonathan Corbet 31*e790a4ceSJonathan CorbetAccumulator QMSS queues using PDSP firmware 32*e790a4ceSJonathan Corbet============================================ 33*e790a4ceSJonathan CorbetThe QMSS PDSP firmware support accumulator channel that can monitor a single 34*e790a4ceSJonathan Corbetqueue or multiple contiguous queues. drivers/soc/ti/knav_qmss_acc.c is the 35*e790a4ceSJonathan Corbetdriver that interface with the accumulator PDSP. This configures 36*e790a4ceSJonathan Corbetaccumulator channels defined in DTS (example in DT documentation) to monitor 37*e790a4ceSJonathan Corbet1 or 32 queues per channel. More description on the firmware is available in 38*e790a4ceSJonathan CorbetCPPI/QMSS Low Level Driver document (docs/CPPI_QMSS_LLD_SDS.pdf) at 39*e790a4ceSJonathan Corbet 40*e790a4ceSJonathan Corbet git://git.ti.com/keystone-rtos/qmss-lld.git 41*e790a4ceSJonathan Corbet 42*e790a4ceSJonathan Corbetk2_qmss_pdsp_acc48_k2_le_1_0_0_9.bin firmware supports upto 48 accumulator 43*e790a4ceSJonathan Corbetchannels. This firmware is available under ti-keystone folder of 44*e790a4ceSJonathan Corbetfirmware.git at 45*e790a4ceSJonathan Corbet 46*e790a4ceSJonathan Corbet git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git 47*e790a4ceSJonathan Corbet 48*e790a4ceSJonathan CorbetTo use copy the firmware image to lib/firmware folder of the initramfs or 49*e790a4ceSJonathan Corbetubifs file system and provide a sym link to k2_qmss_pdsp_acc48_k2_le_1_0_0_9.bin 50*e790a4ceSJonathan Corbetin the file system and boot up the kernel. User would see 51*e790a4ceSJonathan Corbet 52*e790a4ceSJonathan Corbet "firmware file ks2_qmss_pdsp_acc48.bin downloaded for PDSP" 53*e790a4ceSJonathan Corbet 54*e790a4ceSJonathan Corbetin the boot up log if loading of firmware to PDSP is successful. 55*e790a4ceSJonathan Corbet 56*e790a4ceSJonathan CorbetUse of accumulated queues requires the firmware image to be present in the 57*e790a4ceSJonathan Corbetfile system. The driver doesn't acc queues to the supported queue range if 58*e790a4ceSJonathan CorbetPDSP is not running in the SoC. The API call fails if there is a queue open 59*e790a4ceSJonathan Corbetrequest to an acc queue and PDSP is not running. So make sure to copy firmware 60*e790a4ceSJonathan Corbetto file system before using these queue types. 61