summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mtd: nand: docg4: simplify error caseBrian Norris2015-12-181-8/+4
| | | | | | | | | | Other refactorings have left the 'fail' label much simpler, so it shouldn't have to handle the failed allocation case. This also fixes a -Wshadow warning. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
* mtd: nand: s3c2410: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-9/+14
| | | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: update the documentation to reflect framework changesBoris BREZILLON2015-12-181-16/+15
| | | | | | | | | The MTD device is now directly embedded in the nand_chip struct. Update the mtdnand documentation to mention this aspect and fix the different examples. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: vf610: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-3/+5
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: txx9ndfmc: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-2/+1
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: tmio: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-4/+6
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: sunxi: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-7/+6
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: sharpsl: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-9/+13
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: sh_flctl: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-182-6/+5
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: r852: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-182-20/+15
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: pxa3xx: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-16/+17
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: plat: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-7/+8
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: pasemi: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-7/+5
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: orion: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-2/+2
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: omap2: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-7/+7
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: nuc900: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-8/+8
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: ndfc: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-11/+13
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: nandsim: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-6/+6
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: mxc: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-3/+2
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: mpc5121: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-2/+1
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: lpc32xx: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-182-8/+6
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: jz4740: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-5/+4
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: hisi504: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-7/+6
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: gpmi: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-183-14/+12
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: gpio: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-9/+12
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: fsmc: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-12/+10
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: fsl_upm: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-13/+16
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: fsl_ifc: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-12/+16
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: fsl_elbc: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-11/+15
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: docg4: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-11/+12
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: diskonchip: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-7/+7
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: davinci: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-14/+16
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: cmx270: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-9/+5
| | | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Brian: dropped a defunct comment] Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: cs553x: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-9/+8
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: cafe: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-5/+5
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: brcm: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-7/+6
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: bf5xx: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-6/+6
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: au1550nd: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-8/+11
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: atmel: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-6/+7
| | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: ams-delta: use the mtd instance embedded in struct nand_chipBoris BREZILLON2015-12-181-8/+5
| | | | | | | | struct nand_chip now embeds an mtd device. Make use of this mtd instance instead of allocating our own. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: omap2: create and use mtd_to_omap()Boris BREZILLON2015-12-181-34/+21
| | | | | | | Define and use mtd_to_omap() instead of container_of(); Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: nuc900: create and use mtd_to_nuc900()Boris BREZILLON2015-12-181-15/+10
| | | | | | | Create and use mtd_to_nuc900() instead of direct container_of() calls. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: nand: fsmc: create and use mtd_to_fsmc()Boris BREZILLON2015-12-181-17/+14
| | | | | | | | Create and use mtd_to_fsmc() to avoid duplication of container_of(mtd, struct fsmc_nand_data, mtd) calls. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: omap_elm: print interrupt resource using %prArnd Bergmann2015-12-181-1/+1
| | | | | | | | | | | | | | | When CONFIG_LPAE is set on ARM, resource_size_t is 64-bit wide and we get a warning about an incorrect format string for printing the interrupt number in elm_probe: drivers/mtd/nand/omap_elm.c: In function 'elm_probe': drivers/mtd/nand/omap_elm.c:417:23: warning: format '%i' expects argument of type 'int', but argument 3 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=] This patch avoids the type mismatch by printing the interrupt as a resource using the %pr format string. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: bcm47xxnflash: really unregister NAND on device removalBrian Norris2015-12-142-7/+6
| | | | | | | | | | | | | | | | | | | | | | The field bcma_nflash::mtd is never set to be non-zero anywhere, but we test for it in the removal path. So the MTD is never unregistered. Also, we should use nand_release(), not mtd_device_unregister(). Finally, we don't need to use the 'platdata' for stashing/retrieving our *driver* data -- that's what *_{get,set}_drvdata() are for. So, kill off bcm_nflash::mtd, and stash the struct bcm47xxnflash in drvdata instead. Also move the forward declaration of mtd_info up a bit, since struct bcma_sflash should be using it. Caught while inspecting other changes being made to this driver. Compile tested only. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Cc: "Rafał Miłecki" <zajec5@gmail.com> Cc: linux-wireless@vger.kernel.org Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
* mtd: nand: denali: add missing nand_release() call in denali_remove()Boris BREZILLON2015-12-111-2/+9
| | | | | | | | | | | | Unregister the NAND device from the NAND subsystem when removing a denali NAND controller, otherwise the MTD attached to the NAND device is still exposed by the MTD layer, and accesses to this device will likely crash the system. Fixes: 2a0a288ec258 ("mtd: denali: split the generic driver and PCI layer") Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: brcmnand: defer to devm_ioremap_resource() for error checkingBrian Norris2015-12-101-3/+0
| | | | | | | | devm_ioremap_resource() does error checking on the 'res' argument, so drop the error check in bcm6368_nand.c. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Tested-by: Simon Arlott <simon@fire.lp0.eu>
* mtd: brcmnand: Add support for the BCM6368Simon Arlott2015-12-092-0/+146
| | | | | | | | | | | | | | | | The BCM6368 has a NAND interrupt register with combined status and enable registers. As the BCM6328, BCM6362 and BCM6368 all use v2.1 controllers, the first variant that will work with this driver is the BCM63268 using a v4.0 controller. Set up the device by disabling and acking all interrupts, then handle the CTRL_READY interrupt. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* mtd: brcmnand: Request and enable the clock if presentSimon Arlott2015-12-091-14/+50
| | | | | | | | | Attempt to enable a clock named "nand" as some SoCs have a clock for the controller that needs to be enabled. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
* doc: dt: mtd: brcmnand: Add brcm,bcm6368-nand device tree bindingSimon Arlott2015-12-091-0/+32
| | | | | | | | | | | | | Add device tree binding for NAND on the BCM6368. The BCM6368 has a NAND interrupt register with combined status and enable registers. It also requires a clock, so add an optional clock to the common brcmnand binding. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
OpenPOWER on IntegriCloud