modify for dm9000
author刘益星 <lyx@rock-chips.com>
Mon, 17 May 2010 02:35:58 +0000 (02:35 +0000)
committer黄涛 <huangtao@rock-chips.com>
Mon, 21 Jun 2010 05:34:55 +0000 (13:34 +0800)
arch/arm/mach-rk2818/devices.c
arch/arm/mach-rk2818/include/mach/rk2818_iomap.h
drivers/net/dm9000.c

index 2587f298779e283bc0e5c4ef9afc9fb13312f51c..61d65689b54eb61716eb4c022c5fc0ac0a7b4c6b 100644 (file)
@@ -198,17 +198,17 @@ struct platform_device rk2818_device_fb = {
 /* DM9000 */
 static struct resource dm9k_resource[] = {
        [0] = {
-               .start = RK2818_NANDC_PHYS + 0x800 + 1*0x100,    //nand_cs1
-               .end   = RK2818_NANDC_PHYS + 0x800 + 1*0x100 + 3,
+               .start = RK2818_NANDC_PHYS + 0x800 + (1*0x100 + 0x8),    //nand_cs1+nand_cmd
+               .end   = RK2818_NANDC_PHYS + 0x800 + (1*0x100 + 0x8) + 3,
                .flags = IORESOURCE_MEM,
        },
        [1] = {
-               .start = RK2818_NANDC_PHYS + (0x800+1*0x100)+ 0x4,
-               .end   = RK2818_NANDC_PHYS + (0x800+1*0x100)+ 0x4 + 3,
+               .start = RK2818_NANDC_PHYS + 0x800 + (1*0x100 + 0x4),   //nand_cs1+nand_data
+               .end   = RK2818_NANDC_PHYS + 0x800 + (1*0x100 + 0x4) + 3,
                .flags = IORESOURCE_MEM,
        },
        [2] = {
-               .start = RK2818_PIN_PE2,//use pe2 as interrupt
+               .start = RK2818_PIN_PE2,        //use pe2 as interrupt
                .end   = RK2818_PIN_PE2,
                .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
        }
index ab4d3803968198daa395d15a13c94f4660713072..d8ad78b3a5631e5afd6b8706d9b330681018bd1d 100644 (file)
@@ -91,7 +91,7 @@
 
 #define RK2818_NANDC_BASE                              0xFF0AE000
 #define RK2818_NANDC_PHYS                  0x100AE000
-#define RK2818_NANDC_SIZE                  SZ_8K
+#define RK2818_NANDC_SIZE                  SZ_16K
 
 #define RK2818_SDRAMC_BASE             0xFF0B0000
 #define RK2818_SDRAMC_PHYS             0x100B0000
index da2b18ba41e83c914525cc74e320c33a71d668ad..9a7d9e9857974b1b2b68a94ad5906dca75b8d411 100644 (file)
@@ -911,8 +911,12 @@ dm9000_rx(struct net_device *dev)
                /* Status check: this byte must be 0 or 1 */
                if (rxbyte & DM9000_PKT_ERR) {
                        dev_warn(db->dev, "status check fail: %d\n", rxbyte);
+                       #if 0
                        iow(db, DM9000_RCR, 0x00);      /* Stop Device */
-                       iow(db, DM9000_ISR, IMR_PAR);   /* Stop INT request */
+                       iow(db, DM9000_IMR, IMR_PAR);   /* Stop INT request */
+                       #else
+                       dm9000_reset(db);
+                       #endif                  
                        return;
                }