最近linux-2.6.34内核已经发布,我就download下来编译,基本没有太多的修改,只需要修该Makefile两行
ARCH ?= arm
CROSS_COMPILE ?= arm-linux- //这个是交叉编译工具
然后运行 make mini2440_defconfig
修改arch/arm/mach-s3c2440/mach-mini2440.c
+#include
static void __init mini2440_map_io(void)
{
+ unsigned int value; //tekkaman for dm9000
s3c24xx_init_io(mini2440_iodesc, ARRAY_SIZE(mini2440_iodesc));
s3c24xx_init_clocks(12000000);
s3c24xx_init_uarts(mini2440_uartcfgs, ARRAY_SIZE(mini2440_uartcfgs));
+
+//******************************tekkaman for dm9000********************************
+//config the bwscon for bank 4
+ value = __raw_readl(S3C2410_BWSCON);
+ value &= ~(S3C2410_BWSCON_WS4|
+ S3C2410_BWSCON_ST4|
+ S3C2410_BWSCON_DW4_32);
+ value |= (S3C2410_BWSCON_ST4|
+ S3C2410_BWSCON_DW4_16);
+ __raw_writel(value, S3C2410_BWSCON);
+
+//config the bankcon4
+ value = 0;
+ value = (S3C2410_BANKCON_Tacs4|
+ S3C2410_BANKCON_Tcos4|
+ S3C2410_BANKCON_Tacc14|
+ S3C2410_BANKCON_Tcoh4|
+ S3C2410_BANKCON_Tcah4|
+ S3C2410_BANKCON_Tacp6|
+ S3C2410_BANKCON_PMCnorm);
+ __raw_writel(value,S3C2410_BANKCON4);
+
+//config the irq pin (for mini2440' dm9000 )
+ set_irq_type(IRQ_EINT7,IRQ_TYPE_LEVEL_HIGH);
+ s3c2410_gpio_cfgpin(S3C2410_GPF(7), S3C2410_GPF7_EINT7);
+ s3c2410_gpio_pullup(S3C2410_GPF(7), 0);
+//******************************tekkaman for dm9000********************************
}
再make,十分钟飘过,内核就OK 了。
测试我用uboot+NFS启动。
阅读(3695) | 评论(2) | 转发(0) |