Skip to content

Commit

Permalink
lib: update open-amp lib to release v2022.04.0
Browse files Browse the repository at this point in the history
Origin:
        https://github.com/OpenAMP/open-amp

Commit:
        10dcceca63e5c699312ebc44eac87b63aeb58bf7

Status:
        merge open-amp new version after removing the apps dir.

Release Description:
        https://github.com/OpenAMP/open-amp/releases/tag/v2022.04.0

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
  • Loading branch information
carlocaione committed May 2, 2022
1 parent cfd050f commit 8d53544
Show file tree
Hide file tree
Showing 39 changed files with 361 additions and 259 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ if(CONFIG_OPENAMP)
set(WITH_ZEPHYR 1)
set(WITH_ZEPHYR_LIB 1)
if (CONFIG_OPENAMP_MASTER)
set(WITH_VIRTIO_MASTER 1)
set(WITH_VIRTIO_DRIVER 1)
else()
set(WITH_VIRTIO_MASTER OFF CACHE BOOL "" FORCE)
set(WITH_VIRTIO_DRIVER OFF CACHE BOOL "" FORCE)
endif()
if (CONFIG_OPENAMP_SLAVE)
set(WITH_VIRTIO_SLAVE 1)
set(WITH_VIRTIO_DEVICE 1)
else()
set(WITH_VIRTIO_SLAVE OFF CACHE BOOL "" FORCE)
set(WITH_VIRTIO_DEVICE OFF CACHE BOOL "" FORCE)
endif()
set(WITH_LIBMETAL_FIND OFF CACHE BOOL "" FORCE)
set(WITH_PROXY OFF CACHE BOOL "" FORCE)
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ URL:
https://github.com/OpenAMP/open-amp/

commit:
3c223735ea969199b3c9e2e2a85c9fa7c022b6c0
10dcceca63e5c699312ebc44eac87b63aeb58bf7

Maintained-by:
External
Expand Down
2 changes: 0 additions & 2 deletions open-amp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,3 @@ add_subdirectory (lib)
if (WITH_APPS)
add_subdirectory (apps)
endif (WITH_APPS)

# vim: expandtab:ts=2:sw=2:smartindent
6 changes: 3 additions & 3 deletions open-amp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ library for it project:
* **WITH_PROXY** (default OFF): Include proxy support in the library.
* **WITH APPS** (default OFF): Build with sample applications.
* **WITH_PROXY_APPS** (default OFF):Build with proxy sample applications.
* **WITH_VIRTIO_MASTER** (default ON): Build with virtio master enabled.
* **WITH_VIRTIO_DRIVER** (default ON): Build with virtio driver enabled.
This option can be set to OFF if the only the remote mode is implemented.
* **WITH_VIRTIO_SLAVE** (default ON): Build with virtio slave enabled.
This option can be set to OFF if the only the master mode is implemented.
* **WITH_VIRTIO_DEVICE** (default ON): Build with virtio device enabled.
This option can be set to OFF if the only the driver mode is implemented.
* **WITH_STATIC_LIB** (default ON): Build with a static library.
* **WITH_SHARED_LIB** (default ON): Build with a shared library.
* **WITH_ZEPHYR** (default OFF): Build open-amp as a zephyr library. This option
Expand Down
2 changes: 1 addition & 1 deletion open-amp/VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VERSION_MAJOR = 1
VERSION_MINOR = 1
VERSION_MINOR = 2
VERSION_PATCH = 0
2 changes: 0 additions & 2 deletions open-amp/cmake/collect.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ endfunction (collect)
collector_create (PROJECT_INC_DIRS "")
collector_create (PROJECT_LIB_DIRS "")
collector_create (PROJECT_LIB_DEPS "")

# vim: expandtab:ts=2:sw=2:smartindent
2 changes: 0 additions & 2 deletions open-amp/cmake/depends.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ endif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
if (NOT HAVE_FCNTL_H)
unset (WITH_PROXY CACHE)
endif (NOT HAVE_FCNTL_H)

