当前位置: 技术问答>linux和unix
关于4412移植DM9000的问题
来源: 互联网 发布时间:2017-05-30
本文导语: 有没人在4412上移植DM9000的我在移植后,就是死活仍不到网卡。。。我说说我的移植过程,有做过的帮忙看看。 1、硬件: 数据线:SD0~SD15接4412的 Xm0DATA0~Xm0DATA15 CMD1:接4412的 Xm0ADDR2/MP03_2 片选CS :接4412的Xm0CSn1/NF_CSn3/MP00_1 ...
有没人在4412上移植DM9000的我在移植后,就是死活仍不到网卡。。。我说说我的移植过程,有做过的帮忙看看。
1、硬件:
数据线:SD0~SD15接4412的 Xm0DATA0~Xm0DATA15
CMD1:接4412的 Xm0ADDR2/MP03_2
片选CS :接4412的Xm0CSn1/NF_CSn3/MP00_1
中断脚:INT接4412的XEINT7/ALV_DBG3/GPX0_7
IOR:接4412的Xm0OEn/MP00_4
IOW:解4412的Xm0WEn/MP00_5
复位脚:GPM4_2
2、软件
2、1在devs.c中添加
/* DM9000 registrations */
#ifdef CONFIG_DM9000
static struct resource s5p_dm9000_resources[] = {
[0] = { .start = 0x05000000,//EXYNOS4412_PA_DM9000,//0x0500 0000
.end = 0x05000000,//EXYNOS4412_PA_DM9000+0x3,
.flags = IORESOURCE_MEM, },
[1] = {
#if 1//defined(CONFIG_DM9000_16BIT)
.start = 0x05000000 +4 ,//EXYNOS4412_PA_DM9000 + 4,
.end = 0x05000000+4 ,//EXYNOS4412_PA_DM9000 + 4,
.flags = IORESOURCE_MEM,
#else
.start = EXYNOS4412_PA_DM9000 + 1,
.end = EXYNOS4412_PA_DM9000 + 1,
.flags = IORESOURCE_MEM,#endif
},
[2] = {
.start = IRQ_EINT(7),//change by ljf
.end = IRQ_EINT(7),//
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
}
};
static struct dm9000_plat_data s5p_dm9000_platdata = {
#if 1//defined(CONFIG_DM9000_16BIT)
.flags = DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM,
#else
.flags = DM9000_PLATF_8BITONLY | DM9000_PLATF_NO_EEPROM,
#endif
//.dev_addr = {0x00,0x09,0xc0,0xff,0xec,0x48},
.dev_addr = {0x10,0x23,0x45,0x67,0x89,0xab},
};
struct platform_device s5p_device_dm9000 = {
.name = "dm9000",
.id = 0,
.num_resources = ARRAY_SIZE(s5p_dm9000_resources),
.resource = s5p_dm9000_resources,//lll
.dev = {
.platform_data = &s5p_dm9000_platdata,
}
};
/* need to get the ether addr from armboot */
static int __init ethaddr_setup(char *line)
{
char *ep;
int i;
/* there should really be routines to do this stuff */
for (i = 0; i
1、硬件:
数据线:SD0~SD15接4412的 Xm0DATA0~Xm0DATA15
CMD1:接4412的 Xm0ADDR2/MP03_2
片选CS :接4412的Xm0CSn1/NF_CSn3/MP00_1
中断脚:INT接4412的XEINT7/ALV_DBG3/GPX0_7
IOR:接4412的Xm0OEn/MP00_4
IOW:解4412的Xm0WEn/MP00_5
复位脚:GPM4_2
2、软件
2、1在devs.c中添加
/* DM9000 registrations */
#ifdef CONFIG_DM9000
static struct resource s5p_dm9000_resources[] = {
[0] = { .start = 0x05000000,//EXYNOS4412_PA_DM9000,//0x0500 0000
.end = 0x05000000,//EXYNOS4412_PA_DM9000+0x3,
.flags = IORESOURCE_MEM, },
[1] = {
#if 1//defined(CONFIG_DM9000_16BIT)
.start = 0x05000000 +4 ,//EXYNOS4412_PA_DM9000 + 4,
.end = 0x05000000+4 ,//EXYNOS4412_PA_DM9000 + 4,
.flags = IORESOURCE_MEM,
#else
.start = EXYNOS4412_PA_DM9000 + 1,
.end = EXYNOS4412_PA_DM9000 + 1,
.flags = IORESOURCE_MEM,#endif
},
[2] = {
.start = IRQ_EINT(7),//change by ljf
.end = IRQ_EINT(7),//
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
}
};
static struct dm9000_plat_data s5p_dm9000_platdata = {
#if 1//defined(CONFIG_DM9000_16BIT)
.flags = DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM,
#else
.flags = DM9000_PLATF_8BITONLY | DM9000_PLATF_NO_EEPROM,
#endif
//.dev_addr = {0x00,0x09,0xc0,0xff,0xec,0x48},
.dev_addr = {0x10,0x23,0x45,0x67,0x89,0xab},
};
struct platform_device s5p_device_dm9000 = {
.name = "dm9000",
.id = 0,
.num_resources = ARRAY_SIZE(s5p_dm9000_resources),
.resource = s5p_dm9000_resources,//lll
.dev = {
.platform_data = &s5p_dm9000_platdata,
}
};
/* need to get the ether addr from armboot */
static int __init ethaddr_setup(char *line)
{
char *ep;
int i;
/* there should really be routines to do this stuff */
for (i = 0; i