Home
last modified time | relevance | path

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

12345678910>>...40

/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-5.10/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-2019 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 …]
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
81 static struct hi3660_mbox *to_hi3660_mbox(struct mbox_controller *mbox) in to_hi3660_mbox() argument
83 return container_of(mbox, struct hi3660_mbox, controller); in to_hi3660_mbox()
88 unsigned long ch = (unsigned long)chan->con_priv; in hi3660_mbox_check_state()
89 struct hi3660_mbox *mbox = to_hi3660_mbox(chan->mbox); in hi3660_mbox_check_state() local
90 struct hi3660_chan_info *mchan = &mbox->mchan[ch]; in hi3660_mbox_check_state()
91 void __iomem *base = MBOX_BASE(mbox, ch); in hi3660_mbox_check_state()
[all …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-5.10/drivers/net/ethernet/marvell/octeontx2/af/
Dmbox.c1 // SPDX-License-Identifier: GPL-2.0
16 #include "mbox.h"
21 void __otx2_mbox_reset(struct otx2_mbox *mbox, int devid) in __otx2_mbox_reset() argument
23 void *hw_mbase = mbox->hwbase + (devid * MBOX_SIZE); in __otx2_mbox_reset()
24 struct otx2_mbox_dev *mdev = &mbox->dev[devid]; in __otx2_mbox_reset()
27 tx_hdr = hw_mbase + mbox->tx_start; in __otx2_mbox_reset()
28 rx_hdr = hw_mbase + mbox->rx_start; in __otx2_mbox_reset()
30 mdev->msg_size = 0; in __otx2_mbox_reset()
31 mdev->rsp_size = 0; in __otx2_mbox_reset()
32 tx_hdr->num_msgs = 0; in __otx2_mbox_reset()
[all …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-6.6/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 …]
/kernel/linux/linux-5.10/drivers/net/ethernet/marvell/octeontx2/nic/
Dotx2_common.h1 /* SPDX-License-Identifier: GPL-2.0 */
20 #include <mbox.h>
143 struct mbox { struct
144 struct otx2_mbox mbox; member
149 void *bbuf_base; /* Bounce buffer for mbox memory */ argument
151 int num_msgs; /* mbox number of messages */ argument
188 /* MSI-X */
248 /* Mbox */
249 struct mbox mbox; member
250 struct mbox *mbox_pfvf;
[all …]
Dotx2_vf.c1 // SPDX-License-Identifier: GPL-2.0
11 #define DRV_NAME "octeontx2-nicvf"
33 if (msg->id >= MBOX_MSG_MAX) { in otx2vf_process_vfaf_mbox_msg()
34 dev_err(vf->dev, in otx2vf_process_vfaf_mbox_msg()
35 "Mbox msg with unknown ID %d\n", msg->id); in otx2vf_process_vfaf_mbox_msg()
39 if (msg->sig != OTX2_MBOX_RSP_SIG) { in otx2vf_process_vfaf_mbox_msg()
40 dev_err(vf->dev, in otx2vf_process_vfaf_mbox_msg()
41 "Mbox msg with wrong signature %x, ID %d\n", in otx2vf_process_vfaf_mbox_msg()
42 msg->sig, msg->id); in otx2vf_process_vfaf_mbox_msg()
46 if (msg->rc == MBOX_MSG_INVALID) { in otx2vf_process_vfaf_mbox_msg()
[all …]

12345678910>>...40