summaryrefslogtreecommitdiffstats
path: root/drivers/staging/fsl-mc
diff options
context:
space:
mode:
authorJ. German Rivera2016-01-06 23:03:29 +0100
committerGreg Kroah-Hartman2016-02-08 04:10:12 +0100
commit660a24bf60821ce9f5799b0772a0a82c922c72c1 (patch)
tree810e01bd51826e78f1518f98461710e0b1d8620d /drivers/staging/fsl-mc
parentstaging: fsl-mc: Added DPRC interrupt handler (diff)
downloadkernel-qcow2-linux-660a24bf60821ce9f5799b0772a0a82c922c72c1.tar.gz
kernel-qcow2-linux-660a24bf60821ce9f5799b0772a0a82c922c72c1.tar.xz
kernel-qcow2-linux-660a24bf60821ce9f5799b0772a0a82c922c72c1.zip
staging: fsl-mc: Added MSI support to the MC bus driver
Initialize/Cleanup ITS-MSI support for the MC bus driver at driver init/exit time. Associate an MSI domain with each DPAA2 child device. Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fsl-mc')
-rw-r--r--drivers/staging/fsl-mc/bus/mc-bus.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c
index d34f1af39746..9317561973b1 100644
--- a/drivers/staging/fsl-mc/bus/mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/mc-bus.c
@@ -16,6 +16,8 @@
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/limits.h>
+#include <linux/bitops.h>
+#include <linux/msi.h>
#include "../include/dpmng.h"
#include "../include/mc-sys.h"
#include "dprc-cmd.h"
@@ -472,6 +474,8 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc,
mc_dev->icid = parent_mc_dev->icid;
mc_dev->dma_mask = FSL_MC_DEFAULT_DMA_MASK;
mc_dev->dev.dma_mask = &mc_dev->dma_mask;
+ dev_set_msi_domain(&mc_dev->dev,
+ dev_get_msi_domain(&parent_mc_dev->dev));
}
/*
@@ -833,8 +837,15 @@ static int __init fsl_mc_bus_driver_init(void)
if (error < 0)
goto error_cleanup_dprc_driver;
+ error = its_fsl_mc_msi_init();
+ if (error < 0)
+ goto error_cleanup_mc_allocator;
+
return 0;
+error_cleanup_mc_allocator:
+ fsl_mc_allocator_driver_exit();
+
error_cleanup_dprc_driver:
dprc_driver_exit();
@@ -856,6 +867,7 @@ static void __exit fsl_mc_bus_driver_exit(void)
if (WARN_ON(!mc_dev_cache))
return;
+ its_fsl_mc_msi_cleanup();
fsl_mc_allocator_driver_exit();
dprc_driver_exit();
platform_driver_unregister(&fsl_mc_bus_driver);