You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/target/linux/layerscape/patches-5.4/701-net-0319-staging-fsl_pp...

51 lines
1.6 KiB
Diff

From 3f64975a822c9144c7134d3cebadd4d8b88fead5 Mon Sep 17 00:00:00 2001
From: Calvin Johnson <calvin.johnson@nxp.com>
Date: Wed, 27 Mar 2019 19:31:35 +0530
Subject: [PATCH] staging: fsl_ppfe/eth: use generic soc_device infra instead
of fsl_guts_get_svr()
Commit ("soc: fsl: guts: make fsl_guts_get_svr() static") has
made fsl_guts_get_svr() static and hence use generic soc_device
infrastructure to check SoC revision.
Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com>
---
drivers/staging/fsl_ppfe/pfe_eth.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
--- a/drivers/staging/fsl_ppfe/pfe_eth.c
+++ b/drivers/staging/fsl_ppfe/pfe_eth.c
@@ -35,7 +35,7 @@
#include <linux/delay.h>
#include <linux/regmap.h>
#include <linux/i2c.h>
-#include <linux/fsl/guts.h>
+#include <linux/sys_soc.h>
#if defined(CONFIG_NF_CONNTRACK_MARK)
#include <net/netfilter/nf_conntrack.h>
@@ -104,6 +104,14 @@ unsigned int gemac_regs[] = {
0x01B0, /* Frame Truncation Length */
};
+const struct soc_device_attribute ls1012a_rev1_soc_attr[] = {
+ { .family = "QorIQ LS1012A",
+ .soc_id = "svr:0x87040010",
+ .revision = "1.0",
+ .data = NULL },
+ { },
+};
+
/********************************************************************/
/* SYSFS INTERFACE */
/********************************************************************/
@@ -2497,7 +2505,7 @@ int pfe_eth_init(struct pfe *pfe)
}
}
- if (fsl_guts_get_svr() == LS1012A_REV_1_0)
+ if (soc_device_match(ls1012a_rev1_soc_attr))
pfe_errata_a010897 = true;
else
pfe_errata_a010897 = false;