onenand_ipl
Introduction
What is the OneNand flash?
Details
SAMSUNG OneNAND is a highly reliable embedded memory targeted for both consumer electronic, and next generation mobile phone market. With SAMSUNG's accumulated NAND flash technologies over the last decade, SAMSUNG designs an ideal single memory chip based on NAND architecture integrating SRAM buffers and logic interface. SAMSUNG OneNAND takes both advantages from high-speed data read function of NOR flash and the advanced data storage function of NAND flash. 以nand作为存储单元,加上Nor作为interface,中间再加入SRAM作为缓冲,从而有了nor 的高速读功能,nand 的高密度数据存储。
what is the onenand_ipl
ipl:Initial-Program-Loader 最初的程序loader. http://old.nabble.com/-PATCH--OneNAND-Initial-Program-Loader-%28IPL%29-support-td14913811.html
This patch enables the OneNAND boot within U-Boot. Before this work, we used another OneNAND IPL called X-Loader based on open source. With this work, we can build the oneboot.bin image without other program.
The build sequence is simple. First, it compiles the u-boot.bin Second, it compiles OneNAND IPL Finally, it becomes the oneboot.bin from OneNAND IPL and u-boot.bin The mechanism is similar with NAND boot except it boots from itself.
Another thing is that you can only use the OneNAND IPL only to work other bootloader such as RedBoot and so on. 由上文可知,onenand_ipl是一个小loader,它放在u-boot.bin之前,用于以onenand flash为mem的系统中,他的功能就像一个小boot,是由onenand 的功能决定要这个。
图1 OneNAND Flash结构及硬件结构
NOR Flash带有SRAM接口,有足够的地址引脚来寻址,可以很容易地存取其内容的每一字节(有限的地址引脚是限制其容量的因素之一)。NAND Flash使用复杂的I/O口来串行地存取数据,各个产品或厂商的方法可能各不相同。为了弥补NAND Flash的不足,三星公司在NAND Flash芯片内集成了一个RAM接口,命名为OneNAND Flash,这类Flash拥有与NOR Flash相同的简单接口,而且不受地址引脚的限制,即容量与地址引脚无关。
其实OneNAND 其实就是采用了NOR的接口,NAND的架构,是两者的性能得到了综合。这就有了X-LOADER的产生,以前我们接触到的都是BOOTLOADER,其实这个X-LOADER也起到初始化的作用,因为我们的BOOTLOADER是放在NAND的架构下的,而CPU却是从NOR的接口下读取BOOTLOADER到SDRAM中的,所以现在要做一个工作就是要如何将BOOTLOADER在OneNAND的架构下从NAND复制到SDRAM中,这就是X-LOADER的功能了,它不仅初始化OneNAND,并且把U-BOOT从NAND的架构下复制到BufferRam中,再复制到SDRAM中。X-LOADER还支持从SD、MMC下引导Uboot,他在CPU下有对MMC的初始化程序,可以直接把uboot.bin从MMC下复制到SDRAM中。说到底这个X-LOADER就是起到初始化OneNAND和引导U-BOOT的作用。
读写数据以扇区为单位,一次可以是1个,2个,3个或者4个扇区。读数据时,通过寄存器操作,把数据暂存在缓存DataRAM中,然后CPU通过直接地址访问,从缓存中读取数据;写数据时,CPU先把数据写到缓存,然后通过寄存器操作,把缓存中的数据写到nand中。擦除以块为单位,必须先擦后写。
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/flower_fancy/archive/2010/10/12/5935618.aspx