From 56a4432633c2af51aa66b9a48d3c4946fec638dd Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 21 May 2011 18:25:31 +0000 Subject: [PATCH] Add E1000 PIC NIC driver from Yu Qiang git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3638 42af7a65-404d-4744-a932-0658087f49c3 --- arch/rgmp/src/nuttx.c | 10 +++++++++- arch/rgmp/src/rgmp.c | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/arch/rgmp/src/nuttx.c b/arch/rgmp/src/nuttx.c index ba5ffdd9bc..b81fc98dd7 100644 --- a/arch/rgmp/src/nuttx.c +++ b/arch/rgmp/src/nuttx.c @@ -85,6 +85,7 @@ void up_initialize(void) extern pidhash_t g_pidhash[]; extern void up_register_bridges(void); extern void vnet_initialize(void); + extern void e1000_mod_init(void); // intialize the current_task to g_idletcb current_task = g_pidhash[PIDHASH(0)].tcb; @@ -92,12 +93,19 @@ void up_initialize(void) // setup console up_register_bridges(); - // setup net device +#ifdef CONFIG_NET_VNET + // setup vnet device vnet_initialize(); +#endif // setup COM device up_serialinit(); +#ifdef CONFIG_NET_E1000 + // setup e1000 + e1000_mod_init(); +#endif + // enable interrupt sti(); } diff --git a/arch/rgmp/src/rgmp.c b/arch/rgmp/src/rgmp.c index 904729d51f..6cc7aceb4a 100644 --- a/arch/rgmp/src/rgmp.c +++ b/arch/rgmp/src/rgmp.c @@ -154,4 +154,19 @@ int rtos_sem_down(void *sem) return sem_wait(sem); } +void rtos_stop_running(void) +{ + extern void e1000_mod_exit(void); + + cli(); + +#ifdef CONFIG_NET_E1000 + e1000_mod_exit(); +#endif + + while(1) { + asm volatile("hlt"); + } +} +