03 Jul, 2014

1 commit


04 Jan, 2014

1 commit


04 Feb, 2013

6 commits


16 Nov, 2012

1 commit

  • When the kernel parses the following cmdline

    #mtdparts=gpmi-nand:16m(boot),16m(kernel),1g(home),4g(test),-(usr)

    for a big nand chip Micron MT29F64G08AFAAAWP(8GB), we got the following wrong
    result:

    .............................................
    "mtd: partition size too small (0)"
    .............................................

    We can not get any partition.

    The "4g(test)" partition triggers a overflow of the "size". The memparse()
    returns 4g to the "size", but the size is "unsigned long" type, so a overflow
    occurs, the "size" becomes zero in the end.

    This patch changes the "size"/"offset" to "unsigned long long" type,
    and replaces the UINT_MAX with ULLONG_MAX for macros SIZE_REMAINING and
    OFFSET_CONTINUOUS.

    Signed-off-by: Huang Shijie
    Signed-off-by: Artem Bityutskiy

    Huang Shijie
     

15 Nov, 2012

1 commit

  • Simply 'parse_cmdline_partitions': the outer loop iterating over
    'partitions' is actually a search loop, it does not execute the inner
    loop for each partition, only for the matched partition.

    Let's break when search is successful, and move all inner code (relevant
    only for the matched partition) outside of the outer loop.

    Resulting code is much more readable, and makes the indent level sane.

    Signed-off-by: Shmulik Ladkani
    Signed-off-by: Artem Bityutskiy

    Shmulik Ladkani
     

29 Sep, 2012

4 commits

  • Huang Shijie explains:

    Assume we have a 1GiB(8Gib) NAND chip, and we set the partitions
    in the command line like this:
    #gpmi-nand:100m(boot),100m(kernel),1g(rootfs)

    In this case, the partition truncating occurs. The current code will
    get the following result:

    ----------------------------------
    root@freescale ~$ cat /proc/mtd
    dev: size erasesize name
    mtd0: 06400000 00040000 "boot"
    mtd1: 06400000 00040000 "kernel"
    ----------------------------------

    It is obvious that we lost the truncated partition `rootfs` which should
    be 824MiB in this case.

    Also, forbid 0-sized partitions.

    Signed-off-by: Shmulik Ladkani
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Shmulik Ladkani
     
  • Clean-up the driver a bit to make it easier to read and amend the coding style.
    Mostly these are changes like:

    if (a)
    {
    }

    =>

    if (a) {
    }

    Some extra blank lines were added.
    Indentation was changed to use tabs instead of spaces.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • This patch revises and fixes error handling in the command line mtd
    partitions parser. Namely:
    1. we ignored return code of 'mtdpart_setup_real()'.
    2. instead of returning 0 for failure and 1 for success, teach
    'mtdpart_setup_real()' to return real error codes.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • We do not have to initialize variables for .bss to 0 in Linux.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     

14 May, 2012

1 commit


08 Nov, 2011

1 commit

  • * git://git.infradead.org/mtd-2.6: (226 commits)
    mtd: tests: annotate as DANGEROUS in Kconfig
    mtd: tests: don't use mtd0 as a default
    mtd: clean up usage of MTD_DOCPROBE_ADDRESS
    jffs2: add compr=lzo and compr=zlib options
    jffs2: implement mount option parsing and compression overriding
    mtd: nand: initialize ops.mode
    mtd: provide an alias for the redboot module name
    mtd: m25p80: don't probe device which has status of 'disabled'
    mtd: nand_h1900 never worked
    mtd: Add DiskOnChip G3 support
    mtd: m25p80: add EON flash EN25Q32B into spi flash id table
    mtd: mark block device queue as non-rotational
    mtd: r852: make r852_pm_ops static
    mtd: m25p80: add support for at25df321a spi data flash
    mtd: mxc_nand: preset_v1_v2: unlock all NAND flash blocks
    mtd: nand: switch `check_pattern()' to standard `memcmp()'
    mtd: nand: invalidate cache on unaligned reads
    mtd: nand: do not scan bad blocks with NAND_BBT_NO_OOB set
    mtd: nand: wait to set BBT version
    mtd: nand: scrub BBT on ECC errors
    ...

    Fix up trivial conflicts:
    - arch/arm/mach-at91/board-usb-a9260.c
    Merged into board-usb-a926x.c
    - drivers/mtd/maps/lantiq-flash.c
    add_mtd_partitions -> mtd_device_register vs changed to use
    mtd_device_parse_register.

    Linus Torvalds
     

01 Nov, 2011

1 commit


11 Sep, 2011

2 commits


09 Aug, 2010

1 commit


25 Jun, 2009

1 commit


21 Mar, 2009

1 commit


18 Oct, 2008

1 commit


12 Jul, 2008

1 commit


05 Jun, 2008

1 commit

  • Once upon a time, the MTD repository was using CVS.

    This patch therefore removes all usages of the no longer updated CVS
    keywords from the MTD code.

    This also includes code that printed them to the user.

    Signed-off-by: Adrian Bunk
    Signed-off-by: David Woodhouse

    Adrian Bunk
     

23 Apr, 2008

1 commit


22 Apr, 2008

1 commit


03 Feb, 2008

1 commit

  • Patch for unlocking all Intel flash that has instant locking on power up.
    The patch has been tested on Intel M18, P30 and J3D Strata Flash.
    1. The automatic unlocking can be disabled for a particular partition
    in the map or the command line.
    a. For the bit mask in the map it should look like:
    .mask_flags = MTD_POWERUP_LOCK,
    b. For the command line parsing it should look like:
    mtdparts=0x80000(bootloader)lk
    2. This will only unlock parts with instant individual block locking.
    Intel parts with legacy unlocking will not be unlocked.

    Signed-off-by: Justin Treon
    Signed-off-by: Jared Hulbert
    Acked-by: Nicolas Pitre
    Signed-off-by: David Woodhouse

    Justin Treon