mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +08:00
Add PHY init logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3100 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -1239,7 +1239,7 @@
|
||||
For people who have their own configurations and/or Makefiles,
|
||||
you will need to make a couple of changes:
|
||||
|
||||
- Replace all occurrences of CONFIG_EXAMPLE=foobar with
|
||||
- Replace all occurrences of CONFIG_EXAMPLE=foobar with
|
||||
CONFIG_APP_DIR=examples/foobar in all of the configuration
|
||||
files.
|
||||
- Replace any occurrences of examples/$(CONFIG_EXAMPLE) with
|
||||
@@ -1329,8 +1329,13 @@
|
||||
not refer to an open file.
|
||||
* configs/olimex-lpc1766stk - Add support for the Olimex LPC1766-STK
|
||||
development board. The OS test and NSH configurations (only) have been
|
||||
verified.
|
||||
verified.
|
||||
|
||||
5.14 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* configs/olimex-lpc1766stk/nettest - Add examples/nettest configuration to
|
||||
verify the LPC17xx ethernet driver currently under development.
|
||||
* arch/arm/src/lpc17xx/lpc17xx_ethernet.c/.h - Began development of
|
||||
the LPC17xx Ethernet driver.
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<tr align="center" bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
||||
<p>Last Updated: November 9, 2010</p>
|
||||
<p>Last Updated: November 11, 2010</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -1982,6 +1982,11 @@ buildroot-1.8 2009-12-21 <spudmonkey@racsa.co.cr>
|
||||
<ul><pre>
|
||||
nuttx-5.14 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
* configs/olimex-lpc1766stk/nettest - Add examples/nettest configuration to
|
||||
verify the LPC17xx ethernet driver currently under development.
|
||||
* arch/arm/src/lpc17xx/lpc17xx_ethernet.c/.h - Began development of
|
||||
the LPC17xx Ethernet driver.
|
||||
|
||||
pascal-2.1 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
||||
buildroot-1.9 2010-xx-xx <spudmonkey@racsa.co.cr>
|
||||
|
||||
@@ -192,7 +192,7 @@ struct lm3s_driver_s
|
||||
|
||||
#if LM3S_NETHCONTROLLERS > 1
|
||||
uint32_t ld_base; /* Ethernet controller base address */
|
||||
int ld-irq; /* Ethernet controller IRQ */
|
||||
int ld_irq; /* Ethernet controller IRQ */
|
||||
#endif
|
||||
|
||||
bool ld_bifup; /* true:ifup false:ifdown */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -185,7 +185,7 @@
|
||||
|
||||
#define ETH_MAC2_FD (1 << 0) /* Bit 0: Full duplex */
|
||||
#define ETH_MAC2_FLC (1 << 1) /* Bit 1: Frame length checking */
|
||||
#define ETH_MAC2_HFE (1 << 2) /* Bit 2: Huge fram enable */
|
||||
#define ETH_MAC2_HFE (1 << 2) /* Bit 2: Huge frame enable */
|
||||
#define ETH_MAC2_DCRC (1 << 3) /* Bit 3: Delayed CRC */
|
||||
#define ETH_MAC2_CRCEN (1 << 4) /* Bit 4: CRC enable */
|
||||
#define ETH_MAC2_PADCRCEN (1 << 5) /* Bit 5: Pad/CRC enable */
|
||||
@@ -238,7 +238,7 @@
|
||||
|
||||
#define ETH_MCFG_SCANINC (1 << 0) /* Bit 0: Scan increment */
|
||||
#define ETH_MCFG_SUPPRE (1 << 1) /* Bit 1: Suppress preamble */
|
||||
#define ETH_MCFG_CLKSEL_SHIFT (2) /* Bits 2-5:Clock select */
|
||||
#define ETH_MCFG_CLKSEL_SHIFT (2) /* Bits 2-5: Clock select */
|
||||
#define ETH_MCFG_CLKSEL_MASK (15 << ETH_MCFG_CLKSEL_SHIFT)
|
||||
# define ETH_MCFG_CLKSEL_DIV4 (0 << ETH_MCFG_CLKSEL_SHIFT)
|
||||
# define ETH_MCFG_CLKSEL_DIV6 (2 << ETH_MCFG_CLKSEL_SHIFT)
|
||||
@@ -316,7 +316,7 @@
|
||||
|
||||
#define ETH_CMD_RXEN (1 << 0) /* Bit 0: Receive enable */
|
||||
#define ETH_CMD_TXEN (1 << 1) /* Bit 1: Transmit enable */
|
||||
/* Bit 2: Reserved */
|
||||
/* Bit 2: Reserved */
|
||||
#define ETH_CMD_REGRST (1 << 3) /* Bit 3: Reset host registers */
|
||||
#define ETH_CMD_TXRST (1 << 4) /* Bit 4: Reset transmit datapath */
|
||||
#define ETH_CMD_RXRST (1 << 5) /* Bit 5: Reset receive datapath */
|
||||
|
||||
@@ -601,6 +601,14 @@ Olimex LPC1766-STK Configuration Options
|
||||
CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
|
||||
CONFIG_UARTn_2STOP - Two stop bits
|
||||
|
||||
|
||||
LPC17xx specific PHY/Ethernet device driver settings
|
||||
|
||||
CONFIG_PHY_KS8721 - Selects Micrel KS8721 PHY
|
||||
CONFIG_PHY_AUTONEG - Enable auto-negotion
|
||||
CONFIG_PHY_SPEED100 - Select 100Mbit vs. 10Mbit speed.
|
||||
CONFIG_PHY_FDUPLEX - Select full (vs. half) duplex
|
||||
|
||||
LPC17xx USB Configuration
|
||||
|
||||
CONFIG_LPC17_USBDEV_FRAME_INTERRUPT
|
||||
|
||||
@@ -122,6 +122,11 @@
|
||||
#define CONFIG_LP17_FLASH 1
|
||||
#define BOARD_FLASHCFG_VALUE 0x0000303a
|
||||
|
||||
/* Ethernet configuration */
|
||||
|
||||
//#define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV44
|
||||
#define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV20
|
||||
|
||||
/* LED definitions ******************************************************************/
|
||||
|
||||
/* LED1 LED2 */
|
||||
|
||||
@@ -181,6 +181,19 @@ CONFIG_UART1_2STOP=0
|
||||
CONFIG_UART2_2STOP=0
|
||||
CONFIG_UART3_2STOP=0
|
||||
|
||||
#
|
||||
# LPC17xx specific PHY/Ethernet device driver settings
|
||||
#
|
||||
# CONFIG_PHY_KS8721 - Selects Micrel KS8721 PHY
|
||||
# CONFIG_PHY_AUTONEG - Enable auto-negotion
|
||||
# CONFIG_PHY_SPEED100 - Select 100Mbit vs. 10Mbit speed.
|
||||
# CONFIG_PHY_FDUPLEX - Select full (vs. half) duplex
|
||||
#
|
||||
CONFIG_PHY_KS8721=y
|
||||
CONFIG_PHY_AUTONEG=y
|
||||
CONFIG_PHY_SPEED100=n
|
||||
CONFIG_PHY_FDUPLEX=y
|
||||
|
||||
#
|
||||
# General build options
|
||||
#
|
||||
|
||||
@@ -181,6 +181,19 @@ CONFIG_UART1_2STOP=0
|
||||
CONFIG_UART2_2STOP=0
|
||||
CONFIG_UART3_2STOP=0
|
||||
|
||||
#
|
||||
# LPC17xx specific PHY/Ethernet device driver settings
|
||||
#
|
||||
# CONFIG_PHY_KS8721 - Selects Micrel KS8721 PHY
|
||||
# CONFIG_PHY_AUTONEG - Enable auto-negotion
|
||||
# CONFIG_PHY_SPEED100 - Select 100Mbit vs. 10Mbit speed.
|
||||
# CONFIG_PHY_FDUPLEX - Select full (vs. half) duplex
|
||||
#
|
||||
CONFIG_PHY_KS8721=y
|
||||
CONFIG_PHY_AUTONEG=y
|
||||
CONFIG_PHY_SPEED100=n
|
||||
CONFIG_PHY_FDUPLEX=y
|
||||
|
||||
#
|
||||
# General build options
|
||||
#
|
||||
|
||||
@@ -181,6 +181,19 @@ CONFIG_UART1_2STOP=0
|
||||
CONFIG_UART2_2STOP=0
|
||||
CONFIG_UART3_2STOP=0
|
||||
|
||||
#
|
||||
# LPC17xx specific PHY/Ethernet device driver settings
|
||||
#
|
||||
# CONFIG_PHY_KS8721 - Selects Micrel KS8721 PHY
|
||||
# CONFIG_PHY_AUTONEG - Enable auto-negotion
|
||||
# CONFIG_PHY_SPEED100 - Select 100Mbit vs. 10Mbit speed.
|
||||
# CONFIG_PHY_FDUPLEX - Select full (vs. half) duplex
|
||||
#
|
||||
CONFIG_PHY_KS8721=y
|
||||
CONFIG_PHY_AUTONEG=y
|
||||
CONFIG_PHY_SPEED100=n
|
||||
CONFIG_PHY_FDUPLEX=y
|
||||
|
||||
#
|
||||
# General build options
|
||||
#
|
||||
|
||||
@@ -181,6 +181,19 @@ CONFIG_UART1_2STOP=0
|
||||
CONFIG_UART2_2STOP=0
|
||||
CONFIG_UART3_2STOP=0
|
||||
|
||||
#
|
||||
# LPC17xx specific PHY/Ethernet device driver settings
|
||||
#
|
||||
# CONFIG_PHY_KS8721 - Selects Micrel KS8721 PHY
|
||||
# CONFIG_PHY_AUTONEG - Enable auto-negotion
|
||||
# CONFIG_PHY_SPEED100 - Select 100Mbit vs. 10Mbit speed.
|
||||
# CONFIG_PHY_FDUPLEX - Select full (vs. half) duplex
|
||||
#
|
||||
CONFIG_PHY_KS8721=y
|
||||
CONFIG_PHY_AUTONEG=y
|
||||
CONFIG_PHY_SPEED100=n
|
||||
CONFIG_PHY_FDUPLEX=y
|
||||
|
||||
#
|
||||
# General build options
|
||||
#
|
||||
|
||||
@@ -181,6 +181,19 @@ CONFIG_UART1_2STOP=0
|
||||
CONFIG_UART2_2STOP=0
|
||||
CONFIG_UART3_2STOP=0
|
||||
|
||||
#
|
||||
# LPC17xx specific PHY/Ethernet device driver settings
|
||||
#
|
||||
# CONFIG_PHY_KS8721 - Selects Micrel KS8721 PHY
|
||||
# CONFIG_PHY_AUTONEG - Enable auto-negotion
|
||||
# CONFIG_PHY_SPEED100 - Select 100Mbit vs. 10Mbit speed.
|
||||
# CONFIG_PHY_FDUPLEX - Select full (vs. half) duplex
|
||||
#
|
||||
CONFIG_PHY_KS8721=y
|
||||
CONFIG_PHY_AUTONEG=y
|
||||
CONFIG_PHY_SPEED100=n
|
||||
CONFIG_PHY_FDUPLEX=y
|
||||
|
||||
#
|
||||
# General build options
|
||||
#
|
||||
|
||||
+3
-3
@@ -305,7 +305,7 @@
|
||||
|
||||
/* LM3S6918 LED Configuration, address 0x17 */
|
||||
|
||||
#define LM3S_LEDCONFIG_LED0_SHIFT 0 /* Bits 3-0: LED0 Source */
|
||||
#define LM3S_LEDCONFIG_LED0_SHIFT (0) /* Bits 3-0: LED0 Source */
|
||||
#define LM3S_LEDCONFIG_LED0_MASK (0x0f << LM3S_LEDCONFIG_LED0_SHIFT)
|
||||
#define LM3S_LEDCONFIG_LED0_LINKOK (0 << LM3S_LEDCONFIG_LED0_SHIFT) /* Link OK */
|
||||
#define LM3S_LEDCONFIG_LED0_RXTX (1 << LM3S_LEDCONFIG_LED0_SHIFT) /* RX or TX activity */
|
||||
@@ -313,7 +313,7 @@
|
||||
#define LM3S_LEDCONFIG_LED0_10BASET (6 << LM3S_LEDCONFIG_LED0_SHIFT) /* 10BASE-T mode */
|
||||
#define LM3S_LEDCONFIG_LED0_FDUPLEX (7 << LM3S_LEDCONFIG_LED0_SHIFT) /* Full duplex */
|
||||
#define LM3S_LEDCONFIG_LED0_OKRXTX (8 << LM3S_LEDCONFIG_LED0_SHIFT) /* Full duplex */
|
||||
#define LM3S_LEDCONFIG_LED1_SHIFT 4 /* Bits 7-4: LED1 Source */
|
||||
#define LM3S_LEDCONFIG_LED1_SHIFT (4) /* Bits 7-4: LED1 Source */
|
||||
#define LM3S_LEDCONFIG_LED1_MASK (0x0f << LM3S_LEDCONFIG_LED1_SHIFT)
|
||||
#define LM3S_LEDCONFIG_LED1_LINKOK (0 << LM3S_LEDCONFIG_LED1_SHIFT) /* Link OK */
|
||||
#define LM3S_LEDCONFIG_LED1_RXTX (1 << LM3S_LEDCONFIG_LED1_SHIFT) /* RX or TX activity */
|
||||
@@ -324,7 +324,7 @@
|
||||
|
||||
/* LM3S6918 MDI/MDIX Control, address 0x18 */
|
||||
|
||||
#define LM3S_MDICONTROL_MDIXSD_SHIFT 0 /* Bits 3-0: Auto-Switching Seed */
|
||||
#define LM3S_MDICONTROL_MDIXSD_SHIFT (0) /* Bits 3-0: Auto-Switching Seed */
|
||||
#define LM3S_MDICONTROL_MDIXSD_MASK (0x0f << LM3S_MDICONTROL_MDIXSD_SHIFT)
|
||||
#define LM3S_MDICONTROL_MDIXCM (1 << 4) /* Bit 4: Auto-Switching Complete */
|
||||
#define LM3S_MDICONTROL_MDIX (1 << 5) /* Bit 5: Auto-Switching Configuration */
|
||||
|
||||
Reference in New Issue
Block a user