2.6.10 nand driver -- drivers/mtd/nand/au1550nd.c
I am confused by the codes in 2.6.10 nand driver drivers/mtd/nand/au1550nd.c:
407: au_writel((1<<28) | (NAND_PHYS_ADDR>>4) |
408: (((NAND_PHYS_ADDR + 0x1000)-1) & (0x3fff<<18)>>18),
409: MEM_STADDR1);
410: au_sync();
411:
412: p_nand = ioremap(NAND_PHYS_ADDR, 0x1000);
I think it should be like the following assuming 4KB NAND:
au_writel((1<<28) | (NAND_PHYS_ADDR>>4) | (~(0x1000-1) & (0x3fff<<18) >> 18), MEM_STADDR1);
Could someone give me a hint? Thanks!