/* 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,
}
#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
/* 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;
}