1*c75c9fdaSGrzegorz Jaszczyk /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ 2*c75c9fdaSGrzegorz Jaszczyk /* 3*c75c9fdaSGrzegorz Jaszczyk * PRUSS Remote Processor specific types 4*c75c9fdaSGrzegorz Jaszczyk * 5*c75c9fdaSGrzegorz Jaszczyk * Copyright (C) 2014-2020 Texas Instruments Incorporated - https://www.ti.com/ 6*c75c9fdaSGrzegorz Jaszczyk * Suman Anna <s-anna@ti.com> 7*c75c9fdaSGrzegorz Jaszczyk */ 8*c75c9fdaSGrzegorz Jaszczyk 9*c75c9fdaSGrzegorz Jaszczyk #ifndef _PRU_RPROC_H_ 10*c75c9fdaSGrzegorz Jaszczyk #define _PRU_RPROC_H_ 11*c75c9fdaSGrzegorz Jaszczyk 12*c75c9fdaSGrzegorz Jaszczyk /** 13*c75c9fdaSGrzegorz Jaszczyk * struct pruss_int_map - PRU system events _to_ channel and host mapping 14*c75c9fdaSGrzegorz Jaszczyk * @event: number of the system event 15*c75c9fdaSGrzegorz Jaszczyk * @chnl: channel number assigned to a given @event 16*c75c9fdaSGrzegorz Jaszczyk * @host: host number assigned to a given @chnl 17*c75c9fdaSGrzegorz Jaszczyk * 18*c75c9fdaSGrzegorz Jaszczyk * PRU system events are mapped to channels, and these channels are mapped 19*c75c9fdaSGrzegorz Jaszczyk * to host interrupts. Events can be mapped to channels in a one-to-one or 20*c75c9fdaSGrzegorz Jaszczyk * many-to-one ratio (multiple events per channel), and channels can be 21*c75c9fdaSGrzegorz Jaszczyk * mapped to host interrupts in a one-to-one or many-to-one ratio (multiple 22*c75c9fdaSGrzegorz Jaszczyk * channels per interrupt). 23*c75c9fdaSGrzegorz Jaszczyk */ 24*c75c9fdaSGrzegorz Jaszczyk struct pruss_int_map { 25*c75c9fdaSGrzegorz Jaszczyk u8 event; 26*c75c9fdaSGrzegorz Jaszczyk u8 chnl; 27*c75c9fdaSGrzegorz Jaszczyk u8 host; 28*c75c9fdaSGrzegorz Jaszczyk }; 29*c75c9fdaSGrzegorz Jaszczyk 30*c75c9fdaSGrzegorz Jaszczyk /** 31*c75c9fdaSGrzegorz Jaszczyk * struct pru_irq_rsc - PRU firmware section header for IRQ data 32*c75c9fdaSGrzegorz Jaszczyk * @type: resource type 33*c75c9fdaSGrzegorz Jaszczyk * @num_evts: number of described events 34*c75c9fdaSGrzegorz Jaszczyk * @pru_intc_map: PRU interrupt routing description 35*c75c9fdaSGrzegorz Jaszczyk * 36*c75c9fdaSGrzegorz Jaszczyk * The PRU firmware blob can contain optional .pru_irq_map ELF section, which 37*c75c9fdaSGrzegorz Jaszczyk * provides the PRUSS interrupt mapping description. The pru_irq_rsc struct 38*c75c9fdaSGrzegorz Jaszczyk * describes resource entry format. 39*c75c9fdaSGrzegorz Jaszczyk */ 40*c75c9fdaSGrzegorz Jaszczyk struct pru_irq_rsc { 41*c75c9fdaSGrzegorz Jaszczyk u8 type; 42*c75c9fdaSGrzegorz Jaszczyk u8 num_evts; 43*c75c9fdaSGrzegorz Jaszczyk struct pruss_int_map pru_intc_map[]; 44*c75c9fdaSGrzegorz Jaszczyk } __packed; 45*c75c9fdaSGrzegorz Jaszczyk 46*c75c9fdaSGrzegorz Jaszczyk #endif /* _PRU_RPROC_H_ */ 47