1. 05 Dec, 2022 2 commits
    • Miquel Raynal's avatar
      Merge tag 'spi-nor/for-6.2' into mtd/next · a34506e0
      Miquel Raynal authored
      SPI NOR core changes:
      * Add support for flash reset using the dt reset-gpios property.
      * Update hwcaps.mask to include 8D-8D-8D read and page program ops
        when xSPI profile 1.0 table is defined.
      * Bypass zero erase size in spi_nor_find_best_erase_type().
      * Fix select_uniform_erase to skip 0 erase size
      * Add generic flash driver. If a flash is not found in the flash_info
        array, fall back to the generic flash driver which is described solely
        by the flash's SFDP tables.
      * Fix the number of bytes for the dummy cycles in
        spi_nor_spimem_check_readop().
      * Introduce SPI_NOR_QUAD_PP flag, as PP_1_1_4 is not SFDP discoverable.
      
      SPI NOR manufacturer drivers changes:
      * Spansion:
        - use PARSE_SFDP for s28hs512t,
        - add support for s28hl512t, s28hl01gt, and s28hs01gt.
      * Gigadevice: Replace default_init() with post_bfpt() for gd25q256.
      * Micron - ST: Enable locking for mt25qu256a.
      * Winbond: Add support for W25Q512NW-IQ.
      * ISSI: Use PARSE_SFDP and SPI_NOR_QUAD_PP.
      
      Fix merge conflict in the jedec,spi-nor bindings.
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      a34506e0
    • Miquel Raynal's avatar
      Merge tag 'nand/for-6.2' into mtd/next · 1d46f1ae
      Miquel Raynal authored
      Raw NAND core changes:
      * Drop obsolete dependencies on COMPILE_TEST
      * MAINTAINERS: rectify entry for MESON NAND controller bindings
      * Drop EXPORT_SYMBOL_GPL for nanddev_erase()
      
      Raw NAND driver changes:
      * marvell: Enable NFC/DEVBUS arbiter
      * gpmi: Use pm_runtime_resume_and_get instead of pm_runtime_get_sync
      * mpc5121: Replace NO_IRQ by 0
      * lpc32xx_{slc,mlc}:
        - Switch to using pm_ptr()
        - Switch to using gpiod API
      * lpc32xx_mlc: Switch to using pm_ptr()
      * cadence: Support 64-bit slave dma interface
      * rockchip: Describe rk3128-nfc in the bindings
      * brcmnand: Update interrupts description in the bindings
      
      SPI-NAND driver changes:
      * winbond:
        - Add Winbond W25N02KV flash support
        - Fix flash identification
      
      Fix merge conflict with mtd tree regarding the brcm bindings.
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      1d46f1ae
  2. 25 Nov, 2022 1 commit
    • Jean Delvare's avatar
      mtd: rawnand: Drop obsolete dependencies on COMPILE_TEST · 6408cc05
      Jean Delvare authored
      Since commit 0166dc11 ("of: make CONFIG_OF user selectable"), it
      is possible to test-build any driver which depends on OF on any
      architecture by explicitly selecting OF. Therefore depending on
      COMPILE_TEST as an alternative is no longer needed.
      
      It is actually better to always build such drivers with OF enabled,
      so that the test builds are closer to how each driver will actually be
      built on its intended target. Building them without OF may not test
      much as the compiler will optimize out potentially large parts of the
      code. In the worst case, this could even pop false positive warnings.
      Dropping COMPILE_TEST here improves the quality of our testing and
      avoids wasting time on non-existent issues.
      Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
      Cc: Miquel Raynal <miquel.raynal@bootlin.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Vignesh Raghavendra <vigneshr@ti.com>
      Cc: Naga Sureshkumar Relli <nagasure@xilinx.com>
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      Link: https://lore.kernel.org/linux-mtd/20221124115946.5edb771c@endymion.delvare
      6408cc05
  3. 24 Nov, 2022 2 commits
    • Zheng Yongjun's avatar
      mtd: maps: pxa2xx-flash: fix memory leak in probe · 2399401f
      Zheng Yongjun authored
      Free 'info' upon remapping error to avoid a memory leak.
      
      Fixes: e644f7d6 ("[MTD] MAPS: Merge Lubbock and Mainstone drivers into common PXA2xx driver")
      Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
      [<miquel.raynal@bootlin.com>: Reword the commit log]
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      Link: https://lore.kernel.org/linux-mtd/20221119073307.22929-1-zhengyongjun3@huawei.com
      2399401f
    • Shang XiaoJing's avatar
      mtd: core: Fix refcount error in del_mtd_device() · 56570bda
      Shang XiaoJing authored
      del_mtd_device() will call of_node_put() to mtd_get_of_node(mtd), which
      is mtd->dev.of_node. However, memset(&mtd->dev, 0) is called before
      of_node_put(). As the result, of_node_put() won't do anything in
      del_mtd_device(), and causes the refcount leak.
      
      del_mtd_device()
          memset(&mtd->dev, 0, sizeof(mtd->dev) # clear mtd->dev
          of_node_put()
              mtd_get_of_node(mtd) # mtd->dev is cleared, can't locate of_node
                                   # of_node_put(NULL) won't do anything
      
      Fix the error by caching the pointer of the device_node.
      
      OF: ERROR: memory leak, expected refcount 1 instead of 2,
      of_node_get()/of_node_put() unbalanced - destroy cset entry: attach
      overlay node /spi/spi-sram@0
      CPU: 3 PID: 275 Comm: python3 Tainted: G N 6.1.0-rc3+ #54
          0d8a1edddf51f172ff5226989a7565c6313b08e2
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
      rel-1.15.0-0-g2dd4b9b3f840-prebuilt.qemu.org 04/01/2014
      Call Trace:
      <TASK>
          dump_stack_lvl+0x67/0x83
          kobject_get+0x155/0x160
          of_node_get+0x1f/0x30
          of_fwnode_get+0x43/0x70
          fwnode_handle_get+0x54/0x80
          fwnode_get_nth_parent+0xc9/0xe0
          fwnode_full_name_string+0x3f/0xa0
          device_node_string+0x30f/0x750
          pointer+0x598/0x7a0
          vsnprintf+0x62d/0x9b0
          ...
          cfs_overlay_release+0x30/0x90
          config_item_release+0xbe/0x1a0
          config_item_put+0x5e/0x80
          configfs_rmdir+0x3bd/0x540
          vfs_rmdir+0x18c/0x320
          do_rmdir+0x198/0x330
          __x64_sys_rmdir+0x2c/0x40
          do_syscall_64+0x37/0x90
          entry_SYSCALL_64_after_hwframe+0x63/0xcd
      
      Fixes: 00596576 ("mtd: core: clear out unregistered devices a bit more")
      Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
      [<miquel.raynal@bootlin.com>: Light reword of the commit log]
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      Link: https://lore.kernel.org/linux-mtd/20221119063915.11108-1-shangxiaojing@huawei.com
      56570bda
  4. 22 Nov, 2022 2 commits
  5. 21 Nov, 2022 13 commits
  6. 17 Nov, 2022 20 commits