Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'ti-driver-soc-for-v6.5' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers

TI SoC driver updates for v6.5

* pruss: Add helper functions for ethernet client driver usage, add compile-testing, fixup function pointer casts
* smartreflex: Cosmetic optimization for using devm_ioremap_resource
* wkup_m3_ipc: Fix error checking around debugfs_create_dir

* tag 'ti-driver-soc-for-v6.5' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
wkup_m3_ipc.c: Fix error checking for debugfs_create_dir
soc: ti: pruss: Add helper functions to set GPI mode, MII_RT_event and XFR
soc: ti: pruss: Add pruss_cfg_read()/update(), pruss_cfg_get_gpmux()/set_gpmux() APIs
soc: ti: pruss: Add pruss_{request,release}_mem_region() API
soc: ti: pruss: Add pruss_get()/put() API
soc: ti: pruss: Allow compile-testing
soc: ti: pruss: Avoid cast to incompatible function type
soc: ti: smartreflex: Use devm_platform_ioremap_resource()

Link: https://lore.kernel.org/r/20230615164134.6sd5hudyadq3fvk4@garage
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+475 -22
-15
drivers/remoteproc/pru_rproc.c
··· 82 82 }; 83 83 84 84 /** 85 - * enum pru_type - PRU core type identifier 86 - * 87 - * @PRU_TYPE_PRU: Programmable Real-time Unit 88 - * @PRU_TYPE_RTU: Auxiliary Programmable Real-Time Unit 89 - * @PRU_TYPE_TX_PRU: Transmit Programmable Real-Time Unit 90 - * @PRU_TYPE_MAX: just keep this one at the end 91 - */ 92 - enum pru_type { 93 - PRU_TYPE_PRU = 0, 94 - PRU_TYPE_RTU, 95 - PRU_TYPE_TX_PRU, 96 - PRU_TYPE_MAX, 97 - }; 98 - 99 - /** 100 85 * struct pru_private_data - device data for a PRU core 101 86 * @type: type of the PRU core (PRU, RTU, Tx_PRU) 102 87 * @is_k3: flag used to identify the need for special load handling
+1 -1
drivers/soc/ti/Kconfig
··· 85 85 86 86 config TI_PRUSS 87 87 tristate "TI PRU-ICSS Subsystem Platform drivers" 88 - depends on SOC_AM33XX || SOC_AM43XX || SOC_DRA7XX || ARCH_KEYSTONE || ARCH_K3 88 + depends on SOC_AM33XX || SOC_AM43XX || SOC_DRA7XX || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST 89 89 select MFD_SYSCON 90 90 help 91 91 TI PRU-ICSS Subsystem platform specific support.
+261 -2
drivers/soc/ti/pruss.c
··· 6 6 * Author(s): 7 7 * Suman Anna <s-anna@ti.com> 8 8 * Andrew F. Davis <afd@ti.com> 9 + * Tero Kristo <t-kristo@ti.com> 9 10 */ 10 11 11 12 #include <linux/clk-provider.h> ··· 19 18 #include <linux/pm_runtime.h> 20 19 #include <linux/pruss_driver.h> 21 20 #include <linux/regmap.h> 21 + #include <linux/remoteproc.h> 22 22 #include <linux/slab.h> 23 + #include "pruss.h" 23 24 24 25 /** 25 26 * struct pruss_private_data - PRUSS driver private data ··· 33 30 bool has_core_mux_clock; 34 31 }; 35 32 33 + /** 34 + * pruss_get() - get the pruss for a given PRU remoteproc 35 + * @rproc: remoteproc handle of a PRU instance 36 + * 37 + * Finds the parent pruss device for a PRU given the @rproc handle of the 38 + * PRU remote processor. This function increments the pruss device's refcount, 39 + * so always use pruss_put() to decrement it back once pruss isn't needed 40 + * anymore. 41 + * 42 + * This API doesn't check if @rproc is valid or not. It is expected the caller 43 + * will have done a pru_rproc_get() on @rproc, before calling this API to make 44 + * sure that @rproc is valid. 45 + * 46 + * Return: pruss handle on success, and an ERR_PTR on failure using one 47 + * of the following error values 48 + * -EINVAL if invalid parameter 49 + * -ENODEV if PRU device or PRUSS device is not found 50 + */ 51 + struct pruss *pruss_get(struct rproc *rproc) 52 + { 53 + struct pruss *pruss; 54 + struct device *dev; 55 + struct platform_device *ppdev; 56 + 57 + if (IS_ERR_OR_NULL(rproc)) 58 + return ERR_PTR(-EINVAL); 59 + 60 + dev = &rproc->dev; 61 + 62 + /* make sure it is PRU rproc */ 63 + if (!dev->parent || !is_pru_rproc(dev->parent)) 64 + return ERR_PTR(-ENODEV); 65 + 66 + ppdev = to_platform_device(dev->parent->parent); 67 + pruss = platform_get_drvdata(ppdev); 68 + if (!pruss) 69 + return ERR_PTR(-ENODEV); 70 + 71 + get_device(pruss->dev); 72 + 73 + return pruss; 74 + } 75 + EXPORT_SYMBOL_GPL(pruss_get); 76 + 77 + /** 78 + * pruss_put() - decrement pruss device's usecount 79 + * @pruss: pruss handle 80 + * 81 + * Complimentary function for pruss_get(). Needs to be called 82 + * after the PRUSS is used, and only if the pruss_get() succeeds. 83 + */ 84 + void pruss_put(struct pruss *pruss) 85 + { 86 + if (IS_ERR_OR_NULL(pruss)) 87 + return; 88 + 89 + put_device(pruss->dev); 90 + } 91 + EXPORT_SYMBOL_GPL(pruss_put); 92 + 93 + /** 94 + * pruss_request_mem_region() - request a memory resource 95 + * @pruss: the pruss instance 96 + * @mem_id: the memory resource id 97 + * @region: pointer to memory region structure to be filled in 98 + * 99 + * This function allows a client driver to request a memory resource, 100 + * and if successful, will let the client driver own the particular 101 + * memory region until released using the pruss_release_mem_region() 102 + * API. 103 + * 104 + * Return: 0 if requested memory region is available (in such case pointer to 105 + * memory region is returned via @region), an error otherwise 106 + */ 107 + int pruss_request_mem_region(struct pruss *pruss, enum pruss_mem mem_id, 108 + struct pruss_mem_region *region) 109 + { 110 + if (!pruss || !region || mem_id >= PRUSS_MEM_MAX) 111 + return -EINVAL; 112 + 113 + mutex_lock(&pruss->lock); 114 + 115 + if (pruss->mem_in_use[mem_id]) { 116 + mutex_unlock(&pruss->lock); 117 + return -EBUSY; 118 + } 119 + 120 + *region = pruss->mem_regions[mem_id]; 121 + pruss->mem_in_use[mem_id] = region; 122 + 123 + mutex_unlock(&pruss->lock); 124 + 125 + return 0; 126 + } 127 + EXPORT_SYMBOL_GPL(pruss_request_mem_region); 128 + 129 + /** 130 + * pruss_release_mem_region() - release a memory resource 131 + * @pruss: the pruss instance 132 + * @region: the memory region to release 133 + * 134 + * This function is the complimentary function to 135 + * pruss_request_mem_region(), and allows the client drivers to 136 + * release back a memory resource. 137 + * 138 + * Return: 0 on success, an error code otherwise 139 + */ 140 + int pruss_release_mem_region(struct pruss *pruss, 141 + struct pruss_mem_region *region) 142 + { 143 + int id; 144 + 145 + if (!pruss || !region) 146 + return -EINVAL; 147 + 148 + mutex_lock(&pruss->lock); 149 + 150 + /* find out the memory region being released */ 151 + for (id = 0; id < PRUSS_MEM_MAX; id++) { 152 + if (pruss->mem_in_use[id] == region) 153 + break; 154 + } 155 + 156 + if (id == PRUSS_MEM_MAX) { 157 + mutex_unlock(&pruss->lock); 158 + return -EINVAL; 159 + } 160 + 161 + pruss->mem_in_use[id] = NULL; 162 + 163 + mutex_unlock(&pruss->lock); 164 + 165 + return 0; 166 + } 167 + EXPORT_SYMBOL_GPL(pruss_release_mem_region); 168 + 169 + /** 170 + * pruss_cfg_get_gpmux() - get the current GPMUX value for a PRU device 171 + * @pruss: pruss instance 172 + * @pru_id: PRU identifier (0-1) 173 + * @mux: pointer to store the current mux value into 174 + * 175 + * Return: 0 on success, or an error code otherwise 176 + */ 177 + int pruss_cfg_get_gpmux(struct pruss *pruss, enum pruss_pru_id pru_id, u8 *mux) 178 + { 179 + int ret; 180 + u32 val; 181 + 182 + if (pru_id >= PRUSS_NUM_PRUS || !mux) 183 + return -EINVAL; 184 + 185 + ret = pruss_cfg_read(pruss, PRUSS_CFG_GPCFG(pru_id), &val); 186 + if (!ret) 187 + *mux = (u8)((val & PRUSS_GPCFG_PRU_MUX_SEL_MASK) >> 188 + PRUSS_GPCFG_PRU_MUX_SEL_SHIFT); 189 + return ret; 190 + } 191 + EXPORT_SYMBOL_GPL(pruss_cfg_get_gpmux); 192 + 193 + /** 194 + * pruss_cfg_set_gpmux() - set the GPMUX value for a PRU device 195 + * @pruss: pruss instance 196 + * @pru_id: PRU identifier (0-1) 197 + * @mux: new mux value for PRU 198 + * 199 + * Return: 0 on success, or an error code otherwise 200 + */ 201 + int pruss_cfg_set_gpmux(struct pruss *pruss, enum pruss_pru_id pru_id, u8 mux) 202 + { 203 + if (mux >= PRUSS_GP_MUX_SEL_MAX || 204 + pru_id >= PRUSS_NUM_PRUS) 205 + return -EINVAL; 206 + 207 + return pruss_cfg_update(pruss, PRUSS_CFG_GPCFG(pru_id), 208 + PRUSS_GPCFG_PRU_MUX_SEL_MASK, 209 + (u32)mux << PRUSS_GPCFG_PRU_MUX_SEL_SHIFT); 210 + } 211 + EXPORT_SYMBOL_GPL(pruss_cfg_set_gpmux); 212 + 213 + /** 214 + * pruss_cfg_gpimode() - set the GPI mode of the PRU 215 + * @pruss: the pruss instance handle 216 + * @pru_id: id of the PRU core within the PRUSS 217 + * @mode: GPI mode to set 218 + * 219 + * Sets the GPI mode for a given PRU by programming the 220 + * corresponding PRUSS_CFG_GPCFGx register 221 + * 222 + * Return: 0 on success, or an error code otherwise 223 + */ 224 + int pruss_cfg_gpimode(struct pruss *pruss, enum pruss_pru_id pru_id, 225 + enum pruss_gpi_mode mode) 226 + { 227 + if (pru_id >= PRUSS_NUM_PRUS || mode >= PRUSS_GPI_MODE_MAX) 228 + return -EINVAL; 229 + 230 + return pruss_cfg_update(pruss, PRUSS_CFG_GPCFG(pru_id), 231 + PRUSS_GPCFG_PRU_GPI_MODE_MASK, 232 + mode << PRUSS_GPCFG_PRU_GPI_MODE_SHIFT); 233 + } 234 + EXPORT_SYMBOL_GPL(pruss_cfg_gpimode); 235 + 236 + /** 237 + * pruss_cfg_miirt_enable() - Enable/disable MII RT Events 238 + * @pruss: the pruss instance 239 + * @enable: enable/disable 240 + * 241 + * Enable/disable the MII RT Events for the PRUSS. 242 + * 243 + * Return: 0 on success, or an error code otherwise 244 + */ 245 + int pruss_cfg_miirt_enable(struct pruss *pruss, bool enable) 246 + { 247 + u32 set = enable ? PRUSS_MII_RT_EVENT_EN : 0; 248 + 249 + return pruss_cfg_update(pruss, PRUSS_CFG_MII_RT, 250 + PRUSS_MII_RT_EVENT_EN, set); 251 + } 252 + EXPORT_SYMBOL_GPL(pruss_cfg_miirt_enable); 253 + 254 + /** 255 + * pruss_cfg_xfr_enable() - Enable/disable XIN XOUT shift functionality 256 + * @pruss: the pruss instance 257 + * @pru_type: PRU core type identifier 258 + * @enable: enable/disable 259 + * 260 + * Return: 0 on success, or an error code otherwise 261 + */ 262 + int pruss_cfg_xfr_enable(struct pruss *pruss, enum pru_type pru_type, 263 + bool enable) 264 + { 265 + u32 mask, set; 266 + 267 + switch (pru_type) { 268 + case PRU_TYPE_PRU: 269 + mask = PRUSS_SPP_XFER_SHIFT_EN; 270 + break; 271 + case PRU_TYPE_RTU: 272 + mask = PRUSS_SPP_RTU_XFR_SHIFT_EN; 273 + break; 274 + default: 275 + return -EINVAL; 276 + } 277 + 278 + set = enable ? mask : 0; 279 + 280 + return pruss_cfg_update(pruss, PRUSS_CFG_SPP, mask, set); 281 + } 282 + EXPORT_SYMBOL_GPL(pruss_cfg_xfr_enable); 283 + 36 284 static void pruss_of_free_clk_provider(void *data) 37 285 { 38 286 struct device_node *clk_mux_np = data; 39 287 40 288 of_clk_del_provider(clk_mux_np); 41 289 of_node_put(clk_mux_np); 290 + } 291 + 292 + static void pruss_clk_unregister_mux(void *data) 293 + { 294 + clk_unregister_mux(data); 42 295 } 43 296 44 297 static int pruss_clk_mux_setup(struct pruss *pruss, struct clk *clk_mux, ··· 352 93 goto put_clk_mux_np; 353 94 } 354 95 355 - ret = devm_add_action_or_reset(dev, (void(*)(void *))clk_unregister_mux, 356 - clk_mux); 96 + ret = devm_add_action_or_reset(dev, pruss_clk_unregister_mux, clk_mux); 357 97 if (ret) { 358 98 dev_err(dev, "failed to add clkmux unregister action %d", ret); 359 99 goto put_clk_mux_np; ··· 490 232 return -ENOMEM; 491 233 492 234 pruss->dev = dev; 235 + mutex_init(&pruss->lock); 493 236 494 237 child = of_get_child_by_name(np, "memories"); 495 238 if (!child) {
+88
drivers/soc/ti/pruss.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + /* 3 + * PRU-ICSS Subsystem user interfaces 4 + * 5 + * Copyright (C) 2015-2023 Texas Instruments Incorporated - http://www.ti.com 6 + * MD Danish Anwar <danishanwar@ti.com> 7 + */ 8 + 9 + #ifndef _SOC_TI_PRUSS_H_ 10 + #define _SOC_TI_PRUSS_H_ 11 + 12 + #include <linux/bits.h> 13 + #include <linux/regmap.h> 14 + 15 + /* 16 + * PRU_ICSS_CFG registers 17 + * SYSCFG, ISRP, ISP, IESP, IECP, SCRP applicable on AMxxxx devices only 18 + */ 19 + #define PRUSS_CFG_REVID 0x00 20 + #define PRUSS_CFG_SYSCFG 0x04 21 + #define PRUSS_CFG_GPCFG(x) (0x08 + (x) * 4) 22 + #define PRUSS_CFG_CGR 0x10 23 + #define PRUSS_CFG_ISRP 0x14 24 + #define PRUSS_CFG_ISP 0x18 25 + #define PRUSS_CFG_IESP 0x1C 26 + #define PRUSS_CFG_IECP 0x20 27 + #define PRUSS_CFG_SCRP 0x24 28 + #define PRUSS_CFG_PMAO 0x28 29 + #define PRUSS_CFG_MII_RT 0x2C 30 + #define PRUSS_CFG_IEPCLK 0x30 31 + #define PRUSS_CFG_SPP 0x34 32 + #define PRUSS_CFG_PIN_MX 0x40 33 + 34 + /* PRUSS_GPCFG register bits */ 35 + #define PRUSS_GPCFG_PRU_GPI_MODE_MASK GENMASK(1, 0) 36 + #define PRUSS_GPCFG_PRU_GPI_MODE_SHIFT 0 37 + 38 + #define PRUSS_GPCFG_PRU_MUX_SEL_SHIFT 26 39 + #define PRUSS_GPCFG_PRU_MUX_SEL_MASK GENMASK(29, 26) 40 + 41 + /* PRUSS_MII_RT register bits */ 42 + #define PRUSS_MII_RT_EVENT_EN BIT(0) 43 + 44 + /* PRUSS_SPP register bits */ 45 + #define PRUSS_SPP_XFER_SHIFT_EN BIT(1) 46 + #define PRUSS_SPP_PRU1_PAD_HP_EN BIT(0) 47 + #define PRUSS_SPP_RTU_XFR_SHIFT_EN BIT(3) 48 + 49 + /** 50 + * pruss_cfg_read() - read a PRUSS CFG sub-module register 51 + * @pruss: the pruss instance handle 52 + * @reg: register offset within the CFG sub-module 53 + * @val: pointer to return the value in 54 + * 55 + * Reads a given register within the PRUSS CFG sub-module and 56 + * returns it through the passed-in @val pointer 57 + * 58 + * Return: 0 on success, or an error code otherwise 59 + */ 60 + static int pruss_cfg_read(struct pruss *pruss, unsigned int reg, unsigned int *val) 61 + { 62 + if (IS_ERR_OR_NULL(pruss)) 63 + return -EINVAL; 64 + 65 + return regmap_read(pruss->cfg_regmap, reg, val); 66 + } 67 + 68 + /** 69 + * pruss_cfg_update() - configure a PRUSS CFG sub-module register 70 + * @pruss: the pruss instance handle 71 + * @reg: register offset within the CFG sub-module 72 + * @mask: bit mask to use for programming the @val 73 + * @val: value to write 74 + * 75 + * Programs a given register within the PRUSS CFG sub-module 76 + * 77 + * Return: 0 on success, or an error code otherwise 78 + */ 79 + static int pruss_cfg_update(struct pruss *pruss, unsigned int reg, 80 + unsigned int mask, unsigned int val) 81 + { 82 + if (IS_ERR_OR_NULL(pruss)) 83 + return -EINVAL; 84 + 85 + return regmap_update_bits(pruss->cfg_regmap, reg, mask, val); 86 + } 87 + 88 + #endif /* _SOC_TI_PRUSS_H_ */
+1 -3
drivers/soc/ti/smartreflex.c
··· 815 815 { 816 816 struct omap_sr *sr_info; 817 817 struct omap_sr_data *pdata = pdev->dev.platform_data; 818 - struct resource *mem; 819 818 struct dentry *nvalue_dir; 820 819 int i, ret = 0; 821 820 ··· 834 835 return -EINVAL; 835 836 } 836 837 837 - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 838 - sr_info->base = devm_ioremap_resource(&pdev->dev, mem); 838 + sr_info->base = devm_platform_ioremap_resource(pdev, 0); 839 839 if (IS_ERR(sr_info->base)) 840 840 return PTR_ERR(sr_info->base); 841 841
+1 -1
drivers/soc/ti/wkup_m3_ipc.c
··· 202 202 { 203 203 m3_ipc->dbg_path = debugfs_create_dir("wkup_m3_ipc", NULL); 204 204 205 - if (!m3_ipc->dbg_path) 205 + if (IS_ERR(m3_ipc->dbg_path)) 206 206 return -EINVAL; 207 207 208 208 (void)debugfs_create_file("enable_late_halt", 0644,
+123
include/linux/pruss_driver.h
··· 9 9 #ifndef _PRUSS_DRIVER_H_ 10 10 #define _PRUSS_DRIVER_H_ 11 11 12 + #include <linux/mutex.h> 13 + #include <linux/remoteproc/pruss.h> 12 14 #include <linux/types.h> 15 + #include <linux/err.h> 16 + 17 + /* 18 + * enum pruss_gp_mux_sel - PRUSS GPI/O Mux modes for the 19 + * PRUSS_GPCFG0/1 registers 20 + * 21 + * NOTE: The below defines are the most common values, but there 22 + * are some exceptions like on 66AK2G, where the RESERVED and MII2 23 + * values are interchanged. Also, this bit-field does not exist on 24 + * AM335x SoCs 25 + */ 26 + enum pruss_gp_mux_sel { 27 + PRUSS_GP_MUX_SEL_GP, 28 + PRUSS_GP_MUX_SEL_ENDAT, 29 + PRUSS_GP_MUX_SEL_RESERVED, 30 + PRUSS_GP_MUX_SEL_SD, 31 + PRUSS_GP_MUX_SEL_MII2, 32 + PRUSS_GP_MUX_SEL_MAX, 33 + }; 34 + 35 + /* 36 + * enum pruss_gpi_mode - PRUSS GPI configuration modes, used 37 + * to program the PRUSS_GPCFG0/1 registers 38 + */ 39 + enum pruss_gpi_mode { 40 + PRUSS_GPI_MODE_DIRECT, 41 + PRUSS_GPI_MODE_PARALLEL, 42 + PRUSS_GPI_MODE_28BIT_SHIFT, 43 + PRUSS_GPI_MODE_MII, 44 + PRUSS_GPI_MODE_MAX, 45 + }; 46 + 47 + /** 48 + * enum pru_type - PRU core type identifier 49 + * 50 + * @PRU_TYPE_PRU: Programmable Real-time Unit 51 + * @PRU_TYPE_RTU: Auxiliary Programmable Real-Time Unit 52 + * @PRU_TYPE_TX_PRU: Transmit Programmable Real-Time Unit 53 + * @PRU_TYPE_MAX: just keep this one at the end 54 + */ 55 + enum pru_type { 56 + PRU_TYPE_PRU, 57 + PRU_TYPE_RTU, 58 + PRU_TYPE_TX_PRU, 59 + PRU_TYPE_MAX, 60 + }; 13 61 14 62 /* 15 63 * enum pruss_mem - PRUSS memory range identifiers ··· 87 39 * @cfg_base: base iomap for CFG region 88 40 * @cfg_regmap: regmap for config region 89 41 * @mem_regions: data for each of the PRUSS memory regions 42 + * @mem_in_use: to indicate if memory resource is in use 43 + * @lock: mutex to serialize access to resources 90 44 * @core_clk_mux: clk handle for PRUSS CORE_CLK_MUX 91 45 * @iep_clk_mux: clk handle for PRUSS IEP_CLK_MUX 92 46 */ ··· 97 47 void __iomem *cfg_base; 98 48 struct regmap *cfg_regmap; 99 49 struct pruss_mem_region mem_regions[PRUSS_MEM_MAX]; 50 + struct pruss_mem_region *mem_in_use[PRUSS_MEM_MAX]; 51 + struct mutex lock; /* PRU resource lock */ 100 52 struct clk *core_clk_mux; 101 53 struct clk *iep_clk_mux; 102 54 }; 55 + 56 + #if IS_ENABLED(CONFIG_TI_PRUSS) 57 + 58 + struct pruss *pruss_get(struct rproc *rproc); 59 + void pruss_put(struct pruss *pruss); 60 + int pruss_request_mem_region(struct pruss *pruss, enum pruss_mem mem_id, 61 + struct pruss_mem_region *region); 62 + int pruss_release_mem_region(struct pruss *pruss, 63 + struct pruss_mem_region *region); 64 + int pruss_cfg_get_gpmux(struct pruss *pruss, enum pruss_pru_id pru_id, u8 *mux); 65 + int pruss_cfg_set_gpmux(struct pruss *pruss, enum pruss_pru_id pru_id, u8 mux); 66 + int pruss_cfg_gpimode(struct pruss *pruss, enum pruss_pru_id pru_id, 67 + enum pruss_gpi_mode mode); 68 + int pruss_cfg_miirt_enable(struct pruss *pruss, bool enable); 69 + int pruss_cfg_xfr_enable(struct pruss *pruss, enum pru_type pru_type, 70 + bool enable); 71 + 72 + #else 73 + 74 + static inline struct pruss *pruss_get(struct rproc *rproc) 75 + { 76 + return ERR_PTR(-EOPNOTSUPP); 77 + } 78 + 79 + static inline void pruss_put(struct pruss *pruss) { } 80 + 81 + static inline int pruss_request_mem_region(struct pruss *pruss, 82 + enum pruss_mem mem_id, 83 + struct pruss_mem_region *region) 84 + { 85 + return -EOPNOTSUPP; 86 + } 87 + 88 + static inline int pruss_release_mem_region(struct pruss *pruss, 89 + struct pruss_mem_region *region) 90 + { 91 + return -EOPNOTSUPP; 92 + } 93 + 94 + static inline int pruss_cfg_get_gpmux(struct pruss *pruss, 95 + enum pruss_pru_id pru_id, u8 *mux) 96 + { 97 + return ERR_PTR(-EOPNOTSUPP); 98 + } 99 + 100 + static inline int pruss_cfg_set_gpmux(struct pruss *pruss, 101 + enum pruss_pru_id pru_id, u8 mux) 102 + { 103 + return ERR_PTR(-EOPNOTSUPP); 104 + } 105 + 106 + static inline int pruss_cfg_gpimode(struct pruss *pruss, 107 + enum pruss_pru_id pru_id, 108 + enum pruss_gpi_mode mode) 109 + { 110 + return ERR_PTR(-EOPNOTSUPP); 111 + } 112 + 113 + static inline int pruss_cfg_miirt_enable(struct pruss *pruss, bool enable) 114 + { 115 + return ERR_PTR(-EOPNOTSUPP); 116 + } 117 + 118 + static inline int pruss_cfg_xfr_enable(struct pruss *pruss, 119 + enum pru_type pru_type, 120 + bool enable); 121 + { 122 + return ERR_PTR(-EOPNOTSUPP); 123 + } 124 + 125 + #endif /* CONFIG_TI_PRUSS */ 103 126 104 127 #endif /* _PRUSS_DRIVER_H_ */