zoukankan      html  css  js  c++  java
  • Linux 下 Nand Flash 驱动主要数据结构说明

    s3c2410 专有数据结构

    1. s3c2410_nand_set

    struct s3c2410_nand_set {

    int                    nr_chips;     /* 芯片的数目 */

    int                    nr_partitions; /* 分区的数目 */

    char                   *name;          /* 集合名称   */

    int                   nr_map;       /* 可选, 底层逻辑到物理的芯片数目 */ struct mtd_partition                      partitions;   /* 分区列表   */

    };

    1. s3c2410_platform_and

    struct s3c2410_platform_nand {

    /* timing information for controller, all times in nanoseconds */

    int     tacls; /* 从 CLE/ALE 有效到 nWE/nOE 的时间 */ int   twrph0; /* nWE/nOE 的有效时间 */

    int     twrph1; /* 从释放 CLE/ALE 到 nWE/nOE 不活动的时间 */

    int     nr_sets; /* 集合数目 */

    struct s3c2410_nand_set sets; /* 集合列表 */

    /* 根据芯片编号选择有效集合 */

    void (*select_chip)(struct s3c2410_nand_set , int chip);

    };

    1. s3c2410_nand_mtd               在 drivers/mtd/nand/s3c2410.c 中, struct s3c2410_nand_mtd {

    struct mtd_info               mtd;    /* MTD 信息 */

    struct nand_chip              chip;   /* nand flash 芯片信息 */ struct s3c2410_nand_set   set;    /* nand flash 集合    */ struct s3c2410_nand_info     *info;  /* nand flash 信息    */  int    scan_res;

    };

    1. s3c2410_nand_info

    struct s3c2410_nand_info {

    /* mtd info */

    struct nand_hw_control        controller; /* 硬件控制器 */ struct s3c2410_nand_mtd                              *mtds;     /* MTD 设备表 */ struct s3c2410_platform_nand         platform;  /* Nand 设备的平台 */

    /* device info */

    struct device

    *device;

    /* 设备指针 */

    struct resource

    *area;

    /* 资源指针 */

    struct clk

    *clk;

    /* Nand Flash 时钟 */

    void  iomem

    int

    *regs;

    mtd_count;

    /* 寄存器基地址(map 后的逻辑地址) */

    /* MTD 的数目 */

    unsigned char

    is_s3c2440;

    };

    1. struct                                       clk 在 arch/arm/mach­s3c2410/clock.h 中 struct clk {

    struct list_head  list;   /* clock 列表结点 */ struct module    *owner;    /* 所属模块     */ struct clk    *parent;   /* 父结点        */

    const char          *name;     /* 名称          */

    int                  id;       /* 编号           */

    atomic_t             used;     /* 使用者计数    */ unsigned long   rate;    /* 时钟速率     */ unsigned long         ctrlbit;  /* 控制位        */

    int                (*enable)(struct clk *, int enable); /* Clock 打开方法 */

    };

  • 相关阅读:
    Oracle导出导入表空间创建
    ASP.NET 缓存 SqlCacheDependency 监视数据库表变化 让缓存更新的更及时更提高节能
    Silverlight在添加WCF服务引用时报错
    springboot中如何动态更换 配置文件 spring.profiles.active
    maven之根据profile动态切换resource
    java synchronized 关键字的锁升级过程
    子类中的方法和父类同名,但是参数不同,是重写(overload)不是覆盖(override)
    Java的协变(extends)和逆变(super),说白了都是子类的实例赋值给父类的变量
    Mybatis缓存
    [转]Spring MVC之 @PathVariable @CookieValue@RequestParam @RequestBody @RequestHeader@SessionAttributes, @ModelAttribute
  • 原文地址:https://www.cnblogs.com/fanweisheng/p/11106197.html
Copyright © 2011-2022 走看看