Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * SLIM core rproc driver header
0004  *
0005  * Copyright (C) 2016 STMicroelectronics
0006  *
0007  * Author: Peter Griffin <peter.griffin@linaro.org>
0008  */
0009 #ifndef _ST_REMOTEPROC_SLIM_H
0010 #define _ST_REMOTEPROC_SLIM_H
0011 
0012 #define ST_SLIM_MEM_MAX 2
0013 #define ST_SLIM_MAX_CLK 4
0014 
0015 enum {
0016     ST_SLIM_DMEM,
0017     ST_SLIM_IMEM,
0018 };
0019 
0020 /**
0021  * struct st_slim_mem - slim internal memory structure
0022  * @cpu_addr: MPU virtual address of the memory region
0023  * @bus_addr: Bus address used to access the memory region
0024  * @size: Size of the memory region
0025  */
0026 struct st_slim_mem {
0027     void __iomem *cpu_addr;
0028     phys_addr_t bus_addr;
0029     size_t size;
0030 };
0031 
0032 /**
0033  * struct st_slim_rproc - SLIM slim core
0034  * @rproc: rproc handle
0035  * @mem: slim memory information
0036  * @slimcore: slim slimcore regs
0037  * @peri: slim peripheral regs
0038  * @clks: slim clocks
0039  */
0040 struct st_slim_rproc {
0041     struct rproc *rproc;
0042     struct st_slim_mem mem[ST_SLIM_MEM_MAX];
0043     void __iomem *slimcore;
0044     void __iomem *peri;
0045 
0046     /* st_slim_rproc private */
0047     struct clk *clks[ST_SLIM_MAX_CLK];
0048 };
0049 
0050 struct st_slim_rproc *st_slim_rproc_alloc(struct platform_device *pdev,
0051                     char *fw_name);
0052 void st_slim_rproc_put(struct st_slim_rproc *slim_rproc);
0053 
0054 #endif