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/7151-staging-fsl-mc-Fixed-bug-in-dprc_probe-error-path.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/7151-staging-fsl-mc-Fixed-bug-in-dprc_probe-error-path.patch')
-rw-r--r-- | target/linux/layerscape/patches-4.4/7151-staging-fsl-mc-Fixed-bug-in-dprc_probe-error-path.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/target/linux/layerscape/patches-4.4/7151-staging-fsl-mc-Fixed-bug-in-dprc_probe-error-path.patch b/target/linux/layerscape/patches-4.4/7151-staging-fsl-mc-Fixed-bug-in-dprc_probe-error-path.patch new file mode 100644 index 0000000000..3324048a06 --- /dev/null +++ b/target/linux/layerscape/patches-4.4/7151-staging-fsl-mc-Fixed-bug-in-dprc_probe-error-path.patch @@ -0,0 +1,72 @@ +From 22aa842ae501ea8724afd45fcb0d7b17a67cb950 Mon Sep 17 00:00:00 2001 +From: "J. German Rivera" <German.Rivera@freescale.com> +Date: Wed, 6 Jan 2016 16:03:27 -0600 +Subject: [PATCH 151/226] staging: fsl-mc: Fixed bug in dprc_probe() error + path + +Destroy mc_io in error path in dprc_probe() only if the mc_io was +created in this function. + +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 | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +--- a/drivers/staging/fsl-mc/bus/dprc-driver.c ++++ b/drivers/staging/fsl-mc/bus/dprc-driver.c +@@ -401,6 +401,7 @@ static int dprc_probe(struct fsl_mc_devi + 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 mc_io_created = false; + bool msi_domain_set = false; + + if (WARN_ON(strcmp(mc_dev->obj_desc.type, "dprc") != 0)) +@@ -413,6 +414,9 @@ static int dprc_probe(struct fsl_mc_devi + /* + * This is a child DPRC: + */ ++ if (WARN_ON(parent_dev->bus != &fsl_mc_bus_type)) ++ return -EINVAL; ++ + if (WARN_ON(mc_dev->obj_desc.region_count == 0)) + return -EINVAL; + +@@ -427,6 +431,9 @@ static int dprc_probe(struct fsl_mc_devi + &mc_dev->mc_io); + if (error < 0) + return error; ++ ++ mc_io_created = true; ++ + /* + * Inherit parent MSI domain: + */ +@@ -457,7 +464,7 @@ static int dprc_probe(struct fsl_mc_devi + &mc_dev->mc_handle); + if (error < 0) { + dev_err(&mc_dev->dev, "dprc_open() failed: %d\n", error); +- goto error_cleanup_mc_io; ++ goto error_cleanup_msi_domain; + } + + mutex_init(&mc_bus->scan_mutex); +@@ -475,11 +482,15 @@ static int dprc_probe(struct fsl_mc_devi + error_cleanup_open: + (void)dprc_close(mc_dev->mc_io, 0, mc_dev->mc_handle); + +-error_cleanup_mc_io: ++error_cleanup_msi_domain: + if (msi_domain_set) + dev_set_msi_domain(&mc_dev->dev, NULL); + +- fsl_destroy_mc_io(mc_dev->mc_io); ++ if (mc_io_created) { ++ fsl_destroy_mc_io(mc_dev->mc_io); ++ mc_dev->mc_io = NULL; ++ } ++ + return error; + } + |