mirror of
https://github.com/apache/nuttx.git
synced 2025-12-14 15:56:20 +08:00
Add eZ80F91 EMAC driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1450 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -604,4 +604,6 @@
|
|||||||
* Fixed several compilation errors in fixed precision math library when built
|
* Fixed several compilation errors in fixed precision math library when built
|
||||||
against toolchains that do not support 64-bit type 'long long'.
|
against toolchains that do not support 64-bit type 'long long'.
|
||||||
* Fix errors in some function prototypes in dirent.h
|
* Fix errors in some function prototypes in dirent.h
|
||||||
|
* Add eZ80F91 EMAC driver
|
||||||
|
* Fix recvfrom() compilation error -- only noted under ZDS
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<tr align="center" bgcolor="#e4e4e4">
|
<tr align="center" bgcolor="#e4e4e4">
|
||||||
<td>
|
<td>
|
||||||
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
||||||
<p>Last Updated: December 7 2008</p>
|
<p>Last Updated: December 12, 2008</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -1292,6 +1292,8 @@ nuttx-0.4.1 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
|||||||
* Fixed several compilation errors in fixed precision math library when built
|
* Fixed several compilation errors in fixed precision math library when built
|
||||||
against toolchains that do not support 64-bit type 'long long'.
|
against toolchains that do not support 64-bit type 'long long'.
|
||||||
* Fix errors in some function prototypes in dirent.h
|
* Fix errors in some function prototypes in dirent.h
|
||||||
|
* Add eZ80F91 EMAC driver
|
||||||
|
* Fix recvfrom() compilation error -- only noted under ZDS
|
||||||
|
|
||||||
pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||||
|
|
||||||
|
|||||||
@@ -165,9 +165,17 @@ EXTERN void up_timerhook(void);
|
|||||||
/* Defined in board/up_network.c */
|
/* Defined in board/up_network.c */
|
||||||
|
|
||||||
#ifdef CONFIG_NET
|
#ifdef CONFIG_NET
|
||||||
EXTERN void up_netinitialize(void);
|
EXTERN int up_netinitialize(void);
|
||||||
|
EXTERN void up_netuninitialize(void);
|
||||||
|
# ifdef CONFIG_ARCH_MCFILTER
|
||||||
|
EXTERN int up_multicastfilter(FAR struct uip_driver_s *dev, FAR ubyte *mac, boolean enable);
|
||||||
|
# else
|
||||||
|
# define up_multicastfilter(dev, mac, enable)
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
# define up_netinitialize()
|
# define up_netinitialize()
|
||||||
|
# define up_netuninitialize()
|
||||||
|
# define up_multicastfilter(dev, mac, enable)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Return the current value of the stack pointer (used in stack dump logic) */
|
/* Return the current value of the stack pointer (used in stack dump logic) */
|
||||||
|
|||||||
@@ -48,7 +48,13 @@ CHIP_ASRCS = ez80_startup.asm ez80_io.asm ez80_irqsave.asm \
|
|||||||
ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y)
|
ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y)
|
||||||
CHIP_ASRCS += ez80f91_init.asm
|
CHIP_ASRCS += ez80f91_init.asm
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CHIP_SSRCS =
|
CHIP_SSRCS =
|
||||||
CHIP_CSRCS = ez80_initialstate.c ez80_irq.c ez80_copystate.c \
|
CHIP_CSRCS = ez80_initialstate.c ez80_irq.c ez80_copystate.c \
|
||||||
ez80_schedulesigaction.c ez80_sigdeliver.c ez80_timerisr.c \
|
ez80_schedulesigaction.c ez80_sigdeliver.c ez80_timerisr.c \
|
||||||
ez80_lowuart.c ez80_serial.c ez80_registerdump.c
|
ez80_lowuart.c ez80_serial.c ez80_registerdump.c
|
||||||
|
ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y)
|
||||||
|
ifeq ($(CONFIG_EZ80_EMAC),y)
|
||||||
|
CHIP_CSRCS += ez80_emac.c
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|||||||
1803
arch/z80/src/ez80/ez80_emac.c
Normal file
1803
arch/z80/src/ez80/ez80_emac.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -123,12 +123,12 @@
|
|||||||
|
|
||||||
/* EMAC bufsize register bit settings ***********************************************/
|
/* EMAC bufsize register bit settings ***********************************************/
|
||||||
|
|
||||||
#define EMAC_BUFSIZ_BUFSZMASK 0xc0 /* Bits 6-6: Rx/Tx buffer size */
|
#define EMAC_BUFSZ_BUFSZMASK 0xc0 /* Bits 6-6: Rx/Tx buffer size */
|
||||||
# define EMAC_BUFSIZ_256b 0x00 /* EMAC Rx/Tx buffer size = 256 bytes */
|
# define EMAC_BUFSZ_256b 0x00 /* EMAC Rx/Tx buffer size = 256 bytes */
|
||||||
# define EMAC_BUFSIZ_128b 0x40 /* EMAC Rx/Tx buffer size = 128 bytes */
|
# define EMAC_BUFSZ_128b 0x40 /* EMAC Rx/Tx buffer size = 128 bytes */
|
||||||
# define EMAC_BUFSIZ_64b 0x80 /* EMAC Rx/Tx buffer size = 64 bytes */
|
# define EMAC_BUFSZ_64b 0x80 /* EMAC Rx/Tx buffer size = 64 bytes */
|
||||||
# define EMAC_BUFSIZ_32b 0xc0 /* EMAC Rx/Tx buffer size = 32 bytes */
|
# define EMAC_BUFSZ_32b 0xc0 /* EMAC Rx/Tx buffer size = 32 bytes */
|
||||||
#define EMAC_BUFSIZ_TPCFLMASK 0x3f /* Bits 0-5: Tranmsit pause frame level */
|
#define EMAC_BUFSZ_TPCFLMASK 0x3f /* Bits 0-5: Tranmsit pause frame level */
|
||||||
|
|
||||||
/* EMAC interrupt enable register bit settings **************************************/
|
/* EMAC interrupt enable register bit settings **************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ CONFIG_ARCH_CHIP_EZ80F92=n
|
|||||||
CONFIG_ARCH_CHIP_EZ80F93=n
|
CONFIG_ARCH_CHIP_EZ80F93=n
|
||||||
CONFIG_ARCH_BOARD=ez80f910200zco
|
CONFIG_ARCH_BOARD=ez80f910200zco
|
||||||
CONFIG_ARCH_BOARD_EZ80F910200ZCO=y
|
CONFIG_ARCH_BOARD_EZ80F910200ZCO=y
|
||||||
CONFIG_ARCH_NOINTC=y
|
CONFIG_ARCH_NOINTC=n
|
||||||
CONFIG_ARCH_IRQPRIO=n
|
CONFIG_ARCH_IRQPRIO=n
|
||||||
CONFIG_BOARD_LOOPSPERMSEC=1250
|
CONFIG_BOARD_LOOPSPERMSEC=1250
|
||||||
CONFIG_ENDIAN_BIG=y
|
CONFIG_ENDIAN_BIG=y
|
||||||
@@ -109,6 +109,31 @@ CONFIG_UART1_PARITY=0
|
|||||||
CONFIG_UART0_2STOP=0
|
CONFIG_UART0_2STOP=0
|
||||||
CONFIG_UART1_2STOP=0
|
CONFIG_UART1_2STOP=0
|
||||||
|
|
||||||
|
#
|
||||||
|
# ez80 EMAC
|
||||||
|
#
|
||||||
|
# CONFIG_EZ80_EMAC - Enables support for ez80 EMAC driver.
|
||||||
|
# CONFIG_EZ80_FIAD - Provides the MII address of the PHY device
|
||||||
|
# CONFIG_EZ80_PKTBUFSIZE, CONFIG_EZ80_NTXPKTBUFS, and CONFIG_EZ80_NRXPKTBUFS -
|
||||||
|
# The size of one packet buffer and the number of Rx and Tx packet
|
||||||
|
# buffers. This must add up to exactly 8192 bytes.
|
||||||
|
# CONFIG_EZ80_MDCDIV=1 - The value to use for the divider to derive
|
||||||
|
# the MII MDC clock from SLCK. Options are 1->4; 2->6; 3->8; 4->10;
|
||||||
|
# 5->14; 6->20; and 7->28
|
||||||
|
# CONFIG_EZ80_TXPOLLTIMERMS - Specifies how often the EMAC controller
|
||||||
|
# should poll for a Tx packet (milliseconds)
|
||||||
|
# CONFIG_ARCH_MCFILTER - Enalbes multicast MAC address filtering (not
|
||||||
|
# fully implemented
|
||||||
|
CONFIG_EZ80_EMAC=n
|
||||||
|
CONFIG_EZ80_FIAD=0x1f
|
||||||
|
CONFIG_EZ80_PKTBUFSIZE=64
|
||||||
|
CONFIG_EZ80_NTXPKTBUFS=64
|
||||||
|
CONFIG_EZ80_NRXPKTBUFS=64
|
||||||
|
CONFIG_EZ80_PKTBUFSIZE=64
|
||||||
|
CONFIG_EZ80_MDCDIV=0
|
||||||
|
CONFIG_EZ80_TXPOLLTIMERMS=10
|
||||||
|
CONFIG_ARCH_MCFILTER=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# General build options
|
# General build options
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
</tool>
|
</tool>
|
||||||
<tool name="Debugger">
|
<tool name="Debugger">
|
||||||
<options>
|
<options>
|
||||||
<option name="target" type="string" change-action="rebuild">eZ80DevPlatform_F91_Flash</option>
|
<option name="target" type="string" change-action="rebuild">eZ80F91ModDevKit_Flash</option>
|
||||||
<option name="debugtool" type="string" change-action="none">Simulator</option>
|
<option name="debugtool" type="string" change-action="none">Simulator</option>
|
||||||
<option name="usepageerase" type="boolean" change-action="none">true</option>
|
<option name="usepageerase" type="boolean" change-action="none">true</option>
|
||||||
</options>
|
</options>
|
||||||
@@ -244,4 +244,4 @@
|
|||||||
<breakpoints>
|
<breakpoints>
|
||||||
</breakpoints>
|
</breakpoints>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
Reference in New Issue
Block a user