# vim: expandtab:ts=2:sw=2:smartindent
30 changes: 19 additions & 11 deletions open-amp/cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ string (TOUPPER ${MACHINE} PROJECT_MACHINE_UPPER)

# Select which components are in the openamp lib
option (WITH_PROXY "Build with proxy(access device controlled by other processor)" ON)
option (WITH_APPS "Build with sample applicaitons" OFF)
option (WITH_PROXY_APPS "Build with proxy sample applicaitons" OFF)
option (WITH_APPS "Build with sample applications" OFF)
option (WITH_PROXY_APPS "Build with proxy sample applications" OFF)
if (WITH_APPS)
if (WITH_PROXY)
set (WITH_PROXY_APPS ON)
Expand All @@ -63,16 +63,25 @@ if (NOT ${MACHINE} STREQUAL "zynqmp_r5")
set (WITH_LOAD_FW OFF)
endif(NOT ${MACHINE} STREQUAL "zynqmp_r5")

option (WITH_VIRTIO_MASTER "Build with virtio master enabled" ON)
option (WITH_VIRTIO_SLAVE "Build with virtio slave enabled" ON)
option (WITH_VIRTIO_DRIVER "Build with virtio driver (front end) enabled" ON)
option (WITH_VIRTIO_DEVICE "Build with virtio device (back end) enabled" ON)
option (WITH_VIRTIO_MASTER "Build with virtio driver (front end) enabled" OFF)
option (WITH_VIRTIO_SLAVE "Build with virtio device (back end) enabled" OFF)

if (NOT WITH_VIRTIO_MASTER)
add_definitions(-DVIRTIO_SLAVE_ONLY)
endif (NOT WITH_VIRTIO_MASTER)
if (WITH_VIRTIO_MASTER)
message(DEPRECATION "deprecated cmake option replaced by WITH_VIRTIO_DRIVER" ...)
endif (WITH_VIRTIO_MASTER)
if (WITH_VIRTIO_SLAVE)
message(DEPRECATION "deprecated cmake option replaced by WITH_VIRTIO_DEVICE" ...)
endif (WITH_VIRTIO_SLAVE)

if (NOT WITH_VIRTIO_SLAVE)
add_definitions(-DVIRTIO_MASTER_ONLY)
endif (NOT WITH_VIRTIO_SLAVE)
if (NOT WITH_VIRTIO_DRIVER AND NOT WITH_VIRTIO_MASTER)
add_definitions(-DVIRTIO_DEVICE_ONLY)
endif (NOT WITH_VIRTIO_DRIVER AND NOT WITH_VIRTIO_MASTER)

if (NOT WITH_VIRTIO_DEVICE AND NOT WITH_VIRTIO_SLAVE)
add_definitions(-DVIRTIO_DRIVER_ONLY)
endif (NOT WITH_VIRTIO_DEVICE AND NOT WITH_VIRTIO_SLAVE)

option (WITH_DCACHE_VRINGS "Build with vrings cache operations enabled" OFF)

Expand Down Expand Up @@ -106,4 +115,3 @@ if (DEFINED RPMSG_BUFFER_SIZE)
endif (DEFINED RPMSG_BUFFER_SIZE)

message ("-- C_FLAGS : ${CMAKE_C_FLAGS}")
# vim: expandtab:ts=2:sw=2:smartindent
2 changes: 0 additions & 2 deletions open-amp/cmake/platforms/cross_generic_gcc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ CMAKE_FORCE_CXX_COMPILER ("${CROSS_PREFIX}g++" GNU)
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER CACHE STRING "")
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER CACHE STRING "")
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER CACHE STRING "")

# vim: expandtab:ts=2:sw=2:smartindent
2 changes: 0 additions & 2 deletions open-amp/cmake/platforms/cross_linux_gcc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ set (CMAKE_CXX_COMPILER "${CROSS_PREFIX}g++")
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)

