~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/remoteproc/pruss.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * PRU-ICSS Subsystem user interfaces
  4  *
  5  * Copyright (C) 2015-2022 Texas Instruments Incorporated - http://www.ti.com
  6  *      Suman Anna <s-anna@ti.com>
  7  */
  8 
  9 #ifndef __LINUX_PRUSS_H
 10 #define __LINUX_PRUSS_H
 11 
 12 #include <linux/device.h>
 13 #include <linux/types.h>
 14 
 15 #define PRU_RPROC_DRVNAME "pru-rproc"
 16 
 17 /**
 18  * enum pruss_pru_id - PRU core identifiers
 19  * @PRUSS_PRU0: PRU Core 0.
 20  * @PRUSS_PRU1: PRU Core 1.
 21  * @PRUSS_NUM_PRUS: Total number of PRU Cores available.
 22  *
 23  */
 24 
 25 enum pruss_pru_id {
 26         PRUSS_PRU0 = 0,
 27         PRUSS_PRU1,
 28         PRUSS_NUM_PRUS,
 29 };
 30 
 31 /*
 32  * enum pru_ctable_idx - Configurable Constant table index identifiers
 33  */
 34 enum pru_ctable_idx {
 35         PRU_C24 = 0,
 36         PRU_C25,
 37         PRU_C26,
 38         PRU_C27,
 39         PRU_C28,
 40         PRU_C29,
 41         PRU_C30,
 42         PRU_C31,
 43 };
 44 
 45 struct device_node;
 46 struct rproc;
 47 
 48 #if IS_ENABLED(CONFIG_PRU_REMOTEPROC)
 49 
 50 struct rproc *pru_rproc_get(struct device_node *np, int index,
 51                             enum pruss_pru_id *pru_id);
 52 void pru_rproc_put(struct rproc *rproc);
 53 int pru_rproc_set_ctable(struct rproc *rproc, enum pru_ctable_idx c, u32 addr);
 54 
 55 #else
 56 
 57 static inline struct rproc *
 58 pru_rproc_get(struct device_node *np, int index, enum pruss_pru_id *pru_id)
 59 {
 60         return ERR_PTR(-EOPNOTSUPP);
 61 }
 62 
 63 static inline void pru_rproc_put(struct rproc *rproc) { }
 64 
 65 static inline int pru_rproc_set_ctable(struct rproc *rproc,
 66                                        enum pru_ctable_idx c, u32 addr)
 67 {
 68         return -EOPNOTSUPP;
 69 }
 70 
 71 #endif /* CONFIG_PRU_REMOTEPROC */
 72 
 73 static inline bool is_pru_rproc(struct device *dev)
 74 {
 75         const char *drv_name = dev_driver_string(dev);
 76 
 77         if (strncmp(drv_name, PRU_RPROC_DRVNAME, sizeof(PRU_RPROC_DRVNAME)))
 78                 return false;
 79 
 80         return true;
 81 }
 82 
 83 #endif /* __LINUX_PRUSS_H */
 84 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php