aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-5.4/701-net-0319-staging-fsl_ppfe-eth-use-generic-soc_device-infra-in.patch
blob: 11bd1fff78950ebc7320c384a306cc378dced9af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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;