2.6.10 nand driver -- drivers/mtd/nand/au1550nd.c

carl liao carlliao at 21cn.com
Mon Apr 18 10:26:04 EDT 2005


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!





More information about the linux-mtd mailing list