aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-04-20 11:00:33 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-04-20 11:02:42 -0400
commit434b825e1fc9ef7971fc962734278ffbab36a1ab (patch)
tree361f3f17722a53a3eaf6d3b94623c2ab4517cfc7 /drivers/mtd/ubi
parent4bc1dca4b0eb4dfbf100895bfc1256f21e3c901a (diff)
UBI: print media information earlier
Print information about logicale eraseblock size, sub-page size and so on at early stage, befor an attempt to attach the MTD device was made. This is more convenient to do so because the attempt to attach may fail, and the information is never printed then. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r--drivers/mtd/ubi/build.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 1e0e4e689d3e..e8578ca422ff 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -606,8 +606,16 @@ static int io_init(struct ubi_device *ubi)
606 ubi->ro_mode = 1; 606 ubi->ro_mode = 1;
607 } 607 }
608 608
609 dbg_msg("leb_size %d", ubi->leb_size); 609 ubi_msg("physical eraseblock size: %d bytes (%d KiB)",
610 dbg_msg("ro_mode %d", ubi->ro_mode); 610 ubi->peb_size, ubi->peb_size >> 10);
611 ubi_msg("logical eraseblock size: %d bytes", ubi->leb_size);
612 ubi_msg("smallest flash I/O unit: %d", ubi->min_io_size);
613 if (ubi->hdrs_min_io_size != ubi->min_io_size)
614 ubi_msg("sub-page size: %d",
615 ubi->hdrs_min_io_size);
616 ubi_msg("VID header offset: %d (aligned %d)",
617 ubi->vid_hdr_offset, ubi->vid_hdr_aloffset);
618 ubi_msg("data offset: %d", ubi->leb_start);
611 619
612 /* 620 /*
613 * Note, ideally, we have to initialize ubi->bad_peb_count here. But 621 * Note, ideally, we have to initialize ubi->bad_peb_count here. But
@@ -804,15 +812,8 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, int vid_hdr_offset)
804 ubi_msg("attached mtd%d to ubi%d", mtd->index, ubi_num); 812 ubi_msg("attached mtd%d to ubi%d", mtd->index, ubi_num);
805 ubi_msg("MTD device name: \"%s\"", mtd->name); 813 ubi_msg("MTD device name: \"%s\"", mtd->name);
806 ubi_msg("MTD device size: %llu MiB", ubi->flash_size >> 20); 814 ubi_msg("MTD device size: %llu MiB", ubi->flash_size >> 20);
807 ubi_msg("physical eraseblock size: %d bytes (%d KiB)",
808 ubi->peb_size, ubi->peb_size >> 10);
809 ubi_msg("logical eraseblock size: %d bytes", ubi->leb_size);
810 ubi_msg("number of good PEBs: %d", ubi->good_peb_count); 815 ubi_msg("number of good PEBs: %d", ubi->good_peb_count);
811 ubi_msg("number of bad PEBs: %d", ubi->bad_peb_count); 816 ubi_msg("number of bad PEBs: %d", ubi->bad_peb_count);
812 ubi_msg("smallest flash I/O unit: %d", ubi->min_io_size);
813 ubi_msg("VID header offset: %d (aligned %d)",
814 ubi->vid_hdr_offset, ubi->vid_hdr_aloffset);
815 ubi_msg("data offset: %d", ubi->leb_start);
816 ubi_msg("max. allowed volumes: %d", ubi->vtbl_slots); 817 ubi_msg("max. allowed volumes: %d", ubi->vtbl_slots);
817 ubi_msg("wear-leveling threshold: %d", CONFIG_MTD_UBI_WL_THRESHOLD); 818 ubi_msg("wear-leveling threshold: %d", CONFIG_MTD_UBI_WL_THRESHOLD);
818 ubi_msg("number of internal volumes: %d", UBI_INT_VOL_COUNT); 819 ubi_msg("number of internal volumes: %d", UBI_INT_VOL_COUNT);