summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-22 16:48:44 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-22 16:48:44 +0000
commitd49fa0f03c72b2fcc29f22ad037bc5c5a8a8d7c9 (patch)
treebff3c16fd6433f8e2d4e5cf8ba6d512b9a98e076
parent273a2b0d87cc6bde28cbae477afc313f017b4d3a (diff)
downloadnuttx-d49fa0f03c72b2fcc29f22ad037bc5c5a8a8d7c9.tar.gz
nuttx-d49fa0f03c72b2fcc29f22ad037bc5c5a8a8d7c9.tar.bz2
nuttx-d49fa0f03c72b2fcc29f22ad037bc5c5a8a8d7c9.zip
Shenzhou board uses RMII PHY interface, not MII
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5176 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_eth.c2
-rw-r--r--nuttx/configs/shenzhou/README.txt4
-rw-r--r--nuttx/configs/shenzhou/include/board.h14
-rw-r--r--nuttx/configs/shenzhou/nsh/defconfig9
4 files changed, 16 insertions, 13 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_eth.c b/nuttx/arch/arm/src/stm32/stm32_eth.c
index 59f3def7f..51dd7e186 100644
--- a/nuttx/arch/arm/src/stm32/stm32_eth.c
+++ b/nuttx/arch/arm/src/stm32/stm32_eth.c
@@ -2854,7 +2854,7 @@ static void stm32_ethreset(FAR struct stm32_ethmac_s *priv)
* reset all the registers holds their reset values.
*/
- regval = stm32_getreg(STM32_ETH_DMABMR);
+ regval = stm32_getreg(STM32_ETH_DMABMR);
regval |= ETH_DMABMR_SR;
stm32_putreg(regval, STM32_ETH_DMABMR);
diff --git a/nuttx/configs/shenzhou/README.txt b/nuttx/configs/shenzhou/README.txt
index e68bd7bf9..e929f2b8b 100644
--- a/nuttx/configs/shenzhou/README.txt
+++ b/nuttx/configs/shenzhou/README.txt
@@ -560,9 +560,9 @@ Shenzhou-specific Configuration Options
CONFIG_STM32_PHYADDR - The 5-bit address of the PHY on the board
CONFIG_STM32_MII - Support Ethernet MII interface
- CONFIG_STM32_MII_MCO1 - Use MCO1 to clock the MII interface
- CONFIG_STM32_MII_MCO2 - Use MCO2 to clock the MII interface
+ CONFIG_STM32_MII_MCO - Use MCO to clock the MII interface
CONFIG_STM32_RMII - Support Ethernet RMII interface
+ CONFIG_STM32_RMII_MCO - Use MCO to clock the RMII interface
CONFIG_STM32_AUTONEG - Use PHY autonegotion to determine speed and mode
CONFIG_STM32_ETHFD - If CONFIG_STM32_AUTONEG is not defined, then this
may be defined to select full duplex mode. Default: half-duplex
diff --git a/nuttx/configs/shenzhou/include/board.h b/nuttx/configs/shenzhou/include/board.h
index 8e4d89531..df4386cf1 100644
--- a/nuttx/configs/shenzhou/include/board.h
+++ b/nuttx/configs/shenzhou/include/board.h
@@ -166,9 +166,9 @@
* -- ---- -------------- ----------------------------------------------------------
* PN NAME SIGNAL NOTES
* -- ---- -------------- ----------------------------------------------------------
- * 24 PA1 MII_RX_CLK Ethernet PHY
- * RMII_REF_CLK Ethernet PHY
- * 25 PA2 MII_MDIO Ethernet PHY
+ * 24 PA1 MII_RX_CLK Ethernet PHY NOTE: Despite the MII labeling of these
+ * RMII_REF_CLK Ethernet PHY signals, the DM916AEP is actually configured
+ * 25 PA2 MII_MDIO Ethernet PHY to work in RMII mode.
* 48 PB11 MII_TX_EN Ethernet PHY
* 51 PB12 MII_TXD0 Ethernet PHY
* 52 PB13 MII_TXD1 Ethernet PHY
@@ -186,11 +186,11 @@
# ifndef CONFIG_STM32_ETH_REMAP
# error "STM32 Ethernet requires CONFIG_STM32_ETH_REMAP"
# endif
-# ifndef CONFIG_STM32_MII
-# error "STM32 Ethernet requires CONFIG_STM32_MII"
+# ifndef CONFIG_STM32_RMII
+# error "STM32 Ethernet requires CONFIG_STM32_RMII"
# endif
-# ifndef CONFIG_STM32_MII_MCO
-# error "STM32 Ethernet requires CONFIG_STM32_MII_MCO"
+# ifndef CONFIG_STM32_RMII_MCO
+# error "STM32 Ethernet requires CONFIG_STM32_RMII_MCO"
# endif
#endif
diff --git a/nuttx/configs/shenzhou/nsh/defconfig b/nuttx/configs/shenzhou/nsh/defconfig
index f231b2632..053717470 100644
--- a/nuttx/configs/shenzhou/nsh/defconfig
+++ b/nuttx/configs/shenzhou/nsh/defconfig
@@ -161,7 +161,7 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y
# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set
# CONFIG_STM32_JTAG_SW_ENABLE is not set
# CONFIG_STM32_FORCEPOWER is not set
-# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set`
+# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set
#
# SPI Configuration
@@ -173,8 +173,8 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y
# Ethernet MAC configuration
#
CONFIG_STM32_PHYADDR=1
-CONFIG_STM32_MII=y
-CONFIG_STM32_MII_MCO=y
+# CONFIG_STM32_MII is not set
+# CONFIG_STM32_MII_MCO is not set
# CONFIG_STM32_MII_EXTCLK is not set
CONFIG_STM32_AUTONEG=y
CONFIG_STM32_PHYSR=16
@@ -183,6 +183,9 @@ CONFIG_STM32_PHYSR_100MBPS=0x0000
CONFIG_STM32_PHYSR_MODE=0x0004
CONFIG_STM32_PHYSR_FULLDUPLEX=0x0004
# CONFIG_STM32_ETH_PTP is not set
+CONFIG_STM32_RMII=y
+CONFIG_STM32_RMII_MCO=y
+# CONFIG_STM32_RMII_EXTCLK is not set
#
# USB Host Configuration