# vim: expandtab:ts=2:sw=2:smartindent
2 changes: 0 additions & 2 deletions open-amp/cmake/platforms/zynq7_generic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ set (CROSS_PREFIX "arm-none-eabi-" CACHE STRING "")
set (CMAKE_C_FLAGS "-mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard" CACHE STRING "")

include (cross_generic_gcc)

# vim: expandtab:ts=2:sw=2:smartindent
2 changes: 0 additions & 2 deletions open-amp/cmake/platforms/zynq7_linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ set (CMAKE_SYSTEM_PROCESSOR "arm")
set (CROSS_PREFIX "arm-xilinx-linux-gnueabi-")

include (cross-linux-gcc)

# vim: expandtab:ts=2:sw=2:smartindent
2 changes: 0 additions & 2 deletions open-amp/cmake/platforms/zynqmp_a53_generic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ set (CMAKE_SYSTEM_PROCESSOR "arm64")
set (CROSS_PREFIX "aarch64-none-elf-")

include (cross_generic_gcc)

# vim: expandtab:ts=2:sw=2:smartindent
2 changes: 0 additions & 2 deletions open-amp/cmake/platforms/zynqmp_linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ set (CROSS_PREFIX "aarch64-linux-gnu-")
set (MACHINE "zynqmp" CACHE STRING "")

include (cross_linux_gcc)

# vim: expandtab:ts=2:sw=2:smartindent
4 changes: 1 addition & 3 deletions open-amp/cmake/platforms/zynqmp_r5_generic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ set (CMAKE_SYSTEM_PROCESSOR "arm" CACHE STRING "")
set (MACHINE "zynqmp_r5" CACHE STRING "")
set (CROSS_PREFIX "armr5-none-eabi-" CACHE STRING "")

# Xilinx SDK version earlier than 2017.2 use mfloat-abi=soft by default to generat libxil
# Xilinx SDK version earlier than 2017.2 use mfloat-abi=soft by default to generate libxil
set (CMAKE_C_FLAGS "-mfloat-abi=hard -mfpu=vfpv3-d16 -mcpu=cortex-r5" CACHE STRING "")

include (cross_generic_gcc)

# vim: expandtab:ts=2:sw=2:smartindent
2 changes: 1 addition & 1 deletion open-amp/docs/apps/echo_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You will need to manually compile the following kernel modules with your Linux k

### Load the Demo
After Linux boots,
* Load the machine remoteproc. If Linux runs as remoteproc master, you will need to pass the other processor's echo_test binary as firmware arguement to the remoteproc module.
* Load the machine remoteproc. If Linux runs as remoteproc master, you will need to pass the other processor's echo_test binary as firmware argument to the remoteproc module.
* If you run the Linux kernel application demo, load the `rpmsg_echo_test_kern_app` module. You will see the kernel application send the message to remote and the remote reply back and the kernel application will verify the result.
* If you run the userspace application demo, load the `rpmsg_user_dev_driver` module.
* If you run the userspace application demo, you will see the similar output on the console:
Expand Down
4 changes: 2 additions & 2 deletions open-amp/docs/apps/matrix_multiply/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# matrix_multiply
This readme is about the OpenAMP matrix_multiply demo.
The matrix_multiply is about one processor generates two matrices, and send them to the one, and the other one calcuate the matrix multiplicaiton and return the result matrix.
The matrix_multiply is about one processor generates two matrices, and send them to the one, and the other one calculate the matrix multiplicaiton and return the result matrix.

For now, it implements Linux generates the matrices, and the baremetal calculate the matrix mulitplication and send back the result.

Expand Down Expand Up @@ -34,7 +34,7 @@ You will need to manually compile the following kernel modules with your Linux k

