14 Mar, 2011

1 commit

  • * git://git.infradead.org/users/dwmw2/mtd-2.6.38:
    mtd: add "platform:" prefix for platform modalias
    mtd: mtd_blkdevs: fix double free on error path
    mtd: amd76xrom: fix oops at boot when resources are not available
    mtd: fix race in cfi_cmdset_0001 driver
    mtd: jedec_probe: initialise make sector erase command variable
    mtd: jedec_probe: Change variable name from cfi_p to cfi

    Linus Torvalds
     

11 Mar, 2011

6 commits

  • Since 43cc71eed1250755986da4c0f9898f9a635cb3bf (platform: prefix MODALIAS
    with "platform:"), the platform modalias is prefixed with "platform:".

    Signed-off-by: Axel Lin
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse
    Cc: stable@kernel.org

    Axel Lin
     
  • This one liner patch fixes double free that will occur if add_mtd_blktrans_dev
    fails. On failure it frees the input argument, but all its users also free it
    on error which is natural thing to do. Thus don't free it.

    All credit for finding that bug belongs to reporters of the bug in the android bugzilla
    http://code.google.com/p/android/issues/detail?id=13761

    Commit message tweaked by Artem.

    Signed-off-by: Maxim Levitsky
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse
    Cc: stable@kernel.org

    Maxim Levitsky
     
  • For some unknown reasons resources needed by amd76xrom driver can be
    unavailable. And instead of returning an error, the driver keeps going
    and crash the kernel. This patch fixes the problem by making the driver
    return -EBUSY if the resources are not available.

    Commit messages tweaked by Artem.

    Reported-by: Russell Whitaker
    Signed-off-by: Stanislaw Gruszka
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse
    Cc: stable@kernel.org

    Stanislaw Gruszka
     
  • As inval_cache_and_wait_for_operation() drop and reclaim the lock
    to invalidate the cache, some other thread may suspend the operation
    before reaching the for(;;) loop. Therefore the loop must start with
    checking the chip->state before reading status from the chip.

    Signed-off-by: Joakim Tjernlund
    Acked-by: Michael Cashwell
    Acked-by: Stefan Bigler
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse
    Cc: stable@kernel.org

    Joakim Tjernlund
     
  • In the commit 08968041bef437ec363623cd3218c2b083537ada
    (mtd: cfi_cmdset_0002: make sector erase command variable)
    introdused a field sector_erase_cmd. In the same commit initialisation
    of cfi->sector_erase_cmd made in cfi_chip_setup()
    (file drivers/mtd/chips/cfi_probe.c), so the CFI chip has no problem:

    ...
    cfi->cfi_mode = CFI_MODE_CFI;
    cfi->sector_erase_cmd = CMD(0x30);
    ...

    But for the JEDEC chips this initialisation is not carried out,
    so the JEDEC chips have sector_erase_cmd == 0.

    This patch adds the missing initialisation.

    Signed-off-by: Antony Pavlov
    Acked-by: Guillaume LECERF
    Signed-off-by: David Woodhouse
    CC: stable@kernel.org

    Antony Pavlov
     
  • In the following commit, we'll need to use the CMD() macro in order to
    fix the initialisation of the sector_erase_cmd field. That requires the
    local variable to be called 'cfi', so change it first in a simple patch.

    Signed-off-by: Antony Pavlov
    Acked-by: Guillaume LECERF
    Signed-off-by: David Woodhouse
    CC: stable@kernel.org

    Antony Pavlov
     

17 Feb, 2011

1 commit

  • There are two spellings in use for 'freeze' + 'able' - 'freezable' and
    'freezeable'. The former is the more prominent one. The latter is
    mostly used by workqueue and in a few other odd places. Unify the
    spelling to 'freezable'.

    Signed-off-by: Tejun Heo
    Reported-by: Alan Stern
    Acked-by: "Rafael J. Wysocki"
    Acked-by: Greg Kroah-Hartman
    Acked-by: Dmitry Torokhov
    Cc: David Woodhouse
    Cc: Alex Dubov
    Cc: "David S. Miller"
    Cc: Steven Whitehouse

    Tejun Heo
     

30 Jan, 2011

