29 Sep, 2014

1 commit

  • This "type" seems to be an extra hint for m25p80 about the flash. Some
    archs register flash_platform_data with "name" set to "m25p80" and then
    with a real flash name set in "type". It seems to be a trick specific
    to the m25p80 so let's move it out of spi-nor.
    Btw switch to the spi_nor_match_id instead of iterating spi_nor_ids.

    Signed-off-by: Rafał Miłecki
    Signed-off-by: Brian Norris

    Rafał Miłecki
     

23 Sep, 2014

1 commit

  • The ELM driver is only used by the OMAP NAND driver, so let's move it
    to the nand/ directory. Additionally, let's rename it to a less confusing
    name, so the module is built with a meaningful name, instead of the previous
    'elm.ko'.

    Acked-by: Roger Quadros
    Signed-off-by: Ezequiel Garcia
    Signed-off-by: Brian Norris

    Ezequiel García
     

20 Aug, 2014

1 commit

  • Fixed checkpatch warnings: "WARNING: Prefer seq_puts to seq_printf"

    This patch is created with reference to the ongoing lkml thread
    https://lkml.org/lkml/2014/7/15/646
    where Andrew Morton wrote:

    "
    - puts is presumably faster

    - puts doesn't go rogue if you accidentally pass it a "%".

    - this patch would actually make compiled object files few bytes smaller.
    Perhaps because seq_printf() is a varargs function, forcing the
    caller to pass args on the stack instead of in registers.
    "

    Signed-off-by: Samarth Parikh
    Signed-off-by: Brian Norris

    Samarth Parikh
     

21 Jul, 2014

1 commit


15 Jul, 2014

1 commit


06 Jul, 2014

2 commits


12 Jun, 2014

1 commit

  • Pull module updates from Rusty Russell:
    "Most of this is cleaning up various driver sysfs permissions so we can
    re-add the perm check (we unified the module param and sysfs checks,
    but the module ones were stronger so we weakened them temporarily).

    Param parsing gets documented, and also "--" now forces args to be
    handed to init (and ignored by the kernel).

    Module NX/RO protections get tightened: we now set them before calling
    parse_args()"

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    module: set nx before marking module MODULE_STATE_COMING.
    samples/kobject/: avoid world-writable sysfs files.
    drivers/hid/hid-picolcd_fb: avoid world-writable sysfs files.
    drivers/staging/speakup/: avoid world-writable sysfs files.
    drivers/regulator/virtual: avoid world-writable sysfs files.
    drivers/scsi/pm8001/pm8001_ctl.c: avoid world-writable sysfs files.
    drivers/hid/hid-lg4ff.c: avoid world-writable sysfs files.
    drivers/video/fbdev/sm501fb.c: avoid world-writable sysfs files.
    drivers/mtd/devices/docg3.c: avoid world-writable sysfs files.
    speakup: fix incorrect perms on speakup_acntsa.c
    cpumask.h: silence warning with -Wsign-compare
    Documentation: Update kernel-parameters.tx
    param: hand arguments after -- straight to init
    modpost: Fix resource leak in read_dump()

    Linus Torvalds
     

11 Jun, 2014

1 commit

  • Pull MTD updates from Brian Norris:
    - refactor m25p80.c driver for use as a general SPI NOR framework for
    other drivers which may speak to SPI NOR flash without providing full
    SPI support (i.e., not part of drivers/spi/)
    - new Freescale QuadSPI driver (utilizing new SPI NOR framework)
    - updates for the STMicro "FSM" SPI NOR driver
    - fix sync/flush behavior on mtd_blkdevs
    - fixup subpage write support on a few NAND drivers
    - correct the MTD OOB test for odd-sized OOB areas
    - add BCH-16 support for OMAP NAND
    - fix warnings and trivial refactoring
    - utilize new ECC DT bindings in pxa3xx NAND driver
    - new LPDDR NVM driver
    - address a few assorted bugs caught by Coverity
    - add new imx6sx support for GPMI NAND
    - use a bounce buffer for NAND when non-DMA-able buffers are used

    * tag 'for-linus-20140610' of git://git.infradead.org/linux-mtd: (77 commits)
    mtd: gpmi: add gpmi support for imx6sx
    mtd: maps: remove check for CONFIG_MTD_SUPERH_RESERVE
    mtd: bf5xx_nand: use the managed version of kzalloc
    mtd: pxa3xx_nand: make the driver work on big-endian systems
    mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
    mtd: nand: r852: correct write_buf loop bounds
    mtd: nand_bbt: handle error case for nand_create_badblock_pattern()
    mtd: nand_bbt: remove unused variable
    mtd: maps: sc520cdp: fix warnings
    mtd: slram: fix unused variable warning
    mtd: pfow: remove unused variable
    mtd: lpddr: fix Kconfig dependency, for I/O accessors
    mtd: nand: pxa3xx: Add supported ECC strength and step size to the DT binding
    mtd: nand: pxa3xx: Use ECC strength and step size devicetree binding
    mtd: nand: pxa3xx: Clean pxa_ecc_init() error handling
    mtd: nand: Warn the user if the selected ECC strength is too weak
    mtd: nand: omap: Documentation: How to select correct ECC scheme for your device ?
    mtd: nand: omap: add support for BCH16_ECC - NAND driver updates
    mtd: nand: omap: add support for BCH16_ECC - ELM driver updates
    mtd: nand: omap: add support for BCH16_ECC - GPMC driver updates
    ...

    Linus Torvalds
     

