public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] arm, am33xx: add defines for gmii_sel_register bits
@ 2013-06-04  9:03 Heiko Schocher
  2013-06-04 21:30 ` Tom Rini
  2013-06-05  6:05 ` [U-Boot] [PATCH v2] " Heiko Schocher
  0 siblings, 2 replies; 4+ messages in thread
From: Heiko Schocher @ 2013-06-04  9:03 UTC (permalink / raw)
  To: u-boot

move gmii_sel register defines from board code to common place.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Chandan Nath <chandan.nath@ti.com>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Tom Rini <trini@ti.com>
Cc: Lars Poeschel <poeschel@lemonage.de>
Cc: Enric Balletbo i Serra <eballetbo@iseebcn.com>
---
 arch/arm/include/asm/arch-am33xx/cpu.h | 8 ++++++++
 board/isee/igep0033/board.c            | 4 ++--
 board/phytec/pcm051/board.c            | 2 --
 board/ti/am335x/board.c                | 6 +-----
 4 Dateien ge?ndert, 11 Zeilen hinzugef?gt(+), 9 Zeilen entfernt(-)

diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h b/arch/arm/include/asm/arch-am33xx/cpu.h
index fb44654..6dd3b0a 100644
--- a/arch/arm/include/asm/arch-am33xx/cpu.h
+++ b/arch/arm/include/asm/arch-am33xx/cpu.h
@@ -364,6 +364,14 @@ struct ctrl_dev {
 	unsigned int resv4[4];
 	unsigned int miisel;		/* offset 0x50 */
 };
+
+/* miisel defines */
+#define MII_MODE_ENABLE		0x0
+#define RMII_MODE_ENABLE        0x5
+#define RGMII_MODE_ENABLE	0xA
+#define RGMII_INT_DELAY		0x30
+#define RMII_CHIPCKL_ENABLE     0xC0
+
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL_STRICT_NAMES */
 
diff --git a/board/isee/igep0033/board.c b/board/isee/igep0033/board.c
index 842051f..7ea22be 100644
--- a/board/isee/igep0033/board.c
+++ b/board/isee/igep0033/board.c
@@ -38,7 +38,7 @@ DECLARE_GLOBAL_DATA_PTR;
 static struct wd_timer *wdtimer = (struct wd_timer *)WDT_BASE;
 
 /* MII mode defines */
-#define RMII_MODE_ENABLE	0x4D
+#define RMII_MODE_P1_ENABLE	0x4D
 
 static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
 
@@ -182,7 +182,7 @@ int board_eth_init(bd_t *bis)
 			eth_setenv_enetaddr("ethaddr", mac_addr);
 	}
 
-	writel(RMII_MODE_ENABLE, &cdev->miisel);
+	writel(RMII_MODE_P1_ENABLE, &cdev->miisel);
 
 	rv = cpsw_register(&cpsw_data);
 	if (rv < 0)
diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
index 72c5612..d0314e4 100644
--- a/board/phytec/pcm051/board.c
+++ b/board/phytec/pcm051/board.c
@@ -41,8 +41,6 @@ DECLARE_GLOBAL_DATA_PTR;
 static struct wd_timer *wdtimer = (struct wd_timer *)WDT_BASE;
 
 /* MII mode defines */
-#define MII_MODE_ENABLE		0x0
-#define RGMII_MODE_ENABLE	0xA
 #define RMII_RGMII2_MODE_ENABLE	0x49
 
 static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index b04e385..6b96f84 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -39,10 +39,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 static struct wd_timer *wdtimer = (struct wd_timer *)WDT_BASE;
 
-/* MII mode defines */
-#define MII_MODE_ENABLE		0x0
-#define RGMII_MODE_ENABLE	0x3A
-
 /* GPIO that controls power to DDR on EVM-SK */
 #define GPIO_DDR_VTT_EN		7
 
@@ -465,7 +461,7 @@ int board_eth_init(bd_t *bis)
 		cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
 				PHY_INTERFACE_MODE_MII;
 	} else {
-		writel(RGMII_MODE_ENABLE, &cdev->miisel);
+		writel((RGMII_MODE_ENABLE | RGMII_INT_DELAY), &cdev->miisel);
 		cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
 				PHY_INTERFACE_MODE_RGMII;
 	}
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-05  6:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-04  9:03 [U-Boot] arm, am33xx: add defines for gmii_sel_register bits Heiko Schocher
2013-06-04 21:30 ` Tom Rini
2013-06-05  5:39   ` Heiko Schocher
2013-06-05  6:05 ` [U-Boot] [PATCH v2] " Heiko Schocher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox