From 3f64975a822c9144c7134d3cebadd4d8b88fead5 Mon Sep 17 00:00:00 2001 From: Calvin Johnson 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 --- 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 #include #include -#include +#include #if defined(CONFIG_NF_CONNTRACK_MARK) #include @@ -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;