linux/include/linux/remoteproc/st_slim_rproc.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0-or-later */
   2/*
   3 * SLIM core rproc driver header
   4 *
   5 * Copyright (C) 2016 STMicroelectronics
   6 *
   7 * Author: Peter Griffin <peter.griffin@linaro.org>
   8 */
   9#ifndef _ST_REMOTEPROC_SLIM_H
  10#define _ST_REMOTEPROC_SLIM_H
  11
  12#define ST_SLIM_MEM_MAX 2
  13#define ST_SLIM_MAX_CLK 4
  14
  15enum {
  16        ST_SLIM_DMEM,
  17        ST_SLIM_IMEM,
  18};
  19
  20/**
  21 * struct st_slim_mem - slim internal memory structure
  22 * @cpu_addr: MPU virtual address of the memory region
  23 * @bus_addr: Bus address used to access the memory region
  24 * @size: Size of the memory region
  25 */
  26struct st_slim_mem {
  27        void __iomem *cpu_addr;
  28        phys_addr_t bus_addr;
  29        size_t size;
  30};
  31
  32/**
  33 * struct st_slim_rproc - SLIM slim core
  34 * @rproc: rproc handle
  35 * @mem: slim memory information
  36 * @slimcore: slim slimcore regs
  37 * @peri: slim peripheral regs
  38 * @clks: slim clocks
  39 */
  40struct st_slim_rproc {
  41        struct rproc *rproc;
  42        struct st_slim_mem mem[ST_SLIM_MEM_MAX];
  43        void __iomem *slimcore;
  44        void __iomem *peri;
  45
  46        /* st_slim_rproc private */
  47        struct clk *clks[ST_SLIM_MAX_CLK];
  48};
  49
  50struct st_slim_rproc *st_slim_rproc_alloc(struct platform_device *pdev,
  51                                        char *fw_name);
  52void st_slim_rproc_put(struct st_slim_rproc *slim_rproc);
  53
  54#endif
  55