28 May, 2014

1 commit


21 May, 2014

2 commits


14 May, 2014

1 commit


13 May, 2014

2 commits


19 Apr, 2014

1 commit

  • shiraz.hashim@st.com email-id doesn't exist anymore as he has left the
    company. Replace ST's id with shiraz.linux.kernel@gmail.com.

    It also updates .mailmap file to fix address for 'git shortlog'.

    Signed-off-by: Viresh Kumar
    Cc: Shiraz Hashim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Viresh Kumar
     

17 Apr, 2014

2 commits

  • COMPILE_TEST allows us to build this driver on other arch'es. But not
    all arch'es have the right I/O accessors -- particularly, x86 is missing
    readsl() and writesl().

    So just restrict this driver to ARCH_STI. It's still buildable for a
    multiplatform ARM kernel, so it can get decent compile coverage.

    Signed-off-by: Brian Norris
    Acked-by: Lee Jones

    Brian Norris
     
  • Compile-testing for a 64-bit arch uncovers several bad casts:

    In file included from include/linux/linkage.h:4:0,
    from include/linux/kernel.h:6,
    from drivers/mtd/devices/st_spi_fsm.c:15:
    drivers/mtd/devices/st_spi_fsm.c: In function ‘stfsm_read_fifo’:
    drivers/mtd/devices/st_spi_fsm.c:758:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    BUG_ON((((uint32_t)buf) & 0x3) || (size & 0x3));
    ...

    Use uintptr_t instead of uint32_t, since it's guaranteed to be
    pointer-sized.

    We also see this warning, if size_t is not 32 bits wide:

    In file included from drivers/mtd/devices/st_spi_fsm.c:15:0:
    drivers/mtd/devices/st_spi_fsm.c: In function ‘stfsm_mtd_write’:
    include/linux/kernel.h:712:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
    (void) (&_min1 == &_min2); \
    ^
    drivers/mtd/devices/st_spi_fsm.c:1704:11: note: in expansion of macro ‘min’
    bytes = min(FLASH_PAGESIZE - page_offs, len);
    ^

    Just use min_t() to force the type conversion, since we don't really
    want to upgrade 'page_offs' and 'bytes' to size_t; they only should be
    handling
    Acked-by: Lee Jones

    Brian Norris
     

15 Apr, 2014

