From: Jason Jin <Jason.jin@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] Make pixis_set_sgmii more general to support MPC85xx boards.
Date: Fri, 10 Oct 2008 11:40:58 +0800 [thread overview]
Message-ID: <1223610061-5348-1-git-send-email-Jason.jin@freescale.com> (raw)
From: Liu Yu <yu.liu@freescale.com>
The pixis sgmii command depend on the FPGA support on the board, some 85xx
boards support SGMII riser card but did not support this command, define
CONFIG_PIXIS_SGMII_CMD for those boards which support the sgmii command.
Not like 8544, 8572 has 4 eTsec so that the other two's pixis bits
are not supported by 8544. Therefor, define PIXIS_VSPEED2_MASK and
PIXIS_VCFGEN1_MASK in header file for both boards.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
---
board/freescale/common/pixis.c | 22 +++++++++++++++++++---
include/configs/MPC8544DS.h | 3 +++
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/board/freescale/common/pixis.c b/board/freescale/common/pixis.c
index b5a0e84..978a255 100644
--- a/board/freescale/common/pixis.c
+++ b/board/freescale/common/pixis.c
@@ -283,7 +283,7 @@ U_BOOT_CMD(
"diswd - Disable watchdog timer \n",
NULL);
-#ifdef CONFIG_FSL_SGMII_RISER
+#ifdef CONFIG_PIXIS_SGMII_CMD
int pixis_set_sgmii(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
int which_tsec = -1;
@@ -295,17 +295,33 @@ int pixis_set_sgmii(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
which_tsec = simple_strtoul(argv[1], NULL, 0);
switch (which_tsec) {
+#ifdef CONFIG_TSEC1
case 1:
mask = PIXIS_VSPEED2_TSEC1SER;
switch_mask = PIXIS_VCFGEN1_TSEC1SER;
break;
+#endif
+#ifdef CONFIG_TSEC2
+ case 2:
+ mask = PIXIS_VSPEED2_TSEC2SER;
+ switch_mask = PIXIS_VCFGEN1_TSEC2SER;
+ break;
+#endif
+#ifdef CONFIG_TSEC3
case 3:
mask = PIXIS_VSPEED2_TSEC3SER;
switch_mask = PIXIS_VCFGEN1_TSEC3SER;
break;
+#endif
+#ifdef CONFIG_TSEC4
+ case 4:
+ mask = PIXIS_VSPEED2_TSEC4SER;
+ switch_mask = PIXIS_VCFGEN1_TSEC4SER;
+ break;
+#endif
default:
- mask = PIXIS_VSPEED2_TSEC1SER | PIXIS_VSPEED2_TSEC3SER;
- switch_mask = PIXIS_VCFGEN1_TSEC1SER | PIXIS_VCFGEN1_TSEC3SER;
+ mask = PIXIS_VSPEED2_MASK;
+ switch_mask = PIXIS_VCFGEN1_MASK;
break;
}
diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h
index b650874..76e5fb4 100644
--- a/include/configs/MPC8544DS.h
+++ b/include/configs/MPC8544DS.h
@@ -202,6 +202,8 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
#define PIXIS_VSPEED2_TSEC3SER 0x1
#define PIXIS_VCFGEN1_TSEC1SER 0x20
#define PIXIS_VCFGEN1_TSEC3SER 0x40
+#define PIXIS_VSPEED2_MASK (PIXIS_VSPEED2_TSEC1SER|PIXIS_VSPEED2_TSEC3SER)
+#define PIXIS_VCFGEN1_MASK (PIXIS_VCFGEN1_TSEC1SER|PIXIS_VCFGEN1_TSEC3SER)
/* define to use L1 as initial stack */
@@ -374,6 +376,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
#define CONFIG_TSEC3 1
#define CONFIG_TSEC3_NAME "eTSEC3"
+#define CONFIG_PIXIS_SGMII_CMD
#define CONFIG_FSL_SGMII_RISER 1
#define SGMII_RISER_PHY_OFFSET 0x1c
--
1.5.4
next reply other threads:[~2008-10-10 3:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-10 3:40 Jason Jin [this message]
2008-10-10 3:40 ` [U-Boot] [PATCH 2/4] Enabled the Freescale SGMII riser card on 8572DS Jason Jin
2008-10-10 3:41 ` [U-Boot] [PATCH 3/4] Enabled the Freescale SGMII riser card on 8536DS Jason Jin
2008-10-10 3:41 ` [U-Boot] [PATCH 4/4] Do not init SATA when disabled " Jason Jin
2008-10-14 1:49 ` Kumar Gala
2008-10-14 1:52 ` Andy Fleming
2008-10-14 14:06 ` Wolfgang Denk
2008-10-14 14:07 ` Wolfgang Denk
2008-10-14 16:01 ` Wolfgang Denk
2008-10-13 23:11 ` [U-Boot] [PATCH 3/4] Enabled the Freescale SGMII riser card " Andy Fleming
2008-10-13 22:59 ` [U-Boot] [PATCH 2/4] Enabled the Freescale SGMII riser card on 8572DS Andy Fleming
2008-10-13 22:47 ` [U-Boot] [PATCH 1/4] Make pixis_set_sgmii more general to support MPC85xx boards Andy Fleming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1223610061-5348-1-git-send-email-Jason.jin@freescale.com \
--to=jason.jin@freescale.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox