Skip to contentSkip to conversation

83xx: serdes setup routines

PATCH New Anton Vorontsov 4 participants 5 messages Mar 14, 2008 – Mar 20, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 3/7 83xx: serdes setup routines

This patch adds few routines to configure serdes on 837x targets.

---
 cpu/mpc83xx/Makefile         |    1 +
 cpu/mpc83xx/serdes.c         |  156 ++++++++++++++++++++++++++++++++++++++++++
 include/asm-ppc/fsl_serdes.h |   25 +++++++
 3 files changed, 182 insertions(+), 0 deletions(-)
 create mode 100644 cpu/mpc83xx/serdes.c
 create mode 100644 include/asm-ppc/fsl_serdes.h
cpu/mpc83xx/Makefile +1 -0
index 7ad7e3e..6b6b027 100644
@@ -39,6 +39,7 @@ COBJS-y += ecc.o
 COBJS-$(CONFIG_QE) += qe_io.o
 COBJS-$(CONFIG_83XX_GENERIC_PCI) += pci.o
 COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
+COBJS-$(CONFIG_FSL_SERDES) += serdes.o
 
 COBJS	:= $(COBJS-y)
 SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
cpu/mpc83xx/serdes.c new file +156 -0

156 lines not on this page · raw message

include/asm-ppc/fsl_serdes.h new file +25 -0
new file mode 100644
index 0000000..4c9a766
@@ -0,0 +1,25 @@
+#ifndef __FSL_SERDES_H
+#define __FSL_SERDES_H
+
+#include <config.h>
+
+#ifdef CONFIG_FSL_SERDES
+
+#define FSL_SERDES_CLK_100		0
+#define FSL_SERDES_CLK_125		1
+#define FSL_SERDES_CLK_150		3
+#define FSL_SERDES_PROTO_SATA		0
+#define FSL_SERDES_PROTO_PEX		1
+#define FSL_SERDES_PROTO_PEX_X2		2
+#define FSL_SERDES_PROTO_SGMII		3
+#define FSL_SERDES_VDD1V		1
+
+extern void fsl_setup_serdes(void);
+
+#else
+
+static inline void fsl_setup_serdes(void) {}
+
+#endif
+
+#endif /* __FSL_SERDES_H */
Signature · 1 line
1.5.2.2
#2 lore raw

PATCH 3/7 83xx: serdes setup routines

In reply to Anton Vorontsov
Quoted 16 lines · Anton Vorontsov

This patch adds few routines to configure serdes on 837x targets.

---
 cpu/mpc83xx/Makefile         |    1 +
 cpu/mpc83xx/serdes.c         |  156 ++++++++++++++++++++++++++++++++++++++++++
 include/asm-ppc/fsl_serdes.h |   25 +++++++
 3 files changed, 182 insertions(+), 0 deletions(-)
 create mode 100644 cpu/mpc83xx/serdes.c
 create mode 100644 include/asm-ppc/fsl_serdes.h
cpu/mpc83xx/Makefile +0 -0
index 7ad7e3e..6b6b027 100644

cpu/mpc83xx/Makefile COBJS-y += ecc.o · line 42

Quoted 4 lines
cpu/mpc83xx/Makefile +1 -0
@@ -39,6 +39,7 @@ COBJS-y += ecc.o
 COBJS-$(CONFIG_QE) += qe_io.o
 COBJS-$(CONFIG_83XX_GENERIC_PCI) += pci.o
 COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
+COBJS-$(CONFIG_FSL_SERDES) += serdes.o

Please keep it sort

Best Regards,
J.

#3 lore raw

PATCH 3/7 83xx: serdes setup routines

Quoted 12 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 11 lines · Anton Vorontsov

This patch adds few routines to configure serdes on 837x targets.

---
 cpu/mpc83xx/Makefile         |    1 +
 cpu/mpc83xx/serdes.c         |  156 ++++++++++++++++++++++++++++++++++++++++++
 include/asm-ppc/fsl_serdes.h |   25 +++++++
 3 files changed, 182 insertions(+), 0 deletions(-)
 create mode 100644 cpu/mpc83xx/serdes.c
 create mode 100644 include/asm-ppc/fsl_serdes.h
Quoted 10 lines

cpu/mpc83xx/Makefile COBJS-y += ecc.o · line 42

Quoted 9 lines
cpu/mpc83xx/Makefile +1 -0
index 7ad7e3e..6b6b027 100644
@@ -39,6 +39,7 @@ COBJS-y += ecc.o
 COBJS-$(CONFIG_QE) += qe_io.o
 COBJS-$(CONFIG_83XX_GENERIC_PCI) += pci.o
 COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
+COBJS-$(CONFIG_FSL_SERDES) += serdes.o

Please keep it sort

Keeping cobjs in alphabetical order sounds weird to me, plus as far as I can see, current Makefile tried to keep things in this (sane) order:

start.S
COBJS += core (traps, cpu)
COBJS += "less" important code (speed, sdram, ..) COBJS += auxiliary/not so important (pci, fdt, ....)

[Almost] the same order in which the code will be executed.

Though, in this case I should place SERDES above FDT, near the PCI.

Anyhow, firstly I'd like to know what Kim is thinking about all this?

Signature · 3 lines
Anton Vorontsov
email: cboumailru at gmail.com
irc://irc.freenode.net/bd2
#4 lore raw

PATCH 3/7 83xx: serdes setup routines

Quoted 33 lines · On Tue, 18 Mar 2008 16:52:29 +0300 Anton Vorontsov <[email protected]>…
Quoted 12 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 11 lines · Anton Vorontsov

This patch adds few routines to configure serdes on 837x targets.

---
 cpu/mpc83xx/Makefile         |    1 +
 cpu/mpc83xx/serdes.c         |  156 ++++++++++++++++++++++++++++++++++++++++++
 include/asm-ppc/fsl_serdes.h |   25 +++++++
 3 files changed, 182 insertions(+), 0 deletions(-)
 create mode 100644 cpu/mpc83xx/serdes.c
 create mode 100644 include/asm-ppc/fsl_serdes.h
Quoted 10 lines

cpu/mpc83xx/Makefile COBJS-y += ecc.o · line 42

Quoted 9 lines
cpu/mpc83xx/Makefile +1 -0
index 7ad7e3e..6b6b027 100644
@@ -39,6 +39,7 @@ COBJS-y += ecc.o
 COBJS-$(CONFIG_QE) += qe_io.o
 COBJS-$(CONFIG_83XX_GENERIC_PCI) += pci.o
 COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
+COBJS-$(CONFIG_FSL_SERDES) += serdes.o

Please keep it sort

Keeping cobjs in alphabetical order sounds weird to me, plus as far as I can see, current Makefile tried to keep things in this (sane) order:

start.S
COBJS += core (traps, cpu)
COBJS += "less" important code (speed, sdram, ..) COBJS += auxiliary/not so important (pci, fdt, ....)

Quoted 7 lines

[Almost] the same order in which the code will be executed.

Though, in this case I should place SERDES above FDT, near the PCI.

Anyhow, firstly I'd like to know what Kim is thinking about all this?

sorry, I was out for a while.

I personally don't have a problem with COBJS not in alpha order.

Alpha order is something Wolfgang has brought up in the past, seemingly more appropriately, i.e. for things like board names in the main Makefile and MAKEALL.

Kim