Home
last modified time | relevance | path

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

12345678910>>...22

/Linux-v6.1/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-v6.1/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
56 * - direction: tx or rx
57 * - dst irq: peer core's irq number
58 * - ack irq: local irq number
59 * - slot number
89 static void mbox_set_state(struct hi6220_mbox *mbox, in mbox_set_state() argument
94 status = readl(mbox->base + MBOX_MODE_REG(slot)); in mbox_set_state()
96 writel(status, mbox->base + MBOX_MODE_REG(slot)); in mbox_set_state()
99 static void mbox_set_mode(struct hi6220_mbox *mbox, in mbox_set_mode() argument
104 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
73 static bool mpfs_mbox_busy(struct mpfs_mbox *mbox) in mpfs_mbox_busy() argument
77 status = readl_relaxed(mbox->ctrl_base + SERVICES_SR_OFFSET); in mpfs_mbox_busy()
84 struct mpfs_mbox *mbox = (struct mpfs_mbox *)chan->con_priv; in mpfs_mbox_send_data() local
90 mbox->response = msg->response; in mpfs_mbox_send_data()
91 mbox->resp_offset = msg->resp_offset; in mpfs_mbox_send_data()
93 if (mpfs_mbox_busy(mbox)) in mpfs_mbox_send_data()
94 return -EBUSY; in mpfs_mbox_send_data()
96 if (msg->cmd_data_size) { in mpfs_mbox_send_data()
98 u8 extra_bits = msg->cmd_data_size & 3; in mpfs_mbox_send_data()
[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.
24 #define MBOX_BASE(mbox, ch) ((mbox)->base + ((ch) * 0x40)) argument
47 * struct hi3660_chan_info - Hi3660 mailbox channel information
61 * struct hi3660_mbox - Hi3660 mailbox controller data
79 static struct hi3660_mbox *to_hi3660_mbox(struct mbox_controller *mbox) in to_hi3660_mbox() argument
81 return container_of(mbox, struct hi3660_mbox, controller); in to_hi3660_mbox()
86 unsigned long ch = (unsigned long)chan->con_priv; in hi3660_mbox_check_state()
87 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.
31 spin_lock_irqsave(&chan->lock, flags); in add_to_rbuf()
34 if (chan->msg_count == MBOX_TX_QUEUE_LEN) { in add_to_rbuf()
35 spin_unlock_irqrestore(&chan->lock, flags); in add_to_rbuf()
36 return -ENOBUFS; in add_to_rbuf()
39 idx = chan->msg_free; in add_to_rbuf()
40 chan->msg_data[idx] = mssg; in add_to_rbuf()
41 chan->msg_count++; in add_to_rbuf()
43 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>
18 struct mbox_controller mbox; member
30 static inline struct mtk_adsp_mbox_priv *get_mtk_adsp_mbox_priv(struct mbox_controller *mbox) in get_mtk_adsp_mbox_priv() argument
32 return container_of(mbox, struct mtk_adsp_mbox_priv, mbox); in get_mtk_adsp_mbox_priv()
38 struct mtk_adsp_mbox_priv *priv = get_mtk_adsp_mbox_priv(chan->mbox); in mtk_adsp_mbox_irq()
39 u32 op = readl(priv->va_mboxreg + priv->cfg->set_out); in mtk_adsp_mbox_irq()
41 writel(op, priv->va_mboxreg + priv->cfg->clr_out); in mtk_adsp_mbox_irq()
55 static struct mbox_chan *mtk_adsp_mbox_xlate(struct mbox_controller *mbox, in mtk_adsp_mbox_xlate() argument
58 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.
29 #define MHU_CHANS 3 /* Secure, Non-Secure High and Low Priority */
42 struct mbox_controller mbox; member
47 * struct mhu_db_channel - ARM MHU Mailbox allocated channel information
60 mhu_db_mbox_to_channel(struct mbox_controller *mbox, unsigned int pchan, in mhu_db_mbox_to_channel() argument
66 for (i = 0; i < mbox->num_chans; i++) { in mhu_db_mbox_to_channel()
67 chan_info = mbox->chans[i].con_priv; in mhu_db_mbox_to_channel()
68 if (chan_info && chan_info->pchan == pchan && in mhu_db_mbox_to_channel()
69 chan_info->doorbell == doorbell) in mhu_db_mbox_to_channel()
[all …]
Dmailbox-sti.c1 // SPDX-License-Identifier: GPL-2.0-or-later
36 #define MBOX_BASE(mdev, inst) ((mdev)->base + ((inst) * 4))
39 * struct sti_mbox_device - STi Mailbox device data
42 * @mbox: Representation of a communication channel controller
55 struct mbox_controller *mbox; member
63 * struct sti_mbox_pdata - STi Mailbox platform specific configuration
74 * struct sti_channel - STi Mailbox allocated channel information
88 struct sti_channel *chan_info = chan->con_priv; in sti_mbox_channel_is_enabled()
89 struct sti_mbox_device *mdev = chan_info->mdev; in sti_mbox_channel_is_enabled()
90 unsigned int instance = chan_info->instance; in sti_mbox_channel_is_enabled()
[all …]
/Linux-v6.1/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-v6.1/drivers/net/ethernet/marvell/octeon_ep/
Doctep_ctrl_mbox.c1 // SPDX-License-Identifier: GPL-2.0
56 return mask - ((pi - ci) & mask); in octep_ctrl_mbox_circq_space()
61 return ((pi - ci) & mask); in octep_ctrl_mbox_circq_depth()
64 int octep_ctrl_mbox_init(struct octep_ctrl_mbox *mbox) in octep_ctrl_mbox_init() argument
68 if (!mbox) in octep_ctrl_mbox_init()
69 return -EINVAL; in octep_ctrl_mbox_init()
71 if (!mbox->barmem) { in octep_ctrl_mbox_init()
72 pr_info("octep_ctrl_mbox : Invalid barmem %p\n", mbox->barmem); in octep_ctrl_mbox_init()
73 return -EINVAL; in octep_ctrl_mbox_init()
76 magic_num = readq(OCTEP_CTRL_MBOX_INFO_MAGIC_NUM_OFFSET(mbox->barmem)); in octep_ctrl_mbox_init()
[all …]
/Linux-v6.1/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()
23 int otx2_cpt_send_ready_msg(struct otx2_mbox *mbox, struct pci_dev *pdev) in otx2_cpt_send_ready_msg() argument
27 req = otx2_mbox_alloc_msg_rsp(mbox, 0, sizeof(*req), in otx2_cpt_send_ready_msg()
[all …]
/Linux-v6.1/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 …]
Dcn10k_macsec.c1 // SPDX-License-Identifier: GPL-2.0
50 list_for_each_entry(txsc, &cfg->txsc_list, entry) { in cn10k_mcs_get_txsc()
51 if (txsc->sw_secy == secy) in cn10k_mcs_get_txsc()
64 list_for_each_entry(rxsc, &cfg->rxsc_list, entry) { in cn10k_mcs_get_rxsc()
65 if (rxsc->sw_rxsc == rx_sc && rxsc->sw_secy == secy) in cn10k_mcs_get_rxsc()
93 struct mbox *mbox = &pfvf->mbox; in cn10k_mcs_alloc_rsrc() local
96 int ret = -ENOMEM; in cn10k_mcs_alloc_rsrc()
98 mutex_lock(&mbox->lock); in cn10k_mcs_alloc_rsrc()
100 req = otx2_mbox_alloc_msg_mcs_alloc_resources(mbox); in cn10k_mcs_alloc_rsrc()
104 req->rsrc_type = type; in cn10k_mcs_alloc_rsrc()
[all …]
Dotx2_pf.c1 // SPDX-License-Identifier: GPL-2.0
58 if (pf->xdp_prog && new_mtu > MAX_XDP_MTU) { in otx2_change_mtu()
60 netdev->mtu); in otx2_change_mtu()
61 return -EINVAL; in otx2_change_mtu()
67 netdev->mtu, new_mtu); in otx2_change_mtu()
68 netdev->mtu = new_mtu; in otx2_change_mtu()
78 int irq, vfs = pf->total_vfs; in otx2_disable_flr_me_intr()
82 irq = pci_irq_vector(pf->pdev, RVU_PF_INT_VEC_VFME0); in otx2_disable_flr_me_intr()
87 irq = pci_irq_vector(pf->pdev, RVU_PF_INT_VEC_VFFLR0); in otx2_disable_flr_me_intr()
93 otx2_write64(pf, RVU_PF_VFME_INT_ENA_W1CX(1), INTR_MASK(vfs - 64)); in otx2_disable_flr_me_intr()
[all …]
/Linux-v6.1/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-v6.1/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 …]
/Linux-v6.1/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-v6.1/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-v6.1/drivers/net/ethernet/mellanox/mlxsw/
Dpci.c1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
2 /* Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved */
26 iowrite32be(val, (mlxsw_pci)->hw_addr + (MLXSW_PCI_ ## reg))
28 ioread32be((mlxsw_pci)->hw_addr + (MLXSW_PCI_ ## reg))
135 tasklet_schedule(&q->tasklet); in mlxsw_pci_queue_tasklet_schedule()
141 return q->mem_item.buf + (elem_size * elem_index); in __mlxsw_pci_queue_elem_get()
147 return &q->elem_info[elem_index]; in mlxsw_pci_queue_elem_info_get()
153 int index = q->producer_counter & (q->count - 1); in mlxsw_pci_queue_elem_info_producer_get()
155 if ((u16) (q->producer_counter - q->consumer_counter) == q->count) in mlxsw_pci_queue_elem_info_producer_get()
163 int index = q->consumer_counter & (q->count - 1); in mlxsw_pci_queue_elem_info_consumer_get()
[all …]

12345678910>>...22