Commit eec54c50 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

correcting compile errors for mtd_info

parent c2d194ce
...@@ -19,10 +19,11 @@ ...@@ -19,10 +19,11 @@
#include <asm/arch/sys_proto.h> #include <asm/arch/sys_proto.h>
//extern nand_info_t nand_info[CONFIG_SYS_MAX_NAND_DEVICE]; //extern nand_info_t nand_info[CONFIG_SYS_MAX_NAND_DEVICE];
static struct mtd_info *mtd;
static int is_badblock(struct mtd_info *mtd, loff_t offs, int allowbbt) static int is_badblock(struct mtd_info *mtd, loff_t offs, int allowbbt)
{ {
register struct nand_chip *chip = mtd->priv; register struct nand_chip *chip = mtd_to_nand(mtd);
unsigned int block = offs >> chip->phys_erase_shift; unsigned int block = offs >> chip->phys_erase_shift;
unsigned int page = offs >> chip->page_shift; unsigned int page = offs >> chip->page_shift;
unsigned long data_width = 4; unsigned long data_width = 4;
...@@ -51,9 +52,11 @@ int nand_spl_load_image(uint32_t offs, unsigned int size, void *buf) ...@@ -51,9 +52,11 @@ int nand_spl_load_image(uint32_t offs, unsigned int size, void *buf)
udelay(10000); udelay(10000);
//if (mxs_nand_init()) return -ENODEV; //if (mxs_nand_init()) return -ENODEV;
mtd = &nand_info[0]; //mtd = &nand_info[0];
//mtd.priv = &nand_chip; //mtd.priv = &nand_chip;
chip = mtd->priv; //chip = mtd->priv;
chip = mtd_to_nand(mtd);
page = offs >> chip->page_shift; page = offs >> chip->page_shift;
nand_page_per_block = mtd->erasesize / mtd->writesize; nand_page_per_block = mtd->erasesize / mtd->writesize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment