21 Mar, 2009

2 commits

  • - do not leave spin lock locked
    - initialise spin lock

    Signed-off-by: Adrian Hunter
    Acked-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Adrian Hunter
     
  • MTD's have both an index number and a name. Formerly,
    the MTD selected for mtdoops was done only by index
    number. With this patch, a name can be used instead.

    For example, the kernel command line:

    console=ttyMTD5

    selects MTD 5 for mtdoops. But now this is also possible:

    console=ttyMTD,log

    which selects the MTD named "log" for mtdoops.

    This has the advantage that partitions can be added or
    removed that would affect the MTD index number but not the
    name, without having to then change the kernel command line.

    Signed-off-by: Adrian Hunter
    Acked-by: Richard Purdie
    Acked-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Adrian Hunter
     

10 Dec, 2008

1 commit

  • MTD internal API presently uses 32-bit values to represent
    device size. This patch updates them to 64-bits but leaves
    the external API unchanged. Extending the external API
    is a separate issue for several reasons. First, no one
    needs it at the moment. Secondly, whether the implementation
    is done with IOCTLs, sysfs or both is still debated. Thirdly
    external API changes require the internal API to be accepted
    first.

    Note that although the MTD API will be able to support 64-bit
    device sizes, existing drivers do not and are not required
    to do so, although NAND base has been updated.

    In general, changing from 32-bit to 64-bit values cause little
    or no changes to the majority of the code with the following
    exceptions:
    - printk message formats
    - division and modulus of 64-bit values
    - NAND base support
    - 32-bit local variables used by mtdpart and mtdconcat
    - naughtily assuming one structure maps to another
    in MEMERASE ioctl

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

    Adrian Hunter
     

18 Oct, 2008

3 commits


22 Apr, 2008

1 commit


07 Feb, 2008

2 commits


03 Feb, 2008

4 commits


03 Dec, 2007

1 commit


22 Aug, 2007

1 commit

  • drivers/mtd/mtdoops.c: In function 'mtdoops_inc_counter':
    drivers/mtd/mtdoops.c:109: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
    drivers/mtd/mtdoops.c: In function 'mtdoops_console_sync':
    drivers/mtd/mtdoops.c:277: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'

    someone buy Dave an x86_64 box.

    Signed-off-by: Andrew Morton
    Signed-off-by: David Woodhouse

    Andrew Morton
     

11 Jul, 2007

1 commit

  • mtdoops wasn't ensuring data was flushed to flash in crash situations
    after recent changes in mainline kernels as tracking the
    oops_in_progress variable was no longer enough. We can use the "unblank"
    console call as a sync call to tell us to write out the buffer though.

    Therefore add a sync function to mtdoops and call this when console
    unblank events occur.

    Signed-off-by: Richard Purdie
    Signed-off-by: David Woodhouse

    Richard Purdie
     

29 Jun, 2007

1 commit

  • Kernel oops and panic messages are invaluable when debugging crashes.
    These messages often don't make it to flash based logging methods (say a
    syslog on jffs2) due to the overheads involved in writing to flash.

    This patch allows you to turn an MTD partition into a circular log
    buffer where kernel oops and panic messages are written to. The messages
    are obtained by registering a console driver and checking
    oops_in_progress. Erases are performed in advance to maximise the
    chances of a saving messages.

    To activate it, add console=ttyMTDx to the kernel commandline (where x
    is the mtd device number to use).

    Signed-off-by: Richard Purdie
    Signed-off-by: David Woodhouse

    Richard Purdie