### Load the Demo
After Linux boots,
* Load the machine remoteproc. If Linux runs as remoteproc master, you will need to pass the other processor's matrix_multiply binary as firmware arguement to the remoteproc module.
* Load the machine remoteproc. If Linux runs as remoteproc master, you will need to pass the other processor's matrix_multiply binary as firmware argument to the remoteproc module.
* If you run the Linux kernel application demo, load the `rpmsg_mat_mul_kern_app` module, you will see the kernel app will generate two matrices to the other processor, and output the result matrix returned by the other processor.
* If you run the userspace application demo, load the `rpmsg_user_dev_driver` module.
* If you run the userspace application demo `mat_mul_demo`, you will see the similar output on the console:
Expand Down
2 changes: 1 addition & 1 deletion open-amp/docs/apps/rpc_demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This readme is about the OpenAMP rpc_demo demo.
The rpc_demo is about one processor uses the UART on the other processor and create file on the other processor's filesystem with file operations.

For now, It implements the processor running generic(baremetal) applicaiton access the devices on the Linux.
For now, It implements the processor running generic(baremetal) application access the devices on the Linux.

## Compilation

Expand Down
22 changes: 11 additions & 11 deletions open-amp/docs/data-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ Remoteproc data struct
===========================
```
struct remoteproc {
struct metal_device dev; /**< Each remoteproc has a device, each device knows its memories regions */
metal_mutex_t lock; /**< mutex lock */
void *rsc_table; /**< pointer to resource table */
size_t rsc_len; /**< length of the resoruce table */
struct remoteproc_ops *ops; /**< pointer to remoteproc operation */
metal_phys_addr_t bootaddr; /**< boot address */
struct loader_ops *loader_ops; /**< image loader operation */
unsigned int state; /**< remoteproc state */
struct metal_list vdevs; /**< list of vdevs (can we limited to one for code size but linux and resource table supports multiple */
void *priv; /**< remoteproc private data */
struct metal_device dev; /**< Each remoteproc has a device, each device knows its memories regions */
metal_mutex_t lock; /**< mutex lock */
void *rsc_table; /**< pointer to resource table */
size_t rsc_len; /**< length of the resource table */
const struct remoteproc_ops *ops; /**< pointer to remoteproc operation */
metal_phys_addr_t bootaddr; /**< boot address */
const struct loader_ops *loader_ops; /**< image loader operation */
unsigned int state; /**< remoteproc state */
struct metal_list vdevs; /**< list of vdevs (can we limited to one for code size but linux and resource table supports multiple */
void *priv; /**< remoteproc private data */
};
struct remoteproc_vdev {
Expand Down Expand Up @@ -162,7 +162,7 @@ struct rpmsg_endpoint {
uint32_t addr; /**< endpoint local address */
uint32_t dest_addr; /**< endpoint default target address */
int (*cb)(struct rpmsg_endpoint *ept, void *data, struct metal_io_region *io, size_t len, uint32_t addr); /**< endpoint callback */
void (*destroy)(struct rpmsg_endpoint *ept); /**< user registerd endpoint destory callback */
void (*destroy)(struct rpmsg_endpoint *ept); /**< user registered endpoint destroy callback */
/* Whether we need another callback for ack ns announcement? */
};
```
6 changes: 3 additions & 3 deletions open-amp/docs/img-src/coprocessor-rpmsg-ns-dynamic.gv
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ digraph G {
node [shape="box"];
rank="same";
m_remoteproc_init [label="rproc = remoteproc_init(&remoteproc_ops, &arg);"]
m_remoteproc_load [label="calls remoteproc_load() to load applicaiton"];
m_remoteproc_load [label="calls remoteproc_load() to load application"];
m_remoteproc_boot [shape="box", label="ret=remoteproc_boot(&rproc)"];
m_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, MASTER, NULL);"];
m_rpmsg_shmpool_init[label="rpmsg_virtio_init_shm_pool(shpool, shbuf, shbuf_pool_size);"];
Expand Down Expand Up @@ -75,8 +75,8 @@ digraph G {

master -> m_remoteproc_init [dir="none"];
slave -> s_remoteproc_init [dir="none"];
s_rpmsg_create_ep -> m_rpmsg_ns_cb [label="NS annoucement"];
m_rpmsg_create_ep -> s_rpmsg_ns_cb [label="NS annoucement"];
s_rpmsg_create_ep -> m_rpmsg_ns_cb [label="NS announcement"];
m_rpmsg_create_ep -> s_rpmsg_ns_cb [label="NS announcement"];
m_rpmsg_send -> s_rpmsg_rx_cb [label="RPMsg data"];
s_rpmsg_send -> m_rpmsg_rx_cb [label="RPMsg data"];
m_rpmsg_destroy_ep -> s_rpmsg_ns_unbind_cb [label="Endpoint destroy NS"];
Expand Down
6 changes: 3 additions & 3 deletions open-amp/docs/img-src/coprocessor-rpmsg-ns.gv
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ digraph G {
node [shape="box"];
rank="same";
m_remoteproc_init [label="rproc = remoteproc_init(&remoteproc_ops, &arg);"]
m_remoteproc_load [label="calls remoteproc_load() to load applicaiton"];
m_remoteproc_load [label="calls remoteproc_load() to load application"];
m_remoteproc_boot [shape="box", label="ret=remoteproc_boot(&rproc)"];
m_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, MASTER, NULL);"];
m_rpmsg_shmpool_init[label="rpmsg_virtio_init_shm_pool(shpool, shbuf, shbuf_pool_size);"];
Expand Down Expand Up @@ -73,8 +73,8 @@ digraph G {

master -> m_remoteproc_init [dir="none"];
slave -> s_remoteproc_init [dir="none"];
s_rpmsg_create_ep -> m_rpmsg_ns_cb [label="NS annoucement"];
m_rpmsg_create_ep -> s_rpmsg_ns_cb [label="NS annoucement"];
s_rpmsg_create_ep -> m_rpmsg_ns_cb [label="NS announcement"];
m_rpmsg_create_ep -> s_rpmsg_ns_cb [label="NS announcement"];
m_rpmsg_send -> s_rpmsg_rx_cb [label="RPMsg data"];
s_rpmsg_send -> m_rpmsg_rx_cb [label="RPMsg data"];
m_rpmsg_destroy_ep -> s_rpmsg_ns_unbind_cb [label="Endpoint destroy NS"];
Expand Down
2 changes: 1 addition & 1 deletion open-amp/docs/img-src/coprocessor-rpmsg-static-ep.gv
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ digraph G {
node [shape="box"];
rank="same";
m_remoteproc_init [label="rproc = remoteproc_init(&remoteproc_ops, &arg);"];
m_remoteproc_load [label="calls remoteproc_load() to load applicaiton"];
m_remoteproc_load [label="calls remoteproc_load() to load application"];
m_remoteproc_boot [shape="box", label="ret=remoteproc_boot(&rproc)"];
m_remoteproc_get_vdev [label="vdev=remoteproc_create_virtio(rproc, rpmsg_vdev_id, MASTER, NULL);"];
m_rpmsg_shmpool_init[label="rpmsg_virtio_init_shm_pool(shpool, shbuf, shbuf_pool_size);"];
Expand Down
10 changes: 5 additions & 5 deletions open-amp/docs/remoteproc-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ It will extend to crash detection, suspend and resume.
| State | State Description |
|:------|:------------------|
| Offline | Initial state of a remoteproc instance. The remote presented by the remoteproc instance and its resource has been powered off. |
| Configured | The remote presented by the remoteproc instance has been configured. And ready to load applicaiton. |
| Ready | The remote presented by the remoteproc instance has applicaiton loaded, and ready to run. |
| Configured | The remote presented by the remoteproc instance has been configured. And ready to load application. |
| Ready | The remote presented by the remoteproc instance has application loaded, and ready to run. |
| Stopped | The remote presented by the remoteproc instance has stopped from running. But the remote is still powered on. And the remote's resource hasn't been released. |

![Rproc LCM States](img/rproc-lcm-state-machine.png)
Expand All @@ -28,7 +28,7 @@ It will extend to crash detection, suspend and resume.
* Initialize remoteproc instance:
```
struct remoteproc *remoteproc_init(struct remoteproc *rproc,
struct remoteproc_ops *ops, void *priv)
const struct remoteproc_ops *ops, void *priv)
```
* Release remoteproc instance:
```
Expand Down Expand Up @@ -64,15 +64,15 @@ It will extend to crash detection, suspend and resume.
size_t rsc_size)
```
* Configure the remote presented by the remoteproc instance to make it able
to load applicaiton:
to load application:
```
int remoteproc_config(struct remoteproc *rproc, void *data)
```
* Load application to the remote presented by the remoteproc instance to make
it ready to run:
```
int remoteproc_load(struct remoteproc *rproc, const char *path,
void *store, struct image_store_ops *store_ops,
void *store, const struct image_store_ops *store_ops,
void **img_info)
```
* Run application on the remote presented by the remoteproc instance:
Expand Down
2 changes: 1 addition & 1 deletion open-amp/docs/rpmsg-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
RPMsg is a framework to allow communication between two processors.
RPMsg implementation in OpenAMP library is based on virtio. It complies
the RPMsg Linux kernel implementation. It defines the handshaking on
setting up and tearing down the communication between applicaitons
setting up and tearing down the communication between applications
running on two processors.

## RPMsg User API Flow Chats
Expand Down
2 changes: 0 additions & 2 deletions open-amp/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,3 @@ endif (WITH_ZEPHYR)

install (DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/openamp" DESTINATION include)
install (DIRECTORY "${PROJECT_BINARY_DIR}/include/generated/openamp" DESTINATION include)

# vim: expandtab:ts=2:sw=2:smartindent
2 changes: 1 addition & 1 deletion open-amp/lib/include/openamp/elf_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ struct elf64_info {
#define ELF_STATE_MASK 0xFF00L
#define ELF_NEXT_SEGMENT_MASK 0x00FFL

extern struct loader_ops elf_ops;
extern const struct loader_ops elf_ops;

/**
* elf_identify - check if it is an ELF file
Expand Down
12 changes: 7 additions & 5 deletions open-amp/lib/include/openamp/remoteproc.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,9 @@ struct remoteproc {
struct metal_list mems;
struct metal_list vdevs;
unsigned long bitmap;
struct remoteproc_ops *ops;
const struct remoteproc_ops *ops;
metal_phys_addr_t bootaddr;
struct loader_ops *loader;
const struct loader_ops *loader;
unsigned int state;
void *priv;
};
Expand All @@ -399,7 +399,7 @@ struct remoteproc {
*/
struct remoteproc_ops {
struct remoteproc *(*init)(struct remoteproc *rproc,
struct remoteproc_ops *ops, void *arg);
const struct remoteproc_ops *ops, void *arg);
void (*remove)(struct remoteproc *rproc);
void *(*mmap)(struct remoteproc *rproc,
metal_phys_addr_t *pa, metal_phys_addr_t *da,
Expand All @@ -423,6 +423,7 @@ struct remoteproc_ops {
* @da - device address
* @va - virtual address
* @size - memory size
* @buf - pointer to remoteproc_mem struct object to store result
*
* @returns remoteproc memory pointed by buf if success, otherwise NULL
*/
Expand Down Expand Up @@ -503,7 +504,8 @@ enum remoteproc_state {
* @returns created remoteproc pointer
*/
struct remoteproc *remoteproc_init(struct remoteproc *rproc,
struct remoteproc_ops *ops, void *priv);
const struct remoteproc_ops *ops,
void *priv);

/**
* remoteproc_remove
Expand Down Expand Up @@ -720,7 +722,7 @@ int remoteproc_shutdown(struct remoteproc *rproc);
* return 0 for success and negative value for failure
*/
int remoteproc_load(struct remoteproc *rproc, const char *path,
void *store, struct image_store_ops *store_ops,
void *store, const struct image_store_ops *store_ops,
void **img_info);

/**
Expand Down
Loading

0 comments on commit 8d53544

Please sign in to comment.