1 commit

  • This reverts commit a121f643993474548fe98144514c50dd4f3dbe76.

    Unfortunately, this commit breaks UBIFS backward compatibility and
    makes new UBIFS refuse older UBIFS-formatted media:

    UBIFS error: validate_sb: min. I/O unit mismatch: 8 in superblock, 64 real

    Thus, we have to revert this patch and work on a better solution.

    Reported-by: Holger Brunck
    Signed-off-by: Artem Bityutskiy

    Artem Bityutskiy
     

18 Jan, 2011

1 commit

  • * git://git.infradead.org/mtd-2.6: (59 commits)
    mtd: mtdpart: disallow reading OOB past the end of the partition
    mtd: pxa3xx_nand: NULL dereference in pxa3xx_nand_probe
    UBI: use mtd->writebufsize to set minimal I/O unit size
    mtd: initialize writebufsize in the MTD object of a partition
    mtd: onenand: add mtd->writebufsize initialization
    mtd: nand: add mtd->writebufsize initialization
    mtd: cfi: add writebufsize initialization
    mtd: add writebufsize field to mtd_info struct
    mtd: OneNAND: OMAP2/3: prevent regulator sleeping while OneNAND is in use
    mtd: OneNAND: add enable / disable methods to onenand_chip
    mtd: m25p80: Fix JEDEC ID for AT26DF321
    mtd: txx9ndfmc: limit transfer bytes to 512 (ECC provides 6 bytes max)
    mtd: cfi_cmdset_0002: add support for Samsung K8D3x16UxC NOR chips
    mtd: cfi_cmdset_0002: add support for Samsung K8D6x16UxM NOR chips
    mtd: nand: ams-delta: drop omap_read/write, use ioremap
    mtd: m25p80: add debugging trace in sst_write
    mtd: nand: ams-delta: select for built-in by default
    mtd: OneNAND: lighten scary initial bad block messages
    mtd: OneNAND: OMAP2/3: add support for command line partitioning
    mtd: nand: rearrange ONFI revision checking, add ONFI 2.3
    ...

    Fix up trivial conflict in drivers/mtd/Kconfig as per DavidW.

    Linus Torvalds
     

17 Jan, 2011

2 commits

  • This patch fixes the mtdpart bug which allows users reading OOB past the
    end of the partition. This happens because 'part_read_oob()' allows reading
    multiple OOB areas in one go, and mtdparts does not validate the OOB
    length in the request.

    Although there is such check in 'nand_do_read_oob()' in nand_base.c, but
    it checks that we do not read past the flash chip, not the partition,
    because in nand_base.c we work with the whole chip (e.g., mtd->size
    in nand_base.c is the size of the whole chip). So this check cannot
    be done correctly in nand_base.c and should be instead done in mtdparts.c.

    This problem was reported by Jason Liu and reproduced
    with nandsim:

    $ modprobe nandsim first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 \
    fourth_id_byte=0x15 parts=0x400,0x400
    $ modprobe nandsim mtd_oobtest.ko dev=0
    $ dmesg
    = snip =
    mtd_oobtest: attempting to read past end of device
    mtd_oobtest: an error is expected...
    mtd_oobtest: error: read past end of device
    = snip =
    mtd_oobtest: finished with 2 errors

    Reported-by: Jason Liu
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     
  • Instead of splitting refcount between (per-cpu) mnt_count
    and (SMP-only) mnt_longrefs, make all references contribute
    to mnt_count again and keep track of how many are longterm
    ones.

    Accounting rules for longterm count:
    * 1 for each fs_struct.root.mnt
    * 1 for each fs_struct.pwd.mnt
    * 1 for having non-NULL ->mnt_ns
    * decrement to 0 happens only under vfsmount lock exclusive

    That allows nice common case for mntput() - since we can't drop the
    final reference until after mnt_longterm has reached 0 due to the rules
    above, mntput() can grab vfsmount lock shared and check mnt_longterm.
    If it turns out to be non-zero (which is the common case), we know
    that this is not the final mntput() and can just blindly decrement
    percpu mnt_count. Otherwise we grab vfsmount lock exclusive and
    do usual decrement-and-check of percpu mnt_count.

    For fs_struct.c we have mnt_make_longterm() and mnt_make_shortterm();
    namespace.c uses the latter in places where we don't already hold
    vfsmount lock exclusive and opencodes a few remaining spots where
    we need to manipulate mnt_longterm.

    Note that we mostly revert the code outside of fs/namespace.c back
    to what we used to have; in particular, normal code doesn't need
    to care about two kinds of references, etc. And we get to keep
    the optimization Nick's variant had bought us...

    Signed-off-by: Al Viro

    Al Viro
     

