Skip to contentSkip to conversation

Enable Ethernet for Nomadik 8815 Eval Kit

PATCH New Alessandro Rubini 2 participants 2 messages Feb 7, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Enable Ethernet for Nomadik 8815 Eval Kit

From: Alessandro Rubini <[email protected]>

This trivially enables Ethernet support in the debug board by setting up the proper chip select.

---
 board/st/nmdk8815/nmdk8815.c |    5 ++++-
 include/configs/nmdk8815.h   |    3 +++
 2 files changed, 7 insertions(+), 1 deletions(-)
board/st/nmdk8815/nmdk8815.c +4 -1
index c54eac1..9a7242f 100644
@@ -49,8 +49,11 @@ int board_init(void)
 	writel(0x00000000, NOMADIK_GPIO1_BASE + 0x28);
 	writel(readl(NOMADIK_SRC_BASE) | 0x8000, NOMADIK_SRC_BASE);
 
-	icache_enable();
+	/* Set up SMCS1 for Ethernet: sram-like, enabled, timing values */
+	writel(0x0000305b, NOMADIK_FSMC_BASE + 0x08); /* FSMC_BCR1 */
+	writel(0x00033f33, NOMADIK_FSMC_BASE + 0x0c); /* FSMC_BTR1 */
 
+	icache_enable();
 	return 0;
 }
 
include/configs/nmdk8815.h +3 -0
index 7a503e0..23a7323 100644
@@ -35,8 +35,11 @@
 
 /* commands */
 #include <config_cmd_default.h>
+
+#define CONFIG_CMD_NET
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_DHCP
+#define CONFIG_CMD_NFS
 /* There is no NOR flash, so undefine these commands */
 #undef CONFIG_CMD_FLASH
 #undef CONFIG_CMD_IMLS
Signature · 1 line
1.6.0.2
#1 lore raw

PATCH v2 1/1 Enable Ethernet for Nomadik 8815 Eval Kit

From: Alessandro Rubini <[email protected]>

This trivially enables Ethernet support in the debug board by setting up the proper chip select.

---

Changes from V1: use register names defined in the header introduced by patch "Nand driver for Nomadik SoC" (argh... I hope I should not split that one in two different patches, one for the header and one for the nand)

 board/st/nmdk8815/nmdk8815.c |    5 ++++-
 include/configs/nmdk8815.h   |    3 +++
 2 files changed, 7 insertions(+), 1 deletions(-)
board/st/nmdk8815/nmdk8815.c +4 -1
index c54eac1..edf4626 100644
@@ -49,8 +49,11 @@ int board_init(void)
 	writel(0x00000000, NOMADIK_GPIO1_BASE + 0x28);
 	writel(readl(NOMADIK_SRC_BASE) | 0x8000, NOMADIK_SRC_BASE);
 
-	icache_enable();
+	/* Set up SMCS1 for Ethernet: sram-like, enabled, timing values */
+	writel(0x0000305b, REG_FSMC_BCR1);
+	writel(0x00033f33, REG_FSMC_BTR1);
 
+	icache_enable();
 	return 0;
 }
 
include/configs/nmdk8815.h +3 -0
index 75311a5..a1ba3a9 100644
@@ -37,8 +37,11 @@
 
 /* commands */
 #include <config_cmd_default.h>
+
+#define CONFIG_CMD_NET
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_DHCP
+#define CONFIG_CMD_NFS
 /* There is no NOR flash, so undefine these commands */
 #undef CONFIG_CMD_FLASH
 #undef CONFIG_CMD_IMLS
Signature · 1 line
1.6.0.2