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