1. 23 Jan, 2016 11 commits
  2. 15 Jan, 2016 2 commits
    • Arnd Bergmann's avatar
      mtd: nuc900_nand: read correct SMISR register · f9bdbd6c
      Arnd Bergmann authored
      The nuc900_nand driver has always passed an incorrect register
      address in its nuc900_check_rb() function, which cannot possibly
      work, and in some configurations gives us a build warning:
      
      drivers/mtd/nand/nuc900_nand.c: In function 'nuc900_check_rb':
      drivers/mtd/nand/nuc900_nand.c:27:23: warning: passing argument 1 of '__raw_readl' makes pointer from integer without a cast [-Wint-conversion]
       #define REG_SMISR     0xac
      drivers/mtd/nand/nuc900_nand.c:118:20: note: in expansion of macro 'REG_SMISR'
        val = __raw_readl(REG_SMISR);
      
      This makes sure we actually read from the register rather than
      from (void *)0x000000ac in user space.
      
      I suspect nobody noticed this before because the nuc900_nand_devready()
      function never gets called, or nobody uses this driver on an upstream
      kernel. Possibly even both.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      f9bdbd6c
    • Geert Uytterhoeven's avatar
      mtd: mtk-nor: Drop bogus __init from mtk_nor_init() · 92752d99
      Geert Uytterhoeven authored
      WARNING: drivers/mtd/spi-nor/mtk-quadspi.o(.text+0x77e): Section mismatch in reference from the function mtk_nor_drv_probe() to the function .init.text:mtk_nor_init()
      The function mtk_nor_drv_probe() references
      the function __init mtk_nor_init().
      This is often because mtk_nor_drv_probe lacks a __init
      annotation or the annotation of mtk_nor_init is wrong.
      
      Drop the bogus __init from mtk_nor_init() to kill this warning.
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      92752d99
  3. 08 Jan, 2016 2 commits
  4. 07 Jan, 2016 15 commits
  5. 06 Jan, 2016 6 commits
  6. 05 Jan, 2016 1 commit
    • Stephen Rothwell's avatar
      mtd: nand: fix for drop unnecessary partition parser data · 887e9d3a
      Stephen Rothwell authored
      From Stephen:
      
          Hi Brian,
      
          After merging the l2-mtd tree, today's linux-next build (powerpc
          ppc44x_defconfig) failed like this:
      
          drivers/mtd/nand/ndfc.c: In function 'ndfc_chip_init':
          drivers/mtd/nand/ndfc.c:177:2: error: 'ppdata' undeclared (first use in this function)
            ppdata.of_node = flash_np;
            ^
      
          Caused by commit
      
            a61ae81a ("mtd: nand: drop unnecessary partition parser data")
      
      The flash node is already correctly assigned using the new helper
      (nand_set_flash_node()) so the correct fix is indeed to simply drop this
      line.
      
      Fixes: a61ae81a ("mtd: nand: drop unnecessary partition parser data")
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      887e9d3a
  7. 04 Jan, 2016 1 commit
    • Brian Norris's avatar
      mtd: fix cmdlinepart parser, early naming for auto-filled MTD · 472b444e
      Brian Norris authored
      Commit 807f16d4 ("mtd: core: set some defaults when dev.parent is
      set") attempted to provide some default settings for MTDs that
       (a) assign the parent device and
       (b) don't provide their own name or owner
      
      However, this isn't a perfect drop-in replacement for the boilerplate
      found in some drivers, because the MTD name is used by partition
      parsers like cmdlinepart, but the name isn't set until add_mtd_device(),
      after the parsing is completed. This means cmdlinepart sees a NULL name
      and therefore will not work properly.
      
      Fix this by moving the default name and owner assignment to be first in
      the MTD registration process.
      
      [Note: this does not fix all reported issues, particularly with NAND
      drivers. Will require an additional fix for drivers/mtd/nand/]
      
      Fixes: 807f16d4 ("mtd: core: set some defaults when dev.parent is set")
      Reported-by: default avatarHeiko Schocher <hs@denx.de>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Frans Klaver <fransklaver@gmail.com>
      472b444e
  8. 19 Dec, 2015 2 commits
    • Arnd Bergmann's avatar
      mtd: sh_flctl: pass FIFO as physical address · 1873315f
      Arnd Bergmann authored
      By convention, the FIFO address we pass using dmaengine_slave_config
      is a physical address in the form that is understood by the DMA
      engine, as a dma_addr_t, phys_addr_t or resource_size_t.
      
      The sh_flctl driver however passes a virtual __iomem address that
      gets cast to dma_addr_t in the slave driver. This happens to work
      on shmobile because that platform sets up an identity mapping for
      its MMIO regions, but such code is not portable to other platforms,
      and prevents us from ever changing the platform mapping or reusing
      the driver on other architectures like ARM64 that might not have the
      mapping.
      
      We also get a warning about a type mismatch for the case that
      dma_addr_t is wider than a pointer, i.e. when CONFIG_LPAE is set:
      
      drivers/mtd/nand/sh_flctl.c: In function 'flctl_setup_dma':
      drivers/mtd/nand/sh_flctl.c:163:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
        cfg.dst_addr = (dma_addr_t)FLDTFIFO(flctl);
      
      This changes the driver to instead pass the physical address of
      the FIFO that is extracted from the MMIO resource, making the
      code more portable and avoiding the warning.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      1873315f
    • Masahiro Yamada's avatar
      mtd: denali: make MTD_NAND_DENALI_DT dependent on OF · 0ed6ca3a
      Masahiro Yamada authored
      The build passes even if CONFIG_OF is undefined, but it makes sense
      to let it depend on OF.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      0ed6ca3a