14 Jan, 2011

4 commits

  • * 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block: (43 commits)
    block: ensure that completion error gets properly traced
    blktrace: add missing probe argument to block_bio_complete
    block cfq: don't use atomic_t for cfq_group
    block cfq: don't use atomic_t for cfq_queue
    block: trace event block fix unassigned field
    block: add internal hd part table references
    block: fix accounting bug on cross partition merges
    kref: add kref_test_and_get
    bio-integrity: mark kintegrityd_wq highpri and CPU intensive
    block: make kblockd_workqueue smarter
    Revert "sd: implement sd_check_events()"
    block: Clean up exit_io_context() source code.
    Fix compile warnings due to missing removal of a 'ret' variable
    fs/block: type signature of major_to_index(int) to major_to_index(unsigned)
    block: convert !IS_ERR(p) && p to !IS_ERR_NOR_NULL(p)
    cfq-iosched: don't check cfqg in choose_service_tree()
    fs/splice: Pull buf->ops->confirm() from splice_from_pipe actors
    cdrom: export cdrom_check_events()
    sd: implement sd_check_events()
    sr: implement sr_check_events()
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (41 commits)
    fs: add documentation on fallocate hole punching
    Gfs2: fail if we try to use hole punch
    Btrfs: fail if we try to use hole punch
    Ext4: fail if we try to use hole punch
    Ocfs2: handle hole punching via fallocate properly
    XFS: handle hole punching via fallocate properly
    fs: add hole punching to fallocate
    vfs: pass struct file to do_truncate on O_TRUNC opens (try #2)
    fix signedness mess in rw_verify_area() on 64bit architectures
    fs: fix kernel-doc for dcache::prepend_path
    fs: fix kernel-doc for dcache::d_validate
    sanitize ecryptfs ->mount()
    switch afs
    move internal-only parts of ncpfs headers to fs/ncpfs
    switch ncpfs
    switch 9p
    pass default dentry_operations to mount_pseudo()
    switch hostfs
    switch affs
    switch configfs
    ...

    Linus Torvalds
     
  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    Documentation/trace/events.txt: Remove obsolete sched_signal_send.
    writeback: fix global_dirty_limits comment runtime -> real-time
    ppc: fix comment typo singal -> signal
    drivers: fix comment typo diable -> disable.
    m68k: fix comment typo diable -> disable.
    wireless: comment typo fix diable -> disable.
    media: comment typo fix diable -> disable.
    remove doc for obsolete dynamic-printk kernel-parameter
    remove extraneous 'is' from Documentation/iostats.txt
    Fix spelling milisec -> ms in snd_ps3 module parameter description
    Fix spelling mistakes in comments
    Revert conflicting V4L changes
    i7core_edac: fix typos in comments
    mm/rmap.c: fix comment
    sound, ca0106: Fix assignment to 'channel'.
    hrtimer: fix a typo in comment
    init/Kconfig: fix typo
    anon_inodes: fix wrong function name in comment
    fix comment typos concerning "consistent"
    poll: fix a typo in comment
    ...

    Fix up trivial conflicts in:
    - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c)
    - fs/ext4/ext4.h

    Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.

    Linus Torvalds
     
  • This series aims to develop logging facility for enterprise use.

    It is important to save kernel messages reliably on enterprise system
    because they are helpful for diagnosing system.

    This series add kmsg_dump() to the paths loosing kernel messages. The use
    case is the following.

    [Use case of reboot/poweroff/halt/emergency_restart]

    My company has often experienced the followings in our support service.
    - Customer's system suddenly reboots.
    - Customers ask us to investigate the reason of the reboot.

    We recognize the fact itself because boot messages remain in
    /var/log/messages. However, we can't investigate the reason why the
    system rebooted, because the last messages don't remain. And off course
    we can't explain the reason.

    We can solve above problem with this patch as follows.

    Case1: reboot with command
    - We can see "Restarting system with command:" or ""Restarting system.".

    Case2: halt with command
    - We can see "System halted.".

    Case3: poweroff with command
    - We can see " Power down.".

    Case4: emergency_restart with sysrq.
    - We can see "Sysrq:" outputted in __handle_sysrq().

    Case5: emergency_restart with softdog.
    - We can see "Initiating system reboot" in watchdog_fire().

    So, we can distinguish the reason of reboot, poweroff, halt and emergency_restart.

    If customer executed reboot command, you may think the customer should
    know the fact. However, they often claim they don't execute the command
    when they rebooted system by mistake.

    No message remains on the current Linux kernel, so we can't show the proof
    to the customer. This patch improves this situation.

    This patch:

    Alters mtdoops and ramoops to perform their actions only for
    KMSG_DUMP_PANIC, KMSG_DUMP_OOPS and KMSG_DUMP_KEXEC because they would
    like to log crashes only.

    Signed-off-by: Seiji Aguchi
    Cc: David Woodhouse
    Cc: Marco Stornelli
    Reviewed-by: Artem Bityutskiy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Seiji Aguchi
     

