DM90x0 driver hooked into DM320

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@367 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2007-11-04 16:31:24 +00:00
parent 552ae5f399
commit 8aaefd303a
2 changed files with 10 additions and 1 deletions

View File

@ -298,7 +298,7 @@ CONFIG_NET_RESOLV_ENTRIES=4
CONFIG_NET_DM90x0=n
CONFIG_DM9X_NINTERFACES=1
CONFIG_DM9X_STATS=1
CONFIG_DM9X_BASE=0x60000300
CONFIG_DM9X_BASE=0xd0000300
CONFIG_DM9X_IRQ=27
CONFIG_DM9X_BUSWIDTH8=n
CONFIG_DM9X_BUSWIDTH16=y

View File

@ -41,12 +41,14 @@
#if defined(CONFIG_NET) && defined(CONFIG_NET_DM90x0)
#include <sys/types.h>
#include <debug.h>
#include <arch/board/board.h>
#include "up_arch.h"
#include "up_internal.h"
#include "dm320_memorymap.h"
#include "dm320_emif.h"
#include "dm320_gio.h"
extern void dm9x_initialize(void);
@ -78,6 +80,9 @@ void up_netinitialize(void)
* width is 16-bits.
*/
lldbg("CS4CTRL1=%04x CS4CTRL2=%04x\n",
getreg16(DM320_EMIF_CS4CTRL1), getreg16(DM320_EMIF_CS4CTRL2));
/* It is assumed that bootloader has already configured CS4. Here,
* we will only make certain that the GIO is properly configured
*/
@ -87,6 +92,10 @@ void up_netinitialize(void)
GIO_INTERRUPT(GIO_DM9000A_INT);
GIO_RISINGEDGE(GIO_DM9000A_INT);
lldbg("GIO DIR0=%04x INV0=%04x IRQPORT=%04x IRQEDGE=%04x\n",
getreg16(DM320_GIO_DIR0), getreg16(DM320_GIO_INV0),
getreg16(DM320_GIO_IRQPORT), getreg16(DM320_GIO_IRQEDGE));
/* Then initialize the driver */
dm9x_initialize();