]> git.sur5r.net Git - u-boot/commitdiff
mpc83xx: serdes: add forgotten shifts for rfcks
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Thu, 2 Oct 2008 14:31:56 +0000 (18:31 +0400)
committerKim Phillips <kim.phillips@freescale.com>
Tue, 21 Oct 2008 23:34:01 +0000 (18:34 -0500)
The rfcks should be shifted by 28 bits left. We didn't notice the bug
because we were using only 100MHz clocks (for which rfcks == 0).

Though, for SGMII we'll need 125MHz clocks.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
cpu/mpc83xx/serdes.c
include/asm-ppc/fsl_serdes.h

index 630b111aab31ddb7ec5923eb8379b7f09587560a..3936796548202f4a9af0cedb9539fa4bedb4b5e7 100644 (file)
@@ -42,7 +42,7 @@
 #define FSL_SRDSRSTCTL_RST             0x80000000
 #define FSL_SRDSRSTCTL_SATA_RESET      0xf
 
-void fsl_setup_serdes(u32 offset, char proto, char rfcks, char vdd)
+void fsl_setup_serdes(u32 offset, char proto, u32 rfcks, char vdd)
 {
        void *regs = (void *)CONFIG_SYS_IMMR + offset;
        u32 tmp;
index 733f919cf88a6cbf87f855753e81b65759342b53..6da4b6ff942ddf7167f08b9dce70829bcaac8910 100644 (file)
@@ -3,9 +3,9 @@
 
 #include <config.h>
 
-#define FSL_SERDES_CLK_100             0
-#define FSL_SERDES_CLK_125             1
-#define FSL_SERDES_CLK_150             3
+#define FSL_SERDES_CLK_100             (0 << 28)
+#define FSL_SERDES_CLK_125             (1 << 28)
+#define FSL_SERDES_CLK_150             (3 << 28)
 #define FSL_SERDES_PROTO_SATA          0
 #define FSL_SERDES_PROTO_PEX           1
 #define FSL_SERDES_PROTO_PEX_X2                2
@@ -13,9 +13,9 @@
 #define FSL_SERDES_VDD_1V              1
 
 #ifdef CONFIG_FSL_SERDES
-extern void fsl_setup_serdes(u32 offset, char proto, char rfcks, char vdd);
+extern void fsl_setup_serdes(u32 offset, char proto, u32 rfcks, char vdd);
 #else
-static void fsl_setup_serdes(u32 offset, char proto, char rfcks, char vdd) {}
+static void fsl_setup_serdes(u32 offset, char proto, u32 rfcks, char vdd) {}
 #endif /* CONFIG_FSL_SERDES */
 
 #endif /* __FSL_SERDES_H */