Quantcast
Channel: CSDN博客推荐文章
Viewing all articles
Browse latest Browse all 35570

S3C6410(arm11核)的DM9000移植

$
0
0

 
第一步 配置内核
             
[*] Networking support  ---> 
       Networkingoptions  --->  
              [*]TCP/IP networking
Device Drivers  --->
                     [*]Network device support  --->
                     [*]   Ethernet (10 or 100Mbit)  --->
                            <*>   DM9000 support
             
第二步 配置参数
(1)
#include <linux/dm9000.h>
// ANW6410_PA_DM9000根据电路图中使用的片选决定
#define ANW6410_PA_DM9000  (0x18000000)
static struct resourceanw6410_dm9000_resource[] = {
       [0]= {
              .start= ANW6410_PA_DM9000,
              .end   = ANW6410_PA_DM9000 + 3,
              .flags= IORESOURCE_MEM,
       },
       [1]= {
              .start= ANW6410_PA_DM9000 + 4,
              .end   = ANW6410_PA_DM9000 + 4 + 500,
              .flags= IORESOURCE_MEM,
       },
       [2]= {
              .start= IRQ_EINT(7),
              .end   = IRQ_EINT(7),
              .flags= IORESOURCE_IRQ | IRQF_TRIGGER_HIGH,
       },
};
 
static struct dm9000_plat_dataanw6410_dm9000_pdata = {
       .flags        =(DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM),
       /*dev_addr can be set to provide hwaddr. */
};
 
static struct platform_deviceanw6410_device_eth = {
       .name      = "dm9000",
       .id   = -1,
       .num_resources      = ARRAY_SIZE(anw6410_dm9000_resource),
       .resource = anw6410_dm9000_resource,
       .dev = {
              .platform_data  = &anw6410_dm9000_pdata,
       },
};
 
在anw6410_machine_init中调用anw6410_dm9000_enable();
(4)
static struct platform_device*anw6410_devices[] __initdata = {
       &s3c_device_fb,
       &anw6410_lcd_powerdev,
       &anw6410_device_eth,
       &s3c_device_nand,
};
 
移植中遇到的问题:
1.移植dm9000
开发板ping电脑时,系统死掉,提示以下错误
[root@FriendlyARM /]# ping 192.168.1.89
PING 192.168.1.89 (192.168.1.89): 56 data bytes
------------[ cut here ]------------
WARNING: at net/sched/sch_generic.c:246 dev_watchdog+0x15c/0x244()
NETDEV WATCHDOG: eth0 (dm9000): transmit queue 0 timed out
Modules linked in:
[<c0025868>] (unwind_backtrace+0x0/0xd4) from [<c0036f40>] (warn_slowpath_common
+0x48/0x60)
[<c0036f40>] (warn_slowpath_common+0x48/0x60) from [<c0036f90>] (warn_slowpath_f
mt+0x24/0x30)


原因已找到
是和其它设备配置起冲突导致出现这个问题
 


作者:h32dong809 发表于2013-3-20 23:41:33 原文链接
阅读:74 评论:0 查看评论

Viewing all articles
Browse latest Browse all 35570

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>