13 Jan, 2011

1 commit


11 Jan, 2011

1 commit

  • * 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (29 commits)
    of/flattree: forward declare struct device_node in of_fdt.h
    ipmi: explicitly include of_address.h and of_irq.h
    sparc: explicitly cast negative phandle checks to s32
    powerpc/405: Fix missing #{address,size}-cells in i2c node
    powerpc/5200: dts: refactor dts files
    powerpc/5200: dts: Change combatible strings on localbus
    powerpc/5200: dts: remove unused properties
    powerpc/5200: dts: rename nodes to prepare for refactoring dts files
    of/flattree: Update dtc to current mainline.
    of/device: Don't register disabled devices
    powerpc/dts: fix syntax bugs in bluestone.dts
    of: Fixes for OF probing on little endian systems
    of: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
    of/flattree: Add of_flat_dt_match() helper function
    of_serial: explicitly include of_irq.h
    of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree
    of/flattree: Reorder unflatten_dt_node
    of/flattree: Refactor unflatten_dt_node
    of/flattree: Add non-boottime device tree functions
    of/flattree: Add Kconfig for EARLY_FLATTREE
    ...

    Fix up trivial conflict in arch/sparc/prom/tree_32.c as per Grant.

    Linus Torvalds
     

08 Jan, 2011

1 commit

  • …t/npiggin/linux-npiggin

    * 'vfs-scale-working' of git://git.kernel.org/pub/scm/linux/kernel/git/npiggin/linux-npiggin: (57 commits)
    fs: scale mntget/mntput
    fs: rename vfsmount counter helpers
    fs: implement faster dentry memcmp
    fs: prefetch inode data in dcache lookup
    fs: improve scalability of pseudo filesystems
    fs: dcache per-inode inode alias locking
    fs: dcache per-bucket dcache hash locking
    bit_spinlock: add required includes
    kernel: add bl_list
    xfs: provide simple rcu-walk ACL implementation
    btrfs: provide simple rcu-walk ACL implementation
    ext2,3,4: provide simple rcu-walk ACL implementation
    fs: provide simple rcu-walk generic_check_acl implementation
    fs: provide rcu-walk aware permission i_ops
    fs: rcu-walk aware d_revalidate method
    fs: cache optimise dentry and inode for rcu-walk
    fs: dcache reduce branches in lookup path
    fs: dcache remove d_mounted
    fs: fs_struct use seqlock
    fs: rcu-walk for path lookup
    ...

    Linus Torvalds
     

07 Jan, 2011

