LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Madalin Bucur <madalin.bucur@oss.nxp.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, robh+dt@kernel.org, mark.rutland@arm.com,
shawnguo@kernel.org, leoyang.li@nxp.com,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Madalin Bucur <madalin.bucur@nxp.com>
Subject: [PATCH net 3/4] fsl/fman: detect FMan erratum A050385
Date: Tue, 3 Mar 2020 17:55:38 +0200 [thread overview]
Message-ID: <1583250939-24645-4-git-send-email-madalin.bucur@oss.nxp.com> (raw)
In-Reply-To: <1583250939-24645-1-git-send-email-madalin.bucur@oss.nxp.com>
From: Madalin Bucur <madalin.bucur@nxp.com>
Detect the presence of the A050385 erratum.
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
---
drivers/net/ethernet/freescale/fman/fman.c | 18 ++++++++++++++++++
drivers/net/ethernet/freescale/fman/fman.h | 10 ++++++++++
2 files changed, 28 insertions(+)
diff --git a/drivers/net/ethernet/freescale/fman/fman.c b/drivers/net/ethernet/freescale/fman/fman.c
index 934111def0be..a673917b7411 100644
--- a/drivers/net/ethernet/freescale/fman/fman.c
+++ b/drivers/net/ethernet/freescale/fman/fman.c
@@ -1,5 +1,6 @@
/*
* Copyright 2008-2015 Freescale Semiconductor Inc.
+ * Copyright 2020 NXP
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -566,6 +567,10 @@ struct fman_cfg {
u32 qmi_def_tnums_thresh;
};
+#ifdef DPAA_FMAN_ERRATUM_A050385
+static bool fman_has_err_a050385;
+#endif
+
static irqreturn_t fman_exceptions(struct fman *fman,
enum fman_exceptions exception)
{
@@ -2518,6 +2523,14 @@ struct fman *fman_bind(struct device *fm_dev)
}
EXPORT_SYMBOL(fman_bind);
+#ifdef DPAA_FMAN_ERRATUM_A050385
+bool fman_has_errata_a050385(void)
+{
+ return fman_has_err_a050385;
+}
+EXPORT_SYMBOL(fman_has_errata_a050385);
+#endif
+
static irqreturn_t fman_err_irq(int irq, void *handle)
{
struct fman *fman = (struct fman *)handle;
@@ -2845,6 +2858,11 @@ static struct fman *read_dts_node(struct platform_device *of_dev)
goto fman_free;
}
+#ifdef DPAA_FMAN_ERRATUM_A050385
+ fman_has_err_a050385 =
+ of_property_read_bool(fm_node, "fsl,erratum-a050385");
+#endif
+
return fman;
fman_node_put:
diff --git a/drivers/net/ethernet/freescale/fman/fman.h b/drivers/net/ethernet/freescale/fman/fman.h
index 935c317fa696..7b14ef4c306d 100644
--- a/drivers/net/ethernet/freescale/fman/fman.h
+++ b/drivers/net/ethernet/freescale/fman/fman.h
@@ -1,5 +1,6 @@
/*
* Copyright 2008-2015 Freescale Semiconductor Inc.
+ * Copyright 2020 NXP
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -37,6 +38,11 @@
#include <linux/interrupt.h>
#include <linux/of_irq.h>
+#ifdef CONFIG_ARM64
+/* only some ARM64 platforms are affected */
+#define DPAA_FMAN_ERRATUM_A050385 1
+#endif
+
/* FM Frame descriptor macros */
/* Frame queue Context Override */
#define FM_FD_CMD_FCO 0x80000000
@@ -398,6 +404,10 @@ u16 fman_get_max_frm(void);
int fman_get_rx_extra_headroom(void);
+#ifdef DPAA_FMAN_ERRATUM_A050385
+bool fman_has_errata_a050385(void);
+#endif
+
struct fman *fman_bind(struct device *dev);
#endif /* __FM_H */
--
2.1.0
next prev parent reply other threads:[~2020-03-03 15:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 15:55 [PATCH net 0/4] QorIQ DPAA FMan erratum A050385 workaround Madalin Bucur
2020-03-03 15:55 ` [PATCH net 1/4] dt-bindings: net: FMan erratum A050385 Madalin Bucur
2020-03-03 15:55 ` [PATCH net 2/4] arm64: dts: ls1043a: " Madalin Bucur
2020-03-03 15:55 ` Madalin Bucur [this message]
2020-03-03 23:52 ` [PATCH net 3/4] fsl/fman: detect " David Miller
2020-03-03 15:55 ` [PATCH net 4/4] dpaa_eth: FMan erratum A050385 workaround Madalin Bucur
2020-03-03 23:54 ` David Miller
2020-03-04 15:51 ` Madalin Bucur (OSS)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1583250939-24645-4-git-send-email-madalin.bucur@oss.nxp.com \
--to=madalin.bucur@oss.nxp.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=leoyang.li@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=madalin.bucur@nxp.com \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
--subject='Re: [PATCH net 3/4] fsl/fman: detect FMan erratum A050385' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).