The embodiment of the invention provides a method and a device for implementing the same memory technology equipment partition to hang multiple attribute devices, so as to reduce the complexity of the upper layer software processing. The method comprises the following steps: a MTD partition extended into sub MTD partition; for the plurality of sub MTD partitions in each sub partition MTD adaptation of a corresponding description information; the description information of each chip body respectively with the need to hook up the MTD storage device manufacturers with private description a body of information association. The method provided by the invention can make different types of chip connected on the same parent MTD partition different sub MTD partitions, but to the software only for a parent can meet the MTD partition, in order to reduce the complexity of the software in the same MTD partition hooks MTD original memory chips of different types the application scenarios, at the same time as the product of chip selection increased flexibility, reduce the cost of chip selection.
【技术实现步骤摘要】
实现同一内存技术设备分区挂接多种设备的方法和装置
本专利技术涉及数据存储领域,尤其涉及实现同一内存技术设备分区挂接多种设备的方法和装置。
技术介绍
内存技术设备(MemowTechnologyDevice,MTD)是用于访问内存设备的Linux的子系统。MTD的主要目的是为了使新的内存设备的驱动更加简单,为此它在硬件和上层之间提供了一个抽象的接口。每个MTD原始存储器件有一个mtd_info结构体即structmtd_infomtd,每种芯片也有用于描述每个Flash芯片专有信息的结构体,例如,描述NAND芯片的结构体为structnand_chipchip,而描述MTD原始存储器件的结构体与描述芯片专有信息的结构体一一对应,例如,structmtd_infomtd和structnand_chipchip一一对应。由于存在上述MTD原始存储器件的结构体与描述芯片专有信息的结构体一一对应的关系,即,一个MTD分区的原始存储器件必须是同一属性的,因此,同一个MTD分区下全部挂接同种类型芯片,不同属性的原始存储器件(对应于不同类型芯片)不能挂接在同一MTD分区下。例如,假设MTD1分区已经挂接了NANDFlash,则MTD1分区下只能挂接NANDFlash,不能挂接其他类型的芯片,例如NORFlash或NVRAMFlash,要挂接NORFlash或NVRAMFlash,只能在另一MTD分区下挂接。按照现有的上述同种类型芯片的MTD原始存储器件只能挂接在同一MTD分区下或者由于不同类型芯片的MTD原始存储器件只能分别挂接到不同的MTD分区下这一架构,当为了降低上层 ...
【技术保护点】
一种实现同一内存技术设备分区挂接多属性设备的方法,其特征在于,所述方法包括:将同一内存技术设备MTD分区扩展为多个子MTD分区;为所述多个子MTD分区中每一个子MTD分区适配一个相应的芯片描述信息体;将所述每个芯片描述信息体分别与需要挂接的MTD存储器件厂商所提供的私有描述信息体关联。
【技术特征摘要】
1.一种实现同一内存技术设备分区挂接多属性设备的方法,其特征在于,所述方法包括:将同一内存技术设备MTD分区扩展为多个子MTD分区;为所述多个子MTD分区中每一个子MTD分区适配一个相应的芯片描述信息体;将所述每个芯片描述信息体分别与需要挂接的MTD存储器件厂商所提供的私有描述信息体关联。2.如权利要求1所述的方法,其特征在于,所述芯片描述信息体为描述芯片属性的结构体,所述MTD存储器件厂商所提供的私有描述信息体为MTD存储器件厂商所提供的代码私有数据结构体。3.如权利要求2所述的方法,其特征在于,所述为所述多个子MTD分区中每一个子MTD分区适配一个相应的芯片描述信息体包括:构造分别与所述多个子MTD分区中每一个子MTD分区相应的芯片属性的结构体;将同一内存技术设备MTD分区相应的结构体指向所述构造的多个芯片属性的结构体。4.如权利要求3所述的方法,其特征在于,所述将所述每个芯片描述信息体分别与需要挂接的MTD原始设备的厂商代码私有描述信息体关联包括:将所述构造的多个芯片属性的结构体中的每一个结构体分别指向所述需要挂接的MTD存储器件厂商所提供的代码...
【专利技术属性】
技术研发人员:罗晓雁,陈慈沼,周博,陈凡,
申请(专利权)人:华为技术有限公司,
类型:发明
国别省市:广东,44
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。