1 commit

  • The problem that this patch aims to fix is vfsmount refcounting scalability.
    We need to take a reference on the vfsmount for every successful path lookup,
    which often go to the same mount point.

    The fundamental difficulty is that a "simple" reference count can never be made
    scalable, because any time a reference is dropped, we must check whether that
    was the last reference. To do that requires communication with all other CPUs
    that may have taken a reference count.

    We can make refcounts more scalable in a couple of ways, involving keeping
    distributed counters, and checking for the global-zero condition less
    frequently.

    - check the global sum once every interval (this will delay zero detection
    for some interval, so it's probably a showstopper for vfsmounts).

    - keep a local count and only taking the global sum when local reaches 0 (this
    is difficult for vfsmounts, because we can't hold preempt off for the life of
    a reference, so a counter would need to be per-thread or tied strongly to a
    particular CPU which requires more locking).

    - keep a local difference of increments and decrements, which allows us to sum
    the total difference and hence find the refcount when summing all CPUs. Then,
    keep a single integer "long" refcount for slow and long lasting references,
    and only take the global sum of local counters when the long refcount is 0.

    This last scheme is what I implemented here. Attached mounts and process root
    and working directory references are "long" references, and everything else is
    a short reference.

    This allows scalable vfsmount references during path walking over mounted
    subtrees and unattached (lazy umounted) mounts with processes still running
    in them.

    This results in one fewer atomic op in the fastpath: mntget is now just a
    per-CPU inc, rather than an atomic inc; and mntput just requires a spinlock
    and non-atomic decrement in the common case. However code is otherwise bigger
    and heavier, so single threaded performance is basically a wash.

    Signed-off-by: Nick Piggin

    Nick Piggin
     

06 Jan, 2011

20 commits

  • "info->cmdset" gets dereferenced in __readid() so it needs to be
    initialized earlier in the function. This bug was introduced in
    18c81b1828f8 "mtd: pxa3xx_nand: remove the flash info in driver
    structure".

    Cc: stable@kernel.org [2.6.37+]
    Reported-and-tested-by: Sven Neumann
    Signed-off-by: Dan Carpenter
    Signed-off-by: David Woodhouse

    Dan Carpenter
     
  • Previously we used mtd->writesize field to set UBI's minimal
    I/O unit size. This sometimes caused UBIFS recovery issues
    when mounting an uncleanly unmounted UBIFS partition on NOR
    flash since mtd->writesize is 1 byte for NOR flash. The
    MTD CFI driver however often performs writing multiple
    bytes in one programming operation using the chip's write
    buffer. We have to use the size of this write buffer as
    a minimal I/O unit size for UBI on NOR flash to fix the
    observed UBIFS recovery issues.

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

    Anatolij Gustschin
     
  • Propagate the writebufsize to the partition's MTD object so
    that UBI can set correct value for it's minimal I/O size
    using the writebufsize field of MTD object of the partition.

    By previous patches we added proper writebufsize field
    initialization. Next patch can now change UBI to use
    this field for setting the minimal I/O size.

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

    Anatolij Gustschin
     
  • Initialize mtd->writebufsize to be equal to mtd->writesize.

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

    Anatolij Gustschin
     
  • Initialize mtd->writebufsize to be equal to mtd->writesize.

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

    Anatolij Gustschin
     
  • Initialize mtd->writebufsize to the value obtained
    by CFI query command at probe time.

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

    Anatolij Gustschin
     
  • Prevent OneNAND's voltage regulator from going to sleep while
    OneNAND is in use, by explicitly enabling and disabling the
    regulator as appropriate.

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

    Adrian Hunter
     
  • Add enable / disable methods called from get_device() / release_device().
    These can be used, for example, to allow the driver to prevent the voltage
    regulator from being put to sleep while OneNAND is in use.

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

    Adrian Hunter
     
  • The last byte of the ID should be zero for this chip. Was added in
    commit d0e8c47c58575b9131e786edb488fd029eba443e . Reported by Tomi
    Varjo.

    Signed-off-by: Aleksandr Koltsoff
    Signed-off-by: David Woodhouse

    Aleksandr Koltsoff
     
  • See commit: c0cbfd0e81d879a950ba6f0df3f75ea30c5ab16e
    Using __nand_correct_data() helper function, this driver can read 512
    byte (with 6 byte ECC) at a time.

    This is correct, but not more:
    With NAND chips providing page sizes > 512 Bytes
    chip->ecc.bytes are calculated > 6 in txx9ndfmc_nand_scan.
    According the data sheet there are (only) 6 bytes ECC available.

    After applying the patch a Hynix 512M*8 with 2KiB page size could be
    successfully formatted and used with an ubifs file system.

    Signed-off-by: Ralf Roesch
    Signed-off-by: Artem Bityutskiy
    Acked-by: Atsushi Nemoto
    Signed-off-by: David Woodhouse

    Ralf Rösch
     
  • These chips report CFI v3.3 [1], so patch them on the fly to the more
    correct v1.3.
    Discussed and tested by the OpenWRT people [2].

    [1] http://www.samsung.com/global/system/business/semiconductor/product/2007/6/11/NORFlash/32Mbit/K8D3216UBC/ds_K8D3x16UxC_rev17.pdf
    [2] https://dev.openwrt.org/ticket/866

    Signed-off-by: Guillaume LECERF
    Acked-by: Wolfram Sang
    Signed-off-by: David Woodhouse

    Guillaume LECERF
     
  • These chips report CFI v0.0 [1], so extend cfi_fixup_major_minor()
    to patch all Samsung chips from 0.0 to 1.0.
    Discussed and tested by the OpenWRT people [2].

    [1] http://www.samsung.com/global/system/business/semiconductor/product/2007/6/11/NORFlash/64Mbit/K8D6316UTM/ds_K8D6x16UxM_rev16.pdf
    [2] https://dev.openwrt.org/ticket/7348

    Signed-off-by: Guillaume LECERF
    Acked-by: Wolfram Sang
    Signed-off-by: David Woodhouse

    Guillaume LECERF
     
  • There is a common requirement for not using OMAP specific omap_readw() /
    omap_writew() function calls in drivers/, but replace them with
    readw() / writew() on ioremap()ped addresses passed from arch/ instead.

    The patch implements this idea for the Amstrad Delta NAND driver. To be
    able to use the modified driver, the board file is updated with the
    platform device I/O resource declaration, which is passed from there.

    Created and tested against linux-2.6.37-rc5, on top of recent patch
    'MTD: NAND: ams-delta: convert to platform driver'.

    Signed-off-by: Janusz Krzysztofik
    Acked-by: Tony Lindgren
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Janusz Krzysztofik
     
  • Add a DEBUG(MTD_DEBUG_LEVEL2, ..) trace at beginning of sst_write() function as
    it is done in m25p80_write() function.

    Signed-off-by: Nicolas Ferre
    Signed-off-by: David Woodhouse

    Nicolas Ferre
     
  • Now that the Amstrad Delta NAND driver is converted to a platform driver,
    which prevents it from interfering with other unrelated hardware in multiple
    OMAP1 cpu and machine configurations, it can be automatically configured for
    being built into the kernel if the Amstrad Delta board is also selected.

    Signed-off-by: Janusz Krzysztofik
    Signed-off-by: David Woodhouse

    Janusz Krzysztofik
     
  • Initial bad blocks are normal but the messages look like
    errors. Make the messages less scary, make the main
    message an informational message not a warning, make the
    message displaying registers a debug message and include
    the address there instead of in the informational message.

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

    Adrian Hunter
     
  • Add the ability to parse MTD partition information from the
    kernel command line.

    Note that a pointless BUG_ON is removed, as are redundant
    calls to 'del_mtd_partitions()' and 'del_mtd_device()'
    because they are also done by 'onenand_release()'.

    Finally note that 'add_mtd_device()' returns 1 on failure
    so the error condition was incorrect.

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

    Adrian Hunter
     
  • In checking for the ONFI revision, the first conditional (for checking
    "unsupported" ONFI) seems unnecessary. All ONFI revisions should be
    backwards-compatible; even if this is not the case on some newer ONFI
    revision, it should simply fail the second version-checking if-else block
    (i.e., the bit-fields for 1.0, 2.0, etc. would not be set to 1). Thus, we
    move our "unsupported" condition after having checked each bit field.

    Also, it's simple enough to add a condition for ONFI revision 2.3. Note
    that this does *NOT* mean we handle all new features of ONFI versions
    above 1.0.

    Signed-off-by: Brian Norris
    Acked-by: Florian Fainelli
    Signed-off-by: David Woodhouse

    Brian Norris
     
  • We have the order of the conditional wrong for choosing the ONFI chip name
    vs. the ID table name. Without this fix, we will almost *always* choose a
    NULL string to print out instead of the correct one.

    This has already been suggested by Matthieu Castet.

    Signed-off-by: Brian Norris
    Acked-by: Florian Fainelli
    Signed-off-by: David Woodhouse

    Brian Norris
     
  • In its current form, the driver may interfere with different hardware on
    different boards if built into the kernel, hence is not suitable for
    inclusion into a defconfig, inteded to be usable with multiple OMAP1 cpu and
    machine types.

    Convert it to a platform driver, that should be free from this issue.

    Created and tested against linux-2.6.37-rc5 on Amstrad Delta.

    Signed-off-by: Janusz Krzysztofik
    Acked-by: Tony Lindgren
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Janusz Krzysztofik