Home
last modified time | relevance | path

Searched +full:mbox +full:- (Results 1 – 25 of 588) sorted by relevance

12345678910>>...24

/linux-6.8/drivers/net/ethernet/cavium/liquidio/
Docteon_mailbox.c7 * Copyright (c) 2003-2016 Cavium, Inc.
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
31 * @mbox: Pointer mailbox
33 * Reads the 8-bytes of data from the mbox register
36 int octeon_mbox_read(struct octeon_mbox *mbox) in octeon_mbox_read() argument
41 spin_lock(&mbox->lock); in octeon_mbox_read()
43 msg.u64 = readq(mbox->mbox_read_reg); in octeon_mbox_read()
46 spin_unlock(&mbox->lock); in octeon_mbox_read()
50 if (mbox->state & OCTEON_MBOX_STATE_REQUEST_RECEIVING) { in octeon_mbox_read()
51 mbox->mbox_req.data[mbox->mbox_req.recv_len - 1] = msg.u64; in octeon_mbox_read()
[all …]
/linux-6.8/drivers/mailbox/
Dmailbox-altera.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright Altera Corporation (C) 2013-2014. All rights reserved
15 #define DRIVER_NAME "altera-mailbox"
40 bool is_sender; /* 1-sender, 0-receiver */
54 if (!chan || !chan->con_priv) in mbox_chan_to_altera_mbox()
57 return (struct altera_mbox *)chan->con_priv; in mbox_chan_to_altera_mbox()
60 static inline int altera_mbox_full(struct altera_mbox *mbox) in altera_mbox_full() argument
64 status = readl_relaxed(mbox->mbox_base + MAILBOX_STS_REG); in altera_mbox_full()
68 static inline int altera_mbox_pending(struct altera_mbox *mbox) in altera_mbox_pending() argument
72 status = readl_relaxed(mbox->mbox_base + MAILBOX_STS_REG); in altera_mbox_pending()
[all …]
Dhi6220-mailbox.c1 // SPDX-License-Identifier: GPL-2.0-only
57 * - direction: tx or rx
58 * - dst irq: peer core's irq number
59 * - ack irq: local irq number
60 * - slot number
90 static void mbox_set_state(struct hi6220_mbox *mbox, in mbox_set_state() argument
95 status = readl(mbox->base + MBOX_MODE_REG(slot)); in mbox_set_state()
97 writel(status, mbox->base + MBOX_MODE_REG(slot)); in mbox_set_state()
100 static void mbox_set_mode(struct hi6220_mbox *mbox, in mbox_set_mode() argument
105 mode = readl(mbox->base + MBOX_MODE_REG(slot)); in mbox_set_mode()
[all …]
Domap-mailbox.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2006-2009 Nokia Corporation. All rights reserved.
6 * Copyright (C) 2013-2021 Texas Instruments Incorporated - https://www.ti.com
9 * Suman Anna <s-anna@ti.com>
22 #include <linux/omap-mailbox.h>
68 struct omap_mbox *mbox; member
125 if (!chan || !chan->con_priv) in mbox_chan_to_omap_mbox()
128 return (struct omap_mbox *)chan->con_priv; in mbox_chan_to_omap_mbox()
134 return __raw_readl(mdev->mbox_base + ofs); in mbox_read_reg()
140 __raw_writel(val, mdev->mbox_base + ofs); in mbox_write_reg()
[all …]
Dmailbox-mpfs.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (c) 2020-2022 Microchip Corporation. All rights reserved.
43 #define SCB_CTRL_MASK GENMASK(SCB_CTRL_POS + SCB_MASK_WIDTH - 1, SCB_CTRL_POS)
60 #define SCB_STATUS_MASK GENMASK(SCB_STATUS_POS + SCB_MASK_WIDTH - 1, SCB_STATUS_POS)
74 static bool mpfs_mbox_busy(struct mpfs_mbox *mbox) in mpfs_mbox_busy() argument
78 status = readl_relaxed(mbox->ctrl_base + SERVICES_SR_OFFSET); in mpfs_mbox_busy()
85 struct mpfs_mbox *mbox = (struct mpfs_mbox *)chan->con_priv; in mpfs_mbox_last_tx_done() local
86 struct mpfs_mss_response *response = mbox->response; in mpfs_mbox_last_tx_done()
89 if (mpfs_mbox_busy(mbox)) in mpfs_mbox_last_tx_done()
98 val = readl_relaxed(mbox->ctrl_base + SERVICES_SR_OFFSET); in mpfs_mbox_last_tx_done()
[all …]
Dsun6i-msgbox.c1 // SPDX-License-Identifier: GPL-2.0
3 // Copyright (c) 2017-2019 Samuel Holland <samuel@sholland.org>
44 #define mbox_dbg(mbox, ...) dev_dbg((mbox)->controller.dev, __VA_ARGS__) argument
58 return chan - chan->mbox->chans; in channel_number()
63 return chan->con_priv; in to_sun6i_msgbox()
68 struct sun6i_msgbox *mbox = dev_id; in sun6i_msgbox_irq() local
73 status = readl(mbox->regs + LOCAL_IRQ_EN_REG) & in sun6i_msgbox_irq()
74 readl(mbox->regs + LOCAL_IRQ_STAT_REG); in sun6i_msgbox_irq()
80 struct mbox_chan *chan = &mbox->controller.chans[n]; in sun6i_msgbox_irq()
86 uint32_t msg = readl(mbox->regs + MSG_DATA_REG(n)); in sun6i_msgbox_irq()
[all …]
Darmada-37xx-rwtm-mailbox.c1 // SPDX-License-Identifier: GPL-2.0+
16 #include <linux/armada-37xx-rwtm-mailbox.h>
18 #define DRIVER_NAME "armada-37xx-rwtm-mailbox"
45 struct a37xx_mbox *mbox = chan->con_priv; in a37xx_mbox_receive() local
49 rx_msg.retval = readl(mbox->base + RWTM_MBOX_RETURN_STATUS); in a37xx_mbox_receive()
51 rx_msg.status[i] = readl(mbox->base + RWTM_MBOX_STATUS(i)); in a37xx_mbox_receive()
59 struct a37xx_mbox *mbox = chan->con_priv; in a37xx_mbox_irq_handler() local
62 reg = readl(mbox->base + RWTM_HOST_INT_RESET); in a37xx_mbox_irq_handler()
68 dev_err(mbox->dev, "Secure processor command queue full\n"); in a37xx_mbox_irq_handler()
70 writel(reg, mbox->base + RWTM_HOST_INT_RESET); in a37xx_mbox_irq_handler()
[all …]
Dbcm2835-mailbox.c1 // SPDX-License-Identifier: GPL-2.0
4 * Copyright (C) 2013-2014 Lubomir Rintel
8 * - arch/arm/mach-bcm2708/vcio.c file written by Gray Girling that was
9 * obtained from branch "rpi-3.6.y" of git://github.com/raspberrypi/
11 * - drivers/mailbox/bcm2835-ipc.c by Lubomir Rintel at
12 * https://github.com/hackerspace/rpi-linux/blob/lr-raspberry-pi/drivers/
13 * mailbox/bcm2835-ipc.c
14 * - documentation available on the following web site:
15 * https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface
19 #include <linux/dma-mapping.h>
[all …]
Dhi3660-mailbox.c1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (c) 2017-2018 HiSilicon Limited.
3 // Copyright (c) 2017-2018 Linaro Limited.
25 #define MBOX_BASE(mbox, ch) ((mbox)->base + ((ch) * 0x40)) argument
48 * struct hi3660_chan_info - Hi3660 mailbox channel information
62 * struct hi3660_mbox - Hi3660 mailbox controller data
80 static struct hi3660_mbox *to_hi3660_mbox(struct mbox_controller *mbox) in to_hi3660_mbox() argument
82 return container_of(mbox, struct hi3660_mbox, controller); in to_hi3660_mbox()
87 unsigned long ch = (unsigned long)chan->con_priv; in hi3660_mbox_check_state()
88 struct hi3660_mbox *mbox = to_hi3660_mbox(chan->mbox); in hi3660_mbox_check_state() local
[all …]
Dmailbox.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2013-2014 Linaro Ltd.
32 spin_lock_irqsave(&chan->lock, flags); in add_to_rbuf()
35 if (chan->msg_count == MBOX_TX_QUEUE_LEN) { in add_to_rbuf()
36 spin_unlock_irqrestore(&chan->lock, flags); in add_to_rbuf()
37 return -ENOBUFS; in add_to_rbuf()
40 idx = chan->msg_free; in add_to_rbuf()
41 chan->msg_data[idx] = mssg; in add_to_rbuf()
42 chan->msg_count++; in add_to_rbuf()
44 if (idx == MBOX_TX_QUEUE_LEN - 1) in add_to_rbuf()
[all …]
Dmtk-adsp-mailbox.c1 // SPDX-License-Identifier: GPL-2.0
4 * Author: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
19 struct mbox_controller mbox; member
31 static inline struct mtk_adsp_mbox_priv *get_mtk_adsp_mbox_priv(struct mbox_controller *mbox) in get_mtk_adsp_mbox_priv() argument
33 return container_of(mbox, struct mtk_adsp_mbox_priv, mbox); in get_mtk_adsp_mbox_priv()
39 struct mtk_adsp_mbox_priv *priv = get_mtk_adsp_mbox_priv(chan->mbox); in mtk_adsp_mbox_irq()
40 u32 op = readl(priv->va_mboxreg + priv->cfg->set_out); in mtk_adsp_mbox_irq()
42 writel(op, priv->va_mboxreg + priv->cfg->clr_out); in mtk_adsp_mbox_irq()
56 static struct mbox_chan *mtk_adsp_mbox_xlate(struct mbox_controller *mbox, in mtk_adsp_mbox_xlate() argument
59 return mbox->chans; in mtk_adsp_mbox_xlate()
[all …]
Darm_mhu_db.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2013-2015 Fujitsu Semiconductor Ltd.
28 #define MHU_CHANS 3 /* Secure, Non-Secure High and Low Priority */
41 struct mbox_controller mbox; member
46 * struct mhu_db_channel - ARM MHU Mailbox allocated channel information
59 mhu_db_mbox_to_channel(struct mbox_controller *mbox, unsigned int pchan, in mhu_db_mbox_to_channel() argument
65 for (i = 0; i < mbox->num_chans; i++) { in mhu_db_mbox_to_channel()
66 chan_info = mbox->chans[i].con_priv; in mhu_db_mbox_to_channel()
67 if (chan_info && chan_info->pchan == pchan && in mhu_db_mbox_to_channel()
68 chan_info->doorbell == doorbell) in mhu_db_mbox_to_channel()
[all …]
/linux-6.8/drivers/soc/apple/
Dmailbox.c1 // SPDX-License-Identifier: GPL-2.0-only OR MIT
9 * exchange 64+32 bit messages between the main CPU and a co-processor.
13 * Both the main CPU and the co-processor see the same set of registers but
99 int apple_mbox_send(struct apple_mbox *mbox, const struct apple_mbox_msg msg, in apple_mbox_send() argument
107 spin_lock_irqsave(&mbox->tx_lock, flags); in apple_mbox_send()
108 mbox_ctrl = readl_relaxed(mbox->regs + mbox->hw->a2i_control); in apple_mbox_send()
110 while (mbox_ctrl & mbox->hw->control_full) { in apple_mbox_send()
113 mbox->regs + mbox->hw->a2i_control, mbox_ctrl, in apple_mbox_send()
114 !(mbox_ctrl & mbox->hw->control_full), 100, in apple_mbox_send()
118 spin_unlock_irqrestore(&mbox->tx_lock, flags); in apple_mbox_send()
[all …]
/linux-6.8/drivers/net/ethernet/marvell/octeontx2/af/
Dmbox.c1 // SPDX-License-Identifier: GPL-2.0
13 #include "mbox.h"
18 void __otx2_mbox_reset(struct otx2_mbox *mbox, int devid) in __otx2_mbox_reset() argument
20 struct otx2_mbox_dev *mdev = &mbox->dev[devid]; in __otx2_mbox_reset()
22 void *hw_mbase = mdev->hwbase; in __otx2_mbox_reset()
24 tx_hdr = hw_mbase + mbox->tx_start; in __otx2_mbox_reset()
25 rx_hdr = hw_mbase + mbox->rx_start; in __otx2_mbox_reset()
27 mdev->msg_size = 0; in __otx2_mbox_reset()
28 mdev->rsp_size = 0; in __otx2_mbox_reset()
29 tx_hdr->num_msgs = 0; in __otx2_mbox_reset()
[all …]
/linux-6.8/drivers/net/ethernet/marvell/octeon_ep/
Doctep_ctrl_mbox.c1 // SPDX-License-Identifier: GPL-2.0
27 /* Size of mbox info in bytes */
29 /* Size of mbox host to fw queue info in bytes */
31 /* Size of mbox fw to host queue info in bytes */
66 return sz - (abs(pi - ci) % sz); in octep_ctrl_mbox_circq_space()
71 return (abs(pi - ci) % sz); in octep_ctrl_mbox_circq_depth()
74 int octep_ctrl_mbox_init(struct octep_ctrl_mbox *mbox) in octep_ctrl_mbox_init() argument
78 if (!mbox) in octep_ctrl_mbox_init()
79 return -EINVAL; in octep_ctrl_mbox_init()
81 if (!mbox->barmem) { in octep_ctrl_mbox_init()
[all …]
Doctep_pfvf_mbox.c1 // SPDX-License-Identifier: GPL-2.0
39 dev_dbg(&oct->pdev->dev, "VF id:%d VF version:%d PF version:%d\n", in octep_pfvf_validate_version()
42 rsp->s_version.version = vf_version; in octep_pfvf_validate_version()
44 rsp->s_version.version = OCTEP_PFVF_MBOX_VERSION_CURRENT; in octep_pfvf_validate_version()
46 oct->vf_info[vf_id].mbox_version = rsp->s_version.version; in octep_pfvf_validate_version()
47 dev_dbg(&oct->pdev->dev, "VF id:%d negotiated VF version:%d\n", in octep_pfvf_validate_version()
48 vf_id, oct->vf_info[vf_id].mbox_version); in octep_pfvf_validate_version()
50 rsp->s_version.type = OCTEP_PFVF_MBOX_TYPE_RSP_ACK; in octep_pfvf_validate_version()
61 rsp->s_link_status.type = OCTEP_PFVF_MBOX_TYPE_RSP_NACK; in octep_pfvf_get_link_status()
62 dev_err(&oct->pdev->dev, "Get VF link status failed via host control Mbox\n"); in octep_pfvf_get_link_status()
[all …]
/linux-6.8/drivers/crypto/marvell/octeontx2/
Dotx2_cpt_mbox_common.c1 // SPDX-License-Identifier: GPL-2.0-only
7 int otx2_cpt_send_mbox_msg(struct otx2_mbox *mbox, struct pci_dev *pdev) in otx2_cpt_send_mbox_msg() argument
11 otx2_mbox_msg_send(mbox, 0); in otx2_cpt_send_mbox_msg()
12 ret = otx2_mbox_wait_for_rsp(mbox, 0); in otx2_cpt_send_mbox_msg()
13 if (ret == -EIO) { in otx2_cpt_send_mbox_msg()
14 dev_err(&pdev->dev, "RVU MBOX timeout.\n"); in otx2_cpt_send_mbox_msg()
17 dev_err(&pdev->dev, "RVU MBOX error: %d.\n", ret); in otx2_cpt_send_mbox_msg()
18 return -EFAULT; in otx2_cpt_send_mbox_msg()
24 int otx2_cpt_send_ready_msg(struct otx2_mbox *mbox, struct pci_dev *pdev) in otx2_cpt_send_ready_msg() argument
28 req = otx2_mbox_alloc_msg_rsp(mbox, 0, sizeof(*req), in otx2_cpt_send_ready_msg()
[all …]
/linux-6.8/drivers/net/ethernet/marvell/octeontx2/nic/
Dotx2_dmac_flt.c1 // SPDX-License-Identifier: GPL-2.0
17 mutex_lock(&pf->mbox.lock); in otx2_dmacflt_do_add()
19 req = otx2_mbox_alloc_msg_cgx_mac_addr_add(&pf->mbox); in otx2_dmacflt_do_add()
21 mutex_unlock(&pf->mbox.lock); in otx2_dmacflt_do_add()
22 return -ENOMEM; in otx2_dmacflt_do_add()
25 ether_addr_copy(req->mac_addr, mac); in otx2_dmacflt_do_add()
26 err = otx2_sync_mbox_msg(&pf->mbox); in otx2_dmacflt_do_add()
30 otx2_mbox_get_rsp(&pf->mbox.mbox, 0, &req->hdr); in otx2_dmacflt_do_add()
31 *dmac_index = rsp->index; in otx2_dmacflt_do_add()
34 mutex_unlock(&pf->mbox.lock); in otx2_dmacflt_do_add()
[all …]
Dotx2_vf.c1 // SPDX-License-Identifier: GPL-2.0
40 if (msg->id >= MBOX_MSG_MAX) { in otx2vf_process_vfaf_mbox_msg()
41 dev_err(vf->dev, in otx2vf_process_vfaf_mbox_msg()
42 "Mbox msg with unknown ID %d\n", msg->id); in otx2vf_process_vfaf_mbox_msg()
46 if (msg->sig != OTX2_MBOX_RSP_SIG) { in otx2vf_process_vfaf_mbox_msg()
47 dev_err(vf->dev, in otx2vf_process_vfaf_mbox_msg()
48 "Mbox msg with wrong signature %x, ID %d\n", in otx2vf_process_vfaf_mbox_msg()
49 msg->sig, msg->id); in otx2vf_process_vfaf_mbox_msg()
53 if (msg->rc == MBOX_MSG_INVALID) { in otx2vf_process_vfaf_mbox_msg()
54 dev_err(vf->dev, in otx2vf_process_vfaf_mbox_msg()
[all …]
Dotx2_ptp.c1 // SPDX-License-Identifier: GPL-2.0
19 if (!ptp->nic) in is_tstmp_atomic_update_supported()
22 mutex_lock(&ptp->nic->mbox.lock); in is_tstmp_atomic_update_supported()
23 req = otx2_mbox_alloc_msg_ptp_get_cap(&ptp->nic->mbox); in is_tstmp_atomic_update_supported()
25 mutex_unlock(&ptp->nic->mbox.lock); in is_tstmp_atomic_update_supported()
29 err = otx2_sync_mbox_msg(&ptp->nic->mbox); in is_tstmp_atomic_update_supported()
31 mutex_unlock(&ptp->nic->mbox.lock); in is_tstmp_atomic_update_supported()
34 rsp = (struct ptp_get_cap_rsp *)otx2_mbox_get_rsp(&ptp->nic->mbox.mbox, 0, in is_tstmp_atomic_update_supported()
35 &req->hdr); in is_tstmp_atomic_update_supported()
36 mutex_unlock(&ptp->nic->mbox.lock); in is_tstmp_atomic_update_supported()
[all …]
Dotx2_pf.c1 // SPDX-License-Identifier: GPL-2.0
60 if (pf->xdp_prog && new_mtu > MAX_XDP_MTU) { in otx2_change_mtu()
62 netdev->mtu); in otx2_change_mtu()
63 return -EINVAL; in otx2_change_mtu()
69 netdev->mtu, new_mtu); in otx2_change_mtu()
70 netdev->mtu = new_mtu; in otx2_change_mtu()
80 int irq, vfs = pf->total_vfs; in otx2_disable_flr_me_intr()
84 irq = pci_irq_vector(pf->pdev, RVU_PF_INT_VEC_VFME0); in otx2_disable_flr_me_intr()
89 irq = pci_irq_vector(pf->pdev, RVU_PF_INT_VEC_VFFLR0); in otx2_disable_flr_me_intr()
95 otx2_write64(pf, RVU_PF_VFME_INT_ENA_W1CX(1), INTR_MASK(vfs - 64)); in otx2_disable_flr_me_intr()
[all …]
/linux-6.8/Documentation/devicetree/bindings/mailbox/
Dti,omap-mailbox.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/mailbox/ti,omap-mailbox.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Suman Anna <s-anna@ti.com>
35 lines can also be routed to different processor sub-systems on DRA7xx as they
49 within a SoC. The sub-mailboxes (actual communication channels) are
56 "mbox-names" (please see Documentation/devicetree/bindings/mailbox/mailbox.txt
59 phandle to the intended sub-mailbox child node to be used for communication.
60 The equivalent "mbox-names" property value can be used to give a name to the
[all …]
/linux-6.8/drivers/net/wireless/ti/wl18xx/
Devent.c1 // SPDX-License-Identifier: GPL-2.0-only
67 skb = cfg80211_vendor_event_alloc(wl->hw->wiphy, NULL, 20, in wlcore_smart_config_sync_event()
73 return -EMSGSIZE; in wlcore_smart_config_sync_event()
88 skb = cfg80211_vendor_event_alloc(wl->hw->wiphy, NULL, in wlcore_smart_config_decode_event()
96 return -EMSGSIZE; in wlcore_smart_config_decode_event()
118 struct wl18xx_event_mailbox *mbox = wl->mbox; in wl18xx_process_mailbox_events() local
121 vector = le32_to_cpu(mbox->events_vector); in wl18xx_process_mailbox_events()
122 wl1271_debug(DEBUG_EVENT, "MBOX vector: 0x%x", vector); in wl18xx_process_mailbox_events()
126 mbox->number_of_scan_results); in wl18xx_process_mailbox_events()
128 if (wl->scan_wlvif) in wl18xx_process_mailbox_events()
[all …]
/linux-6.8/drivers/net/wireless/ti/wl1251/
Devent.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (c) 1998-2007 Texas Instruments Incorporated
16 struct event_mailbox *mbox) in wl1251_event_scan_complete() argument
21 mbox->scheduled_scan_status, in wl1251_event_scan_complete()
22 mbox->scheduled_scan_channels); in wl1251_event_scan_complete()
24 if (wl->scanning) { in wl1251_event_scan_complete()
29 ieee80211_scan_completed(wl->hw, &info); in wl1251_event_scan_complete()
31 wl->scanning = false; in wl1251_event_scan_complete()
32 if (wl->hw->conf.flags & IEEE80211_CONF_IDLE) in wl1251_event_scan_complete()
41 struct event_mailbox *mbox) in wl1251_event_ps_report() argument
[all …]
/linux-6.8/drivers/gpu/drm/i915/
Dintel_pcode.c1 // SPDX-License-Identifier: MIT
3 * Copyright © 2013-2021 Intel Corporation
10 static int gen6_check_mailbox_status(u32 mbox) in gen6_check_mailbox_status() argument
12 switch (mbox & GEN6_PCODE_ERROR_MASK) { in gen6_check_mailbox_status()
16 return -ENODEV; in gen6_check_mailbox_status()
18 return -ENXIO; in gen6_check_mailbox_status()
21 return -EOVERFLOW; in gen6_check_mailbox_status()
23 return -ETIMEDOUT; in gen6_check_mailbox_status()
25 MISSING_CASE(mbox & GEN6_PCODE_ERROR_MASK); in gen6_check_mailbox_status()
30 static int gen7_check_mailbox_status(u32 mbox) in gen7_check_mailbox_status() argument
[all …]

12345678910>>...24