summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/fsl_serdes.h
diff options
context:
space:
mode:
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>2016-08-02 14:03:22 +0300
committerYork Sun <york.sun@nxp.com>2016-09-15 00:06:49 +0300
commit71fe22256cc9eb5decdd98842ec030ba921cd321 (patch)
tree8b1aa6d21838bf6391d1e7ef1e54a3822fc154ca /arch/powerpc/include/asm/fsl_serdes.h
parent07806e622963902efa57959a447c1dd6419e126b (diff)
downloadu-boot-71fe22256cc9eb5decdd98842ec030ba921cd321.tar.xz
fsl: serdes: ensure accessing the initialized maps of serdes protocol
Up to now, the function is_serdes_configed() doesn't check if the map of serdes protocol is initialized before accessing it. The function is_serdes_configed() will get wrong result when it was called before the serdes protocol maps initialized. As the first element of the map isn't used for any device, so use it as the flag to indicate if the map has been initialized. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'arch/powerpc/include/asm/fsl_serdes.h')
-rw-r--r--arch/powerpc/include/asm/fsl_serdes.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/fsl_serdes.h b/arch/powerpc/include/asm/fsl_serdes.h
index 45e248eba1..cb259cce01 100644
--- a/arch/powerpc/include/asm/fsl_serdes.h
+++ b/arch/powerpc/include/asm/fsl_serdes.h
@@ -10,6 +10,10 @@
#include <config.h>
enum srds_prtcl {
+ /*
+ * Nobody will check whether the device 'NONE' has been configured,
+ * So use it to indicate if the serdes_prtcl_map has been initialized.
+ */
NONE = 0,
PCIE1,
PCIE2,