1. include/asm-arm/arch-s3c2410/map.h
添加: /* CS8900 */ #define S3C24XX_VA_CS8900 S3C2410_ADDR(0x04000000) #define S3C2410_PA_CS8900 __phys_to_pfn(0x19000000) #define S3C24XX_SZ_CS8900 SZ_1M #define S3C24XX_PA_CS8900 S3C2410_PA_CS8900
提示:实地址与虚地址的映射结构 smdk2410_iodesc 里有所变化。第二个参数从原来的 unsigned long physical 变为 unsigned long pfn 。而从 smdk2410_iodesc 传入的SMDK2410_PA_CS8900A_BASE 仍然是一个 physical 值,因此出现 Unable to handle kernel paging request 错误。这里很感谢http://bibu.blogchina.com/bibu/4914641.html的作者,根据提示,将实地址作一个小小变化就Ok了
2. arch/arm/mach-s3c2410/mach-smdk2410.c
修改
static struct map_desc smdk2410_iodesc[] __initdata={ {S3C24XX_VA_CS8900, S3C2410_PA_CS8900, S3C24XX_SZ_CS8900, S3C24XX_SZ_CS8900, MT_DEVICE} };
3. drivers/net/cs89x0.c
155 #endif 156 > #ifdef CONFIG_ARCH_S3C2410 > #include > #include > #include > #include > #endif : : 191 #elif defined(CONFIG_ARCH_PNX010X) 192 #include
193 #include 194 #define CIRRUS_DEFAULT_BASE IO_ADDRESS(EXT_STATIC2_s0_BASE + 0x2 00000) /* = Physical address 0x48200000 */ 195 #define CIRRUS_DEFAULT_IRQ VH_INTC_INT_NUM_CASCADED_INTERRUPT_ 1 /* Event inputs bank 1 - ID 35/bit 3 */ 196 static unsigned int netcard_portlist[] __initdata = {CIRRUS_DEFAULT_BASE, 0}; 197 static unsigned int cs8900_irq_map[] = {CIRRUS_DEFAULT_IRQ, 0, 0, 0}; > #elif defined(CONFIG_ARCH_S3C2410) > static unsigned int netcard_portlist[] __initdata = { S3C24XX_VA_CS8900 + 0x300, 0}; > static unsigned int cs8900_irq_map[] = { IRQ_EINT9, 0, 0, 0 }; > #ifdef request_region > #undef request_region > #endif > #ifdef release_region > #undef release_region > #endif > #define request_region(a, s, n) request_mem_region(a, s, n) > #define release_region(a, s) release_mem_region(a, s) 198 #else 199 static unsigned int netcard_portlist[] __initdata = 200 { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0}; 201 static unsigned int cs8900_irq_map[] = {10,11,12,5}; 202 #endif : : 325 io = dev->base_addr; 326 irq = dev->irq; 327 > #ifdef CONFIG_ARCH_S3C2410 // initialize CS8900, jdh added > __raw_writel((__raw_readl(S3C2410_GPGCON)&~(0x3<<2))|(0x2<<2),S3C2 410_GPGCON); > __raw_writel((__raw_readl(S3C2410_EXTINT1)&~(0x7<<4))|(0x4<<4),S3C2 410_EXTINT1); > #endif // jdh ended > 328 if (net_debug) 329 printk("cs89x0:cs89x0_probe(0x%x)\n", io); : : 350 return ERR_PTR(err); 351 } 352 #endif
353 > #if defined(CONFIG_ARCH_S3C2410) > static u16 > readword(unsigned long base_addr, int portno) > { > return __raw_readw(base_addr + portno); > } > > static void > writeword(unsigned long base_addr, int portno, u16 value) > { > __raw_writew(value, base_addr + portno); > } > #elif defined(CONFIG_MACH_IXDP2351) < #if defined(CONFIG_MACH_IXDP2351) : : 633 reset_chip(dev); 634 > #ifdef CONFIG_ARCH_S3C2410 > lp->force = FORCE_RJ45; > lp->auto_neg_cnf = IMM_BIT; > > dev->dev_addr[0] = 0x09; /* set MAC address */ > dev->dev_addr[1] = 0x90; > dev->dev_addr[2] = 0x99; > dev->dev_addr[3] = 0x09; > dev->dev_addr[4] = 0x90; > dev->dev_addr[5] = 0x99; > #endif : : < #if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) & & !defined(CONFIG_ARCH_PNX010X) > #if !defined(CONFIG_MACH_MBA2410) && !defined(CONFIG_MACH_IXDP2351) & & !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX010X) 1314 if (((1 << dev->irq) & lp->irq_map) == 0) { 1315 printk(KERN_ERR "%s: IRQ %d is not in our map of all owable IRQs, which is %x\n", 1316 dev->name, dev->irq, lp->irq_map);
注意:< 表示去掉这行 > 表示添加这行 |