Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * PRU-ICSS sub-system specific definitions
0004  *
0005  * Copyright (C) 2014-2020 Texas Instruments Incorporated - http://www.ti.com/
0006  *  Suman Anna <s-anna@ti.com>
0007  */
0008 
0009 #ifndef _PRUSS_DRIVER_H_
0010 #define _PRUSS_DRIVER_H_
0011 
0012 #include <linux/types.h>
0013 
0014 /*
0015  * enum pruss_mem - PRUSS memory range identifiers
0016  */
0017 enum pruss_mem {
0018     PRUSS_MEM_DRAM0 = 0,
0019     PRUSS_MEM_DRAM1,
0020     PRUSS_MEM_SHRD_RAM2,
0021     PRUSS_MEM_MAX,
0022 };
0023 
0024 /**
0025  * struct pruss_mem_region - PRUSS memory region structure
0026  * @va: kernel virtual address of the PRUSS memory region
0027  * @pa: physical (bus) address of the PRUSS memory region
0028  * @size: size of the PRUSS memory region
0029  */
0030 struct pruss_mem_region {
0031     void __iomem *va;
0032     phys_addr_t pa;
0033     size_t size;
0034 };
0035 
0036 /**
0037  * struct pruss - PRUSS parent structure
0038  * @dev: pruss device pointer
0039  * @cfg_base: base iomap for CFG region
0040  * @cfg_regmap: regmap for config region
0041  * @mem_regions: data for each of the PRUSS memory regions
0042  * @core_clk_mux: clk handle for PRUSS CORE_CLK_MUX
0043  * @iep_clk_mux: clk handle for PRUSS IEP_CLK_MUX
0044  */
0045 struct pruss {
0046     struct device *dev;
0047     void __iomem *cfg_base;
0048     struct regmap *cfg_regmap;
0049     struct pruss_mem_region mem_regions[PRUSS_MEM_MAX];
0050     struct clk *core_clk_mux;
0051     struct clk *iep_clk_mux;
0052 };
0053 
0054 #endif  /* _PRUSS_DRIVER_H_ */