diff options
author | Yutang Jiang <yutang.jiang@nxp.com> | 2016-12-24 01:11:32 +0800 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2017-01-03 15:19:15 +0100 |
commit | 1866368a8ab8cacf73aa47f67138040d5620439d (patch) | |
tree | 2b0dd1ba578016957856f59bf4b2edc54d6a46c5 /target/linux/layerscape/patches-4.4/7150-staging-fsl-mc-set-MSI-domain-for-DPRC-objects.patch | |
parent | c6d3a62919a7f993be625391d8593c84423aa021 (diff) | |
download | upstream-1866368a8ab8cacf73aa47f67138040d5620439d.tar.gz upstream-1866368a8ab8cacf73aa47f67138040d5620439d.tar.bz2 upstream-1866368a8ab8cacf73aa47f67138040d5620439d.zip |
layerscape: add ls1088ardb device support
LS1088A is an ARMv8 implementation combining eight ARM A53 processor
cores. The LS1088ARDB is an evaluatoin platform that supports the
LS1088A family SoCs.
Features summary:
- Eight 64-bit ARM v8 Cortex-A53 CPUs
- Data path acceleration architecture 2.0 (DPAA2)
- Ethernet interfaces
- QUADSPI flash, 3 PCIe, 2 USB, 1 SD, 2 DUARTs etc
Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
Diffstat (limited to 'target/linux/layerscape/patches-4.4/7150-staging-fsl-mc-set-MSI-domain-for-DPRC-objects.patch')
-rw-r--r-- | target/linux/layerscape/patches-4.4/7150-staging-fsl-mc-set-MSI-domain-for-DPRC-objects.patch | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/target/linux/layerscape/patches-4.4/7150-staging-fsl-mc-set-MSI-domain-for-DPRC-objects.patch b/target/linux/layerscape/patches-4.4/7150-staging-fsl-mc-set-MSI-domain-for-DPRC-objects.patch new file mode 100644 index 0000000000..0c69783ad9 --- /dev/null +++ b/target/linux/layerscape/patches-4.4/7150-staging-fsl-mc-set-MSI-domain-for-DPRC-objects.patch @@ -0,0 +1,103 @@ +From 15bfab2641c61fb50a876860e8909ab84d2b8701 Mon Sep 17 00:00:00 2001 +From: "J. German Rivera" <German.Rivera@freescale.com> +Date: Wed, 6 Jan 2016 16:03:26 -0600 +Subject: [PATCH 150/226] staging: fsl-mc: set MSI domain for DPRC objects + +THE MSI domain associated with a root DPRC object is +obtained form the device tree. Child DPRCs inherit +the parent DPRC MSI domain. + +Signed-off-by: J. German Rivera <German.Rivera@freescale.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + drivers/staging/fsl-mc/bus/dprc-driver.c | 39 ++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +--- a/drivers/staging/fsl-mc/bus/dprc-driver.c ++++ b/drivers/staging/fsl-mc/bus/dprc-driver.c +@@ -13,6 +13,7 @@ + #include "../include/mc-sys.h" + #include <linux/module.h> + #include <linux/slab.h> ++#include <linux/interrupt.h> + #include "dprc-cmd.h" + + struct dprc_child_objs { +@@ -398,11 +399,16 @@ static int dprc_probe(struct fsl_mc_devi + { + int error; + size_t region_size; ++ struct device *parent_dev = mc_dev->dev.parent; + struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_dev); ++ bool msi_domain_set = false; + + if (WARN_ON(strcmp(mc_dev->obj_desc.type, "dprc") != 0)) + return -EINVAL; + ++ if (WARN_ON(dev_get_msi_domain(&mc_dev->dev))) ++ return -EINVAL; ++ + if (!mc_dev->mc_io) { + /* + * This is a child DPRC: +@@ -421,6 +427,30 @@ static int dprc_probe(struct fsl_mc_devi + &mc_dev->mc_io); + if (error < 0) + return error; ++ /* ++ * Inherit parent MSI domain: ++ */ ++ dev_set_msi_domain(&mc_dev->dev, ++ dev_get_msi_domain(parent_dev)); ++ msi_domain_set = true; ++ } else { ++ /* ++ * This is a root DPRC ++ */ ++ struct irq_domain *mc_msi_domain; ++ ++ if (WARN_ON(parent_dev->bus == &fsl_mc_bus_type)) ++ return -EINVAL; ++ ++ error = fsl_mc_find_msi_domain(parent_dev, ++ &mc_msi_domain); ++ if (error < 0) { ++ dev_warn(&mc_dev->dev, ++ "WARNING: MC bus without interrupt support\n"); ++ } else { ++ dev_set_msi_domain(&mc_dev->dev, mc_msi_domain); ++ msi_domain_set = true; ++ } + } + + error = dprc_open(mc_dev->mc_io, 0, mc_dev->obj_desc.id, +@@ -446,6 +476,9 @@ error_cleanup_open: + (void)dprc_close(mc_dev->mc_io, 0, mc_dev->mc_handle); + + error_cleanup_mc_io: ++ if (msi_domain_set) ++ dev_set_msi_domain(&mc_dev->dev, NULL); ++ + fsl_destroy_mc_io(mc_dev->mc_io); + return error; + } +@@ -463,6 +496,7 @@ error_cleanup_mc_io: + static int dprc_remove(struct fsl_mc_device *mc_dev) + { + int error; ++ struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_dev); + + if (WARN_ON(strcmp(mc_dev->obj_desc.type, "dprc") != 0)) + return -EINVAL; +@@ -475,6 +509,11 @@ static int dprc_remove(struct fsl_mc_dev + if (error < 0) + dev_err(&mc_dev->dev, "dprc_close() failed: %d\n", error); + ++ if (dev_get_msi_domain(&mc_dev->dev)) { ++ fsl_mc_cleanup_irq_pool(mc_bus); ++ dev_set_msi_domain(&mc_dev->dev, NULL); ++ } ++ + dev_info(&mc_dev->dev, "DPRC device unbound from driver"); + return 0; + } |