Under Linux Nand Flash drive key data structure description

s3c2410 proprietary data structure

  1. s3c2410_nand_set

struct s3c2410_nand_set {

int nr_chips; / * number of chips * /

int nr_partitions; / * number of partitions * /

char * name; / * set name * /

int nr_map; / * Alternatively, the underlying logical to physical number of chips * / struct mtd_partition partitions; / * list of partitions * /

};

 

  1. s3c2410_platform_and

struct s3c2410_platform_nand {

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

 

int tacls; / * from CLE / ALE time effective to nWE / nOE of * / int twrph0; / * nWE / nOE the effective time * /

int twrph1; / * release from CLE / ALE to nWE / nOE inactivity time * /

 

int nr_sets; / * set the number of * /

struct s3c2410_nand_set sets; / * set list * /

 

/ * The active set selection chip number * /

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

};

 

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

struct mtd_info mtd; / * MTD information * /

struct nand_chip chip; / * nand flash chip information * / struct s3c2410_nand_set set; / * nand flash set * / struct s3c2410_nand_info * info; / * nand flash information * / int scan_res;

};

 

  1. s3c2410_nand_info

struct s3c2410_nand_info {

/* mtd info */

struct nand_hw_control controller; / * hardware controller * / struct s3c2410_nand_mtd * mtds; / * MTD device table * / struct s3c2410_platform_nand platform; / * Nand platform device * /

 

 

/* device info */

 

struct device

*device;

/ * Pointer device * /

struct resource

*area;

/ * Pointer Resources * /

struct clk

*clk;

/ * Nand Flash clock * /

void  iomem

int

*regs;

mtd_count;

/ * Base address register (the logical address map) * /

/ * MTD number * /

unsigned char

is_s3c2440;

 

};

 

 

 

 

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

struct list_head list; / * clock node list * / struct module * owner; / * View Module * / struct clk * parent; / * parent node * /

const char * name; / * name * /

int id; / * number * /

atomic_t used; / * user count * / unsigned long rate; / * clock rate * / unsigned long ctrlbit; / * Control bits * /

int (* enable) (struct clk *, int enable); / * Clock opening method * /

};

Guess you like

Origin www.cnblogs.com/fanweisheng/p/11106197.html