Norflash driver Implementation Analysis of uclinux2.6 (bf561) (5): Driver Loading

Source: Internet
Author: User

The initialization code of the norflash driver module is: int _ init init_ezkit5620.flash (void) {printk (kern_notice "ezkit561 map: Mapping % ld mib flash at 0x % x/N ", ezkit561_flash_size/0x100000, ezkit561_flash_base); // maps the physical address to the Linux kernel space. In uClinux, the value of ezkit561_flash_base is directly returned. Ezkit561_map.virt = ioremap (ezkit561_flash_base, ezkit561_flash_size); If (! Ezkit561_map.virt) {printk ("init_ezkit561_flash: failed to ioremap/N"); Return-EIO;} // fill the read, write, copy_from, copy_to function pointers with the default values. Simple_map_init (& ezkit561_map); response = do_map_probe ("cfi_probe", & ezkit561_map); If (response) {response-> owner = this_module; return response (response, ezkit561_parts, ezkit561_part_count);} return-enxio;} It is actually a norflash chip in the detection system. If this chip exists, add the partitions on the chip to the mtdblock list of the system.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.