diff options
author | Justin Waters <justin.waters@timesys.com> | 2013-04-24 17:38:39 -0400 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2013-04-24 17:38:39 -0400 |
commit | 75c641ece39c136001340df61f0ad57028ce4ffc (patch) | |
tree | e5f2c5f5764770a34d0e39b5eace575fd4751527 /drivers/mtd/nand/nand.c | |
parent | 1341f103ac87882633b019a5a137056818234248 (diff) |
LogicPD Support for OMAP3/DM3/AM3 boards 2.1 Update
Diffstat (limited to 'drivers/mtd/nand/nand.c')
-rw-r--r-- | drivers/mtd/nand/nand.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c index d987f4c85c8..8a623e84808 100644 --- a/drivers/mtd/nand/nand.c +++ b/drivers/mtd/nand/nand.c @@ -77,17 +77,22 @@ static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand, } +unsigned int mtd_nand_size; +unsigned int nand_size(void) +{ + return mtd_nand_size; +} + void nand_init(void) { int i; - unsigned int size = 0; for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++) { nand_init_chip(&nand_info[i], &nand_chip[i], base_address[i]); - size += nand_info[i].size / 1024; + mtd_nand_size += nand_info[i].size / 1024; if (nand_curr_device == -1) nand_curr_device = i; } - printf("%u MiB\n", size / 1024); + printf("%u MiB\n", mtd_nand_size / 1024); #ifdef CONFIG_SYS_NAND_SELECT_DEVICE /* |