1*4882a593Smuzhiyun====================================================================== 2*4882a593SmuzhiyunTexas Instruments Keystone Navigator Queue Management SubSystem driver 3*4882a593Smuzhiyun====================================================================== 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunDriver source code path 6*4882a593Smuzhiyun drivers/soc/ti/knav_qmss.c 7*4882a593Smuzhiyun drivers/soc/ti/knav_qmss_acc.c 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunThe QMSS (Queue Manager Sub System) found on Keystone SOCs is one of 10*4882a593Smuzhiyunthe main hardware sub system which forms the backbone of the Keystone 11*4882a593Smuzhiyunmulti-core Navigator. QMSS consist of queue managers, packed-data structure 12*4882a593Smuzhiyunprocessors(PDSP), linking RAM, descriptor pools and infrastructure 13*4882a593SmuzhiyunPacket DMA. 14*4882a593SmuzhiyunThe Queue Manager is a hardware module that is responsible for accelerating 15*4882a593Smuzhiyunmanagement of the packet queues. Packets are queued/de-queued by writing or 16*4882a593Smuzhiyunreading descriptor address to a particular memory mapped location. The PDSPs 17*4882a593Smuzhiyunperform QMSS related functions like accumulation, QoS, or event management. 18*4882a593SmuzhiyunLinking RAM registers are used to link the descriptors which are stored in 19*4882a593Smuzhiyundescriptor RAM. Descriptor RAM is configurable as internal or external memory. 20*4882a593SmuzhiyunThe QMSS driver manages the PDSP setups, linking RAM regions, 21*4882a593Smuzhiyunqueue pool management (allocation, push, pop and notify) and descriptor 22*4882a593Smuzhiyunpool management. 23*4882a593Smuzhiyun 24*4882a593Smuzhiyunknav qmss driver provides a set of APIs to drivers to open/close qmss queues, 25*4882a593Smuzhiyunallocate descriptor pools, map the descriptors, push/pop to queues etc. For 26*4882a593Smuzhiyundetails of the available APIs, please refers to include/linux/soc/ti/knav_qmss.h 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunDT documentation is available at 29*4882a593SmuzhiyunDocumentation/devicetree/bindings/soc/ti/keystone-navigator-qmss.txt 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunAccumulator QMSS queues using PDSP firmware 32*4882a593Smuzhiyun============================================ 33*4882a593SmuzhiyunThe QMSS PDSP firmware support accumulator channel that can monitor a single 34*4882a593Smuzhiyunqueue or multiple contiguous queues. drivers/soc/ti/knav_qmss_acc.c is the 35*4882a593Smuzhiyundriver that interface with the accumulator PDSP. This configures 36*4882a593Smuzhiyunaccumulator channels defined in DTS (example in DT documentation) to monitor 37*4882a593Smuzhiyun1 or 32 queues per channel. More description on the firmware is available in 38*4882a593SmuzhiyunCPPI/QMSS Low Level Driver document (docs/CPPI_QMSS_LLD_SDS.pdf) at 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun git://git.ti.com/keystone-rtos/qmss-lld.git 41*4882a593Smuzhiyun 42*4882a593Smuzhiyunk2_qmss_pdsp_acc48_k2_le_1_0_0_9.bin firmware supports upto 48 accumulator 43*4882a593Smuzhiyunchannels. This firmware is available under ti-keystone folder of 44*4882a593Smuzhiyunfirmware.git at 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunTo use copy the firmware image to lib/firmware folder of the initramfs or 49*4882a593Smuzhiyunubifs file system and provide a sym link to k2_qmss_pdsp_acc48_k2_le_1_0_0_9.bin 50*4882a593Smuzhiyunin the file system and boot up the kernel. User would see 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun "firmware file ks2_qmss_pdsp_acc48.bin downloaded for PDSP" 53*4882a593Smuzhiyun 54*4882a593Smuzhiyunin the boot up log if loading of firmware to PDSP is successful. 55*4882a593Smuzhiyun 56*4882a593SmuzhiyunUse of accumulated queues requires the firmware image to be present in the 57*4882a593Smuzhiyunfile system. The driver doesn't acc queues to the supported queue range if 58*4882a593SmuzhiyunPDSP is not running in the SoC. The API call fails if there is a queue open 59*4882a593Smuzhiyunrequest to an acc queue and PDSP is not running. So make sure to copy firmware 60*4882a593Smuzhiyunto file system before using these queue types. 61