1. 02 6月, 2016 2 次提交
  2. 08 3月, 2016 2 次提交
  3. 19 11月, 2015 1 次提交
  4. 12 11月, 2015 2 次提交
  5. 27 10月, 2015 1 次提交
    • H
      mtd: fsl-quadspi: fix macro collision problems with READ/WRITE · 04850c4d
      Han Xu 提交于
      Change the READ/WRITE to FSL_READ/FSL_WRITE to resolve any possible
      namespace collisions with READ/WRITE macros (e.g., from <linux/fs.h>).
      
      Problems have been seen, for example, on mips:
      
      >> drivers/mtd/spi-nor/fsl-quadspi.c:186:5: error: 'LUT_0' undeclared (first use in this function)
            ((LUT_##ins) << INSTR0_SHIFT))
              ^
      >> drivers/mtd/spi-nor/fsl-quadspi.c:188:30: note: in expansion of macro 'LUT0'
      
      On SPARC:
      
      drivers/mtd/spi-nor/fsl-quadspi.c: In function 'fsl_qspi_init_lut':
      drivers/mtd/spi-nor/fsl-quadspi.c:369:1: error: 'LUT_0' undeclared (first use in this function)
      drivers/mtd/spi-nor/fsl-quadspi.c:418:1: error: pasting "LUT_" and "(" does not give a valid preprocessing token
      drivers/mtd/spi-nor/fsl-quadspi.c:418:2: error: implicit declaration of function 'LUT_'
      
      And surely on others.
      
      Fixes: d26a22d0 ("mtd: fsl-quadspi: allow building for other ARCHes with COMPILE_TEST")
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NHan Xu <b45815@freescale.com>
      [Brian: rewrote commit description]
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      04850c4d
  6. 20 10月, 2015 2 次提交
    • F
      mtd: fsl-quadspi: Include <linux/sizes.h> to avoid build error · 01a3c625
      Fabio Estevam 提交于
      Building for x86 results in the following build errors:
      
         drivers/mtd/spi-nor/fsl-quadspi.c: In function 'fsl_qspi_init_lut':
      >> drivers/mtd/spi-nor/fsl-quadspi.c:355:21: error: 'SZ_16M' undeclared (first use in this function)
           if (q->nor_size <= SZ_16M) {
                              ^
         drivers/mtd/spi-nor/fsl-quadspi.c:355:21: note: each undeclared identifier is reported only once for each function it appears in
         drivers/mtd/spi-nor/fsl-quadspi.c: In function 'fsl_qspi_read':
      >> drivers/mtd/spi-nor/fsl-quadspi.c:208:27: error: 'SZ_4M' undeclared (first use in this function)
          #define QUADSPI_MIN_IOMAP SZ_4M
                                    ^
      >> drivers/mtd/spi-nor/fsl-quadspi.c:845:25: note: in expansion of macro 'QUADSPI_MIN_IOMAP'
            q->memmap_len = len > QUADSPI_MIN_IOMAP ? len : QUADSPI_MIN_IOMAP;
      
      Explicitly include <linux/sizes.h> to fix the problem.
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      01a3c625
    • B
      mtd: fsl-quadspi: fix printk() format warning for size_t · a5c603a2
      Brian Norris 提交于
      Seen when compile-testing on non-32-bit arch:
      
          CC      drivers/mtd/spi-nor/fsl-quadspi.o
        drivers/mtd/spi-nor/fsl-quadspi.c: In function 'fsl_qspi_read':
        drivers/mtd/spi-nor/fsl-quadspi.c:873:2: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t' [-Wformat=]
          dev_dbg(q->dev, "cmd [%x],read from 0x%p, len:%d\n",
          ^
      
      Also drop the '0x' prefixing to the '%p' formatter, since %p already
      knows how to format pointers appropriately.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      Acked-by: NHan xu <han.xu@freescale.com>
      a5c603a2
  7. 12 9月, 2015 2 次提交
    • J
      mtd: spi-nor: Zap unneeded write_enable from write_reg · f9f3ce83
      Jagan Teki 提交于
      The 'write_enable' argument is unused and unneeded, so remove it from
      the API.
      Signed-off-by: NJagan Teki <jteki@openedev.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Han Xu <han.xu@freescale.com>
      [Brian: fixed for nxp-spifi.c]
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      f9f3ce83
    • M
      mtd: spi-nor: Decouple SPI NOR's device_node from controller device · 11bff0b7
      Marek Vasut 提交于
      The problem this patch is trying to address is such, that SPI NOR flash
      devices attached to a dedicated SPI NOR controller cannot read their
      properties from the associated struct device_node.
      
      A couple of facts first:
      1) Each SPI NOR flash has a struct spi_nor associated with it.
      2) Each SPI NOR flash has certain device properties associated
         with it, for example the OF property 'm25p,fast-read' is a
         good pick. These properties are used by the SPI NOR core to
         select which opcodes are sent to such SPI NOR flash. These
         properties are coming from spi_nor .dev->of_node .
      
      The problem is, that for SPI NOR controllers, the struct spi_nor .dev
      element points to the struct device of the SPI NOR controller, not the
      SPI NOR flash. Therefore, the associated dev->of_node also is the
      one of the controller and therefore the SPI NOR core code is trying to
      parse the SPI NOR controller's properties, not the properties of the
      SPI NOR flash.
      
      Note: The m25p80 driver is not affected, because the controller and
            the flash are the same device, so the associated device_node
            of the controller and the flash are the same.
      
      This patch adjusts the SPI NOR core such that the device_node is not
      picked from spi_nor .dev directly, but from a new separate spi_nor
      .flash_node element. This let's the SPI NOR controller drivers set up
      a different spi_nor .flash_node element for each SPI NOR flash.
      
      This patch also fixes the controller drivers to be compatible with
      this modification and correctly set the spi_nor .flash_node element.
      
      This patch is inspired by 5844feea
      mtd: nand: add common DT init code
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      11bff0b7
  8. 03 9月, 2015 3 次提交
  9. 07 8月, 2015 8 次提交
  10. 21 7月, 2015 1 次提交
  11. 24 6月, 2015 1 次提交
  12. 07 5月, 2015 1 次提交
  13. 31 3月, 2015 2 次提交
  14. 06 2月, 2015 4 次提交
  15. 21 1月, 2015 1 次提交
    • F
      mtd: fsl-quadspi: Fix module unbound · cfe4af3a
      Fabio Estevam 提交于
      When removing the fsl-quadspi module and running 'cat /proc/mtd' afterwards,
      we see garbage data like:
      
      $ rmmod  fsl-quadspi
      $ cat /proc/mtd
      dev:    size   erasesize  name
      mtd0: 00000000 00000000 "(null)"
      mtd0: 00000000 00000000 "(null)"
      mtd0: 00000000 00000000 "(null)"
      ...
      mtd0: a22296c6c756e28 00000000 "(null)"
      mtd0: a22296c6c756e28 3064746d "(null)"
      
      If we continue doing multiple module load/unload operations, then it will also
      lead to a kernel crash.
      
      The reason for this is due to the wrong mtd index used in
      mtd_device_unregister() in the remove function.
      
      We need to keep the mtd unregister index aligned with the one used in the probe
      function, which means we need to take into account the 'has_second_chip'
      property. By doing so we can guarantee that the mtd index is the same in the
      registration and unregistration functions.
      
      With this patch applied we can load/unload the fsl-quadspi driver several times
      and it will result in no crash.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Acked-by: NHuang Shijie <shijie.huang@intel.com>
      Tested-by: NFrank Li <Frank.Li@freescale.com>
      Acked-by: NAllen Xu <han.xu@freescale.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      cfe4af3a
  16. 16 1月, 2015 1 次提交
  17. 01 12月, 2014 1 次提交
  18. 05 11月, 2014 1 次提交
  19. 22 10月, 2014 2 次提交
  20. 20 10月, 2014 1 次提交
  21. 18 10月, 2014 1 次提交