Skip to content

Commit 8c3ca1a

Browse files
committed
drivers/mbox: Add mailbox framework and PL320 driver
1 parent b82b5d0 commit 8c3ca1a

9 files changed

Lines changed: 2155 additions & 22 deletions

File tree

drivers/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ source "drivers/i3c/Kconfig"
1616
source "drivers/spi/Kconfig"
1717
source "drivers/i2s/Kconfig"
1818
source "drivers/ipcc/Kconfig"
19+
source "drivers/mbox/Kconfig"
1920
source "drivers/timers/Kconfig"
2021
source "drivers/analog/Kconfig"
2122
source "drivers/audio/Kconfig"

drivers/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ include i2c/Make.defs
4242
include i2s/Make.defs
4343
include i3c/Make.defs
4444
include ipcc/Make.defs
45+
include mbox/Make.defs
4546
include input/Make.defs
4647
include ioexpander/Make.defs
4748
include lcd/Make.defs

drivers/mbox/CMakeLists.txt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# ##############################################################################
2+
# drivers/mbox/CMakeLists.txt
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
7+
# license agreements. See the NOTICE file distributed with this work for
8+
# additional information regarding copyright ownership. The ASF licenses this
9+
# file to you under the Apache License, Version 2.0 (the "License"); you may not
10+
# use this file except in compliance with the License. You may obtain a copy of
11+
# the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18+
# License for the specific language governing permissions and limitations under
19+
# the License.
20+
#
21+
# ##############################################################################
22+
23+
if(CONFIG_MBOX)
24+
set(SRCS mbox.c)
25+
26+
if(CONFIG_MBOX_PL320)
27+
list(APPEND SRCS pl320.c)
28+
endif()
29+
30+
target_sources(drivers PRIVATE ${SRCS})
31+
endif()

drivers/mbox/Kconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#
2+
# For a description of the syntax of this configuration file,
3+
# see the file kconfig-language.txt in the NuttX tools repository.
4+
#
5+
6+
menuconfig MBOX
7+
bool "MBOX Driver Support"
8+
default n
9+
---help---
10+
This selection enables building of the "upper-half" MBOX driver.
11+
See include/nuttx/mbox/mbox.h for further MBOX driver information.
12+
13+
if MBOX
14+
15+
config MBOX_TRACE
16+
bool "Enable MBOX trace debug"
17+
default n
18+
19+
menuconfig MBOX_PL320
20+
bool "PL320 Chip support"
21+
default n
22+
---help---
23+
ARM PL320 Inter-Processor Communications Module (IPCM) driver.
24+
The PL320 provides up to 32 mailbox channels for inter-core
25+
messaging with interrupt-driven notification and acknowledgment.
26+
27+
endif

drivers/mbox/Make.defs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
############################################################################
2+
# drivers/mbox/Make.defs
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Licensed to the Apache Software Foundation (ASF) under one or more
7+
# contributor license agreements. See the NOTICE file distributed with
8+
# this work for additional information regarding copyright ownership. The
9+
# ASF licenses this file to you under the Apache License, Version 2.0 (the
10+
# "License"); you may not use this file except in compliance with the
11+
# License. You may obtain a copy of the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18+
# License for the specific language governing permissions and limitations
19+
# under the License.
20+
#
21+
############################################################################
22+
23+
# Include mailbox drivers
24+
25+
ifeq ($(CONFIG_MBOX),y)
26+
27+
CSRCS += mbox.c
28+
29+
ifeq ($(CONFIG_MBOX_PL320),y)
30+
CSRCS += pl320.c
31+
endif
32+
33+
# Include mbox build support
34+
35+
DEPPATH += --dep-path mbox
36+
VPATH += :mbox
37+
38+
endif # CONFIG_MBOX

0 commit comments

Comments
 (0)