2023-12-12 03:53:45 +01:00
|
|
|
# ##############################################################################
|
|
|
|
# drivers/rpmsg/CMakeLists.txt
|
|
|
|
#
|
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
|
|
|
# license agreements. See the NOTICE file distributed with this work for
|
|
|
|
# additional information regarding copyright ownership. The ASF licenses this
|
|
|
|
# file to you under the Apache License, Version 2.0 (the "License"); you may not
|
|
|
|
# use this file except in compliance with the License. You may obtain a copy of
|
|
|
|
# the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations under
|
|
|
|
# the License.
|
|
|
|
#
|
|
|
|
# ##############################################################################
|
|
|
|
|
|
|
|
if(CONFIG_RPMSG)
|
|
|
|
set(SRCS)
|
|
|
|
|
|
|
|
list(APPEND SRCS rpmsg.c)
|
|
|
|
|
2023-12-22 09:09:24 +01:00
|
|
|
if(CONFIG_RPMSG_PING)
|
|
|
|
list(APPEND SRCS rpmsg_ping.c)
|
|
|
|
endif()
|
|
|
|
|
2024-01-04 07:10:44 +01:00
|
|
|
if(CONFIG_RPMSG_PORT)
|
|
|
|
list(APPEND SRCS rpmsg_port.c)
|
|
|
|
target_include_directories(drivers
|
|
|
|
PRIVATE ${NUTTX_DIR}/openamp/open-amp/lib)
|
|
|
|
endif()
|
|
|
|
|
2024-01-23 08:26:37 +01:00
|
|
|
if(CONFIG_RPMSG_PORT_SPI)
|
|
|
|
list(APPEND SRCS rpmsg_port_spi.c)
|
|
|
|
endif()
|
|
|
|
|
2024-06-05 15:50:52 +02:00
|
|
|
if(CONFIG_RPMSG_PORT_SPI_SLAVE)
|
|
|
|
list(APPEND SRCS rpmsg_port_spi_slave.c)
|
|
|
|
endif()
|
|
|
|
|
2024-01-04 08:05:28 +01:00
|
|
|
if(CONFIG_RPMSG_PORT_UART)
|
|
|
|
list(APPEND SRCS rpmsg_port_uart.c)
|
|
|
|
endif()
|
|
|
|
|
2024-02-06 04:12:15 +01:00
|
|
|
if(CONFIG_RPMSG_VIRTIO)
|
|
|
|
list(APPEND SRCS rpmsg_virtio.c)
|
|
|
|
endif()
|
|
|
|
|
2024-06-14 05:08:24 +02:00
|
|
|
if(CONFIG_RPMSG_VIRTIO_IVSHMEM)
|
|
|
|
list(APPEND SRCS rpmsg_virtio_ivshmem.c)
|
|
|
|
endif()
|
|
|
|
|
drivers/rpmsg: add rpmsg router support
Rpmsg Router is new rpmsg transport layer, it can router the rpmsg
messages to a cpu that not directly connected with local cpu by Rpmsg,
For the rpmsg services, it is as if there is a real Rpmsg Channel between
the local cpu and the remote cpu.
For examples, there are three cpus: ap, cp and audio.
ap and cp, ap and audio has share memory and be connected by Rpmsg VirtIO,
so ap and cp, ap and audio can communicate with each other by Rpmsg, but
cp can not communicate with audio direclty.
[cp] <-- rpmsg virtio --> [ap] <-- rpmsg virtio --> [audio]
With rpmsg router, the cp can communicate with audip by Rpmsg dereclty because
the router in ap will forward the rpmsg message from cp/audio to audio/cp, like
this:
+<----- rpmsg router --> hub <-- rpmsg router ------>+
| | |
[cp] <-- rpmsg virtio --> [ap] <-- rpmsg virtio --> [audio]
Signed-off-by: yintao <yintao@xiaomi.com>
2024-04-14 07:17:05 +02:00
|
|
|
if(CONFIG_RPMSG_ROUTER)
|
|
|
|
list(APPEND SRCS rpmsg_router_hub.c rpmsg_router_edge.c)
|
|
|
|
endif()
|
|
|
|
|
2024-06-14 05:08:24 +02:00
|
|
|
target_include_directories(drivers PRIVATE ${NUTTX_DIR}/openamp/open-amp/lib)
|
2023-12-12 03:53:45 +01:00
|
|
|
target_sources(drivers PRIVATE ${SRCS})
|
|
|
|
endif()
|