13 commits

  • Many of the serial_flash_cmds.h opcodes are duplicated with spi-nor.h.
    Let's begin to unify them.

    Signed-off-by: Brian Norris
    Acked-by: Lee Jones
    Reviewed-by: Marek Vasut

    Brian Norris
     
  • Begin to unify the differences between serial_flash_cmds.h and
    spi-nor.h.

    Signed-off-by: Brian Norris
    Acked-by: Lee Jones
    Reviewed-by: Marek Vasut

    Brian Norris
     
  • These are also in serial_flash_cmds.h. (FWIW, I didn't know the C
    preprocessor allowed redefinitions without warning like this.)

    Signed-off-by: Brian Norris
    Acked-by: Lee Jones
    Reviewed-by: Marek Vasut

    Brian Norris
     
  • I hear that this driver should depend on ARCH_STI, and that "SH" is not
    actually a real symbol. At the same time, let's allow compile-testing on
    other ARCH'es.

    Signed-off-by: Brian Norris
    Acked-by: Lee Jones
    Reviewed-by: Marek Vasut

    Brian Norris
     
  • Signed-off-by: Brian Norris
    Reviewed-by: Marek Vasut
    Acked-by: Huang Shijie

    Brian Norris
     
  • Qualify these with a better namespace, and prepare them for use in more
    drivers.

    Signed-off-by: Brian Norris
    Reviewed-by: Marek Vasut
    Acked-by: Huang Shijie

    Brian Norris
     
  • This patch adds support for the Macronix MX25L3255E device. Unlike the other
    Macronix devices we have seen, this device supports WRITE_1_4_4 at reasonable
    frequencies. Rather than masking out WRITE_1_4_4 support altogether, we now
    rely on the table parameters to indicate whether or not WRITE_1_4_4 should be
    used.

    Signed-off-by: Angus Clark
    Signed-off-by: Lee Jones
    Signed-off-by: Brian Norris

    Angus Clark
     
  • Add Spansion S25FL032P to the list of known devices.

    Signed-off-by: Angus Clark
    Signed-off-by: Lee Jones
    Signed-off-by: Brian Norris

    Angus Clark
     
  • This patch refactors the fsm_read_status() and fsm_write_status() code to
    support 1 or 2 byte operations, with a specified command. This allows us to
    remove device/register specific code, such as the N25Q fsm_wrvcr() function.

    The 'QE' configuration code is updated accordingly, with minor tweaks to ensure
    the register values are only written if actually required. One notable change
    in this area is that the 'W25Q_STATUS_QE' bit-field is now defined with respect
    to the 'SR2' register, rather than the combined 'SR1+SR2' register which is only
    used for write operations.

    Signed-off-by: Angus Clark
    Signed-off-by: Lee Jones
    Signed-off-by: Brian Norris

    Angus Clark
     
  • Update the configuration of the Macronix 'QE' bit, such that
    we only set or clear the bit if required.

    Signed-off-by: Angus Clark
    Signed-off-by: Lee Jones
    Signed-off-by: Brian Norris

    Angus Clark
     
  • Support for the Macronix 32-bit addressing scheme was originally developed using
    the MX25L25635E device. As is often the case, it was found that the presence of
    a "WAIT" instruction was required for the "EN4B/EX4B" FSM Sequence to complete.
    (It is known that the SPI FSM Controller makes certain undocumented assumptions
    regarding what constitutes a valid sequence.) However, further testing
    suggested that a small delay was required after issuing the "EX4B" command;
    without this delay, data corruptions were observed, consistent with the device
    not being ready to retrieve data. Although the issue was not fully understood,
    the workaround of adding a small delay was implemented, while awaiting
    clarification from Macronix.

    The same behaviour has now been found with a second Macronix device, the
    MX25L25655E. However, with this device, it seems that the delay is also
    required after the 'EN4B' commands. This discovery has prompted us to revisit
    the issue.

    Although still not conclusive, further tests have suggested that the issue is
    down to the SPI FSM Controller, rather than the Macronix devices. Furthermore,
    an alternative workaround has emerged which is to set the WAIT time to
    0x00000001, rather then 0x00000000. (Note, the WAIT instruction is used purely
    for the purpose of achieving "sequence validity", rather than actually
    implementing a delay!)

    The issue is now being investigated by the Design and Validation teams. In the
    meantime, we implement the alternative workaround, which reduces the effective
    delay from 1us to 1ns.

    Signed-off-by: Angus Clark
    Signed-off-by: Lee Jones
    Signed-off-by: Brian Norris

    Angus Clark
     
  • Add Macronix MX25L25655E to the list of known devices.

    Signed-off-by: Angus Clark
    Signed-off-by: Lee Jones
    Signed-off-by: Brian Norris

    Angus Clark
     
  • Use the new SPI nor framework, and rewrite the m25p80:
    (0) remove all the NOR comands.
    (1) change the m25p->command to an array.
    (2) implement the necessary hooks, such as m25p80_read/m25p80_write.

    Tested with the m25p32.
    Signed-off-by: Huang Shijie
    Acked-by: Marek Vasut
    [Brian: rebased]
    Signed-off-by: Brian Norris

    Brian Norris
     

26 Mar, 2014

4 commits

  • use "omap-elm" as DRIVER_NAME

    Signed-off-by: Pekon Gupta
    Reviewed-by: Ezequiel Garcia
    Signed-off-by: Brian Norris

    Pekon Gupta
     
  • ELM hardware can process up to maximum of 8 hannels in parallel for
    ECC error detection. Currently the number of channels getting configured for
    processing is static determined by macro ERROR_VECTOR_MAX. However, the actual
    number of channels that need to be processed is the ECC step number.
    This patch just avoids configuring extra unused channels.

    Signed-off-by: Pekon Gupta
    Reviewed-by: Ezequiel Garcia
    Signed-off-by: Brian Norris

    Pekon Gupta
     
  • This patch refactors elm_load_syndrome() to make it scalable for newer
    ECC schemes by removing scheme specific macros (like ECC_BYTES*xx),
    and instead using ECC control information passed during elm_config.

    Signed-off-by: Pekon Gupta
    Reviewed-by: Ezequiel Garcia
    Signed-off-by: Brian Norris

    Pekon Gupta
     
  • ELM hardware engine is used by BCH ecc-schemes for detecting and locating ECC
    errors. This patch adds the following checks for ELM hardware engine:

    - ELM internal buffers are of 1K,
    so it cannot process data with ecc-step-size > 1K.

    - ELM engine can execute upto maximum of 8 threads in parallel,
    so in *page-mode* (when complete page is processed in single iteration),
    ELM cannot support ecc-steps > 8.

    Signed-off-by: Pekon Gupta
    Reviewed-by: Ezequiel Garcia
    Signed-off-by: Brian Norris

    Pekon Gupta
     

20 Mar, 2014

5 commits