Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cris-mirror.git] / include / linux / remoteproc / st_slim_rproc.h
blob4155556fa4b28adedda5e7bcf42e1f58e07d6c1c
1 /*
2 * SLIM core rproc driver header
4 * Copyright (C) 2016 STMicroelectronics
6 * Author: Peter Griffin <peter.griffin@linaro.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 #ifndef _ST_REMOTEPROC_SLIM_H
14 #define _ST_REMOTEPROC_SLIM_H
16 #define ST_SLIM_MEM_MAX 2
17 #define ST_SLIM_MAX_CLK 4
19 enum {
20 ST_SLIM_DMEM,
21 ST_SLIM_IMEM,
24 /**
25 * struct st_slim_mem - slim internal memory structure
26 * @cpu_addr: MPU virtual address of the memory region
27 * @bus_addr: Bus address used to access the memory region
28 * @size: Size of the memory region
30 struct st_slim_mem {
31 void __iomem *cpu_addr;
32 phys_addr_t bus_addr;
33 size_t size;
36 /**
37 * struct st_slim_rproc - SLIM slim core
38 * @rproc: rproc handle
39 * @mem: slim memory information
40 * @slimcore: slim slimcore regs
41 * @peri: slim peripheral regs
42 * @clks: slim clocks
44 struct st_slim_rproc {
45 struct rproc *rproc;
46 struct st_slim_mem mem[ST_SLIM_MEM_MAX];
47 void __iomem *slimcore;
48 void __iomem *peri;
50 /* st_slim_rproc private */
51 struct clk *clks[ST_SLIM_MAX_CLK];
54 struct st_slim_rproc *st_slim_rproc_alloc(struct platform_device *pdev,
55 char *fw_name);
56 void st_slim_rproc_put(struct st_slim_rproc *slim_rproc);
58 #endif