5 class Mpc5121 : public Nand_ctrl
10 { Max_us_reset = 100, };
12 { Spare_section_len = 64, };
20 u16 nfc_configuration;
21 u16 ecc_status_result1;
22 u16 ecc_status_result2;
26 u16 nand_flash_wr_pr_st;
27 u16 nand_flash_config1;
28 u16 nand_flash_config2;
30 u16 unlock_start_blk_add0;
31 u16 unlock_end_blk_add0;
32 u16 unlock_start_blk_add1;
33 u16 unlock_end_blk_add1;
34 u16 unlock_start_blk_add2;
35 u16 unlock_end_blk_add2;
36 u16 unlock_start_blk_add3;
37 u16 unlock_end_blk_add3;
41 Mpc5121(addr base_addr);
44 void add(Nand_chip *chip);
45 Nand_chip *select(loff_t addr);
51 void rd_dat(const u8 *buf, unsigned len);
52 void wr_dat(const u8 *buf, unsigned len);
56 int get_id(char id[4]);
65 void _copy_from_data(u8 *buf, int len);
66 void _copy_to_data(const u8 *buf, int len);
67 void _copy_from_spare(u8 *buf, int len);
68 void _copy_to_spare(const u8 *buf, int len);
71 Nand_chip *_chips[Max_cs];
73 volatile u32 *_buffer_main;