Commit 77331719 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull mailbox updates from Jassi Brar:

 - qcom: fix incorrect num_chans counting

 - mhu: Remove redundant dev_err

 - bcm: fix comments

 - common changes:
    - convert to use devm_platform_get_and_ioremap_resource
    - correct DT includes

* tag 'mailbox-v6.6' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
  mailbox: qcom-ipcc: fix incorrect num_chans counting
  mailbox: Explicitly include correct DT includes
  mailbox: ti-msgmgr: Use devm_platform_ioremap_resource_byname()
  mailbox: platform-mhu: Remove redundant dev_err()
  mailbox: bcm-pdc: Fix some kernel-doc comments
  mailbox: mailbox-test: Fix an error check in mbox_test_probe()
  mailbox: tegra-hsp: Convert to devm_platform_ioremap_resource()
  mailbox: rockchip: Use devm_platform_get_and_ioremap_resource()
  mailbox: mailbox-test: Use devm_platform_get_and_ioremap_resource()
  mailbox: bcm-pdc: Use devm_platform_get_and_ioremap_resource()
  mailbox: bcm-ferxrm-mailbox: Use devm_platform_get_and_ioremap_resource()
parents 3c5c9b7c a4932080
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
#include <linux/io.h>
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/of.h>

#define INTR_STAT_OFS	0x0
#define INTR_SET_OFS	0x8
+0 −1
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>

#define INTR_STAT_OFS	0x0
#define INTR_SET_OFS	0x8
+3 −7
Original line number Diff line number Diff line
@@ -1501,16 +1501,12 @@ static int flexrm_mbox_probe(struct platform_device *pdev)
	mbox->dev = dev;
	platform_set_drvdata(pdev, mbox);

	/* Get resource for registers */
	iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	/* Get resource for registers and map registers of all rings */
	mbox->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &iomem);
	if (!iomem || (resource_size(iomem) < RING_REGS_SIZE)) {
		ret = -ENODEV;
		goto fail;
	}

	/* Map registers of all rings */
	mbox->regs = devm_ioremap_resource(&pdev->dev, iomem);
	if (IS_ERR(mbox->regs)) {
	} else if (IS_ERR(mbox->regs)) {
		ret = PTR_ERR(mbox->regs);
		goto fail;
	}
+6 −12
Original line number Diff line number Diff line
@@ -694,7 +694,7 @@ pdc_receive(struct pdc_state *pdcs)
 * pdc_tx_list_sg_add() - Add the buffers in a scatterlist to the transmit
 * descriptors for a given SPU. The scatterlist buffers contain the data for a
 * SPU request message.
 * @spu_idx:   The index of the SPU to submit the request to, [0, max_spu)
 * @pdcs:      PDC state for the SPU that will process this request
 * @sg:        Scatterlist whose buffers contain part of the SPU request
 *
 * If a scatterlist buffer is larger than PDC_DMA_BUF_MAX, multiple descriptors
@@ -861,7 +861,7 @@ static int pdc_rx_list_init(struct pdc_state *pdcs, struct scatterlist *dst_sg,
 * pdc_rx_list_sg_add() - Add the buffers in a scatterlist to the receive
 * descriptors for a given SPU. The caller must have already DMA mapped the
 * scatterlist.
 * @spu_idx:    Indicates which SPU the buffers are for
 * @pdcs:       PDC state for the SPU that will process this request
 * @sg:         Scatterlist whose buffers are added to the receive ring
 *
 * If a receive buffer in the scatterlist is larger than PDC_DMA_BUF_MAX,
@@ -960,7 +960,7 @@ static irqreturn_t pdc_irq_handler(int irq, void *data)
/**
 * pdc_tasklet_cb() - Tasklet callback that runs the deferred processing after
 * a DMA receive interrupt. Reenables the receive interrupt.
 * @data: PDC state structure
 * @t: Pointer to the Altera sSGDMA channel structure
 */
static void pdc_tasklet_cb(struct tasklet_struct *t)
{
@@ -1566,19 +1566,13 @@ static int pdc_probe(struct platform_device *pdev)
	if (err)
		goto cleanup_ring_pool;

	pdc_regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (!pdc_regs) {
		err = -ENODEV;
		goto cleanup_ring_pool;
	}
	dev_dbg(dev, "PDC register region res.start = %pa, res.end = %pa",
		&pdc_regs->start, &pdc_regs->end);

	pdcs->pdc_reg_vbase = devm_ioremap_resource(&pdev->dev, pdc_regs);
	pdcs->pdc_reg_vbase = devm_platform_get_and_ioremap_resource(pdev, 0, &pdc_regs);
	if (IS_ERR(pdcs->pdc_reg_vbase)) {
		err = PTR_ERR(pdcs->pdc_reg_vbase);
		goto cleanup_ring_pool;
	}
	dev_dbg(dev, "PDC register region res.start = %pa, res.end = %pa",
		&pdc_regs->start, &pdc_regs->end);

	/* create rx buffer pool after dt read to know how big buffers are */
	err = pdc_rx_buf_pool_create(pdcs);
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/iopoll.h>
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

Loading