layerscape: make uImage with zImage for 32-bit kernel
[openwrt/openwrt.git] / target / linux / layerscape / patches-4.4 / 7213-staging-fsl-dpaa2-mac-Remove-version-checks.patch
1 From 3e4dc755337ca86d29c9f21f5225a77595aee032 Mon Sep 17 00:00:00 2001
2 From: Ioana Radulescu <ruxandra.radulescu@nxp.com>
3 Date: Wed, 6 Apr 2016 12:12:06 +0300
4 Subject: [PATCH 213/226] staging: fsl-dpaa2/mac: Remove version checks
5
6 We intend to ensure backward compatibility with all MC versions
7 going forward, so we don't require an exact version match anymore
8 between MAC driver, DPMAC API version and DPMAC object version in
9 MC firmware.
10
11 Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
12 (cherry picked from commit eafc210ef421fb0dca67b67bf1a2fe98cd060c31)
13 ---
14 drivers/staging/fsl-dpaa2/mac/mac.c | 29 ++---------------------------
15 1 file changed, 2 insertions(+), 27 deletions(-)
16
17 --- a/drivers/staging/fsl-dpaa2/mac/mac.c
18 +++ b/drivers/staging/fsl-dpaa2/mac/mac.c
19 @@ -481,30 +481,6 @@ static struct device_node *lookup_node(s
20 return NULL;
21 }
22
23 -static int check_dpmac_version(struct dpaa2_mac_priv *priv)
24 -{
25 - struct device *dev = &priv->mc_dev->dev;
26 - int mc_version = priv->attr.version.major;
27 -
28 - /* Check that the FLIB-defined version matches the one reported by MC */
29 - if (mc_version != DPMAC_VER_MAJOR) {
30 - dev_err(dev, "DPMAC FLIB version mismatch: MC says %d, we have %d\n",
31 - mc_version, DPMAC_VER_MAJOR);
32 - return -EINVAL;
33 - }
34 -
35 - /* ... and that we actually support it */
36 - if (mc_version < DPAA2_SUPPORTED_DPMAC_VERSION) {
37 - dev_err(dev, "Unsupported DPMAC FLIB version (%d)\n",
38 - mc_version);
39 - return -EINVAL;
40 - }
41 -
42 - dev_dbg(dev, "Using DPMAC FLIB version %d\n", mc_version);
43 -
44 - return 0;
45 -}
46 -
47 static int dpaa2_mac_probe(struct fsl_mc_device *mc_dev)
48 {
49 struct device *dev;
50 @@ -558,9 +534,8 @@ static int dpaa2_mac_probe(struct fsl_mc
51 goto err_close;
52 }
53
54 - err = check_dpmac_version(priv);
55 - if (err)
56 - goto err_close;
57 + dev_info_once(dev, "Using DPMAC API %d.%d\n",
58 + priv->attr.version.major, priv->attr.version.minor);
59
60 /* Look up the DPMAC node in the device-tree. */
61 dpmac_node = lookup_node(dev, priv->attr.id);