aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-12-18mtd: nand: pasemi: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-7/+5
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: orion: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-2/+2
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: omap2: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-7/+7
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: nuc900: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-8/+8
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: ndfc: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-11/+13
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: nandsim: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-6/+6
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: mxc: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-3/+2
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: mpc5121: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-2/+1
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: lpc32xx: use the mtd instance embedded in struct nand_chipBoris BREZILLON2-8/+6
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: jz4740: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-5/+4
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: hisi504: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-7/+6
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: gpmi: use the mtd instance embedded in struct nand_chipBoris BREZILLON3-14/+12
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: gpio: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-9/+12
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: fsmc: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-12/+10
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: fsl_upm: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-13/+16
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: fsl_ifc: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-12/+16
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: fsl_elbc: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-11/+15
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: docg4: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-11/+12
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: diskonchip: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-7/+7
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: davinci: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-14/+16
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: cmx270: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-9/+5
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> [Brian: dropped a defunct comment] Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: cs553x: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-9/+8
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: cafe: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-5/+5
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: brcm: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-7/+6
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: bf5xx: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-6/+6
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: au1550nd: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-8/+11
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: atmel: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-6/+7
struct nand_chip now embeds an mtd device. Make use of this mtd instance. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: ams-delta: use the mtd instance embedded in struct nand_chipBoris BREZILLON1-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 <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: omap2: create and use mtd_to_omap()Boris BREZILLON1-34/+21
Define and use mtd_to_omap() instead of container_of(); Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: nuc900: create and use mtd_to_nuc900()Boris BREZILLON1-15/+10
Create and use mtd_to_nuc900() instead of direct container_of() calls. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: nand: fsmc: create and use mtd_to_fsmc()Boris BREZILLON1-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 <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-18mtd: omap_elm: print interrupt resource using %prArnd Bergmann1-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 <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-14mtd: bcm47xxnflash: really unregister NAND on device removalBrian Norris2-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 <[email protected]> Cc: "Rafał Miłecki" <[email protected]> Cc: [email protected] Acked-by: Boris Brezillon <[email protected]>
2015-12-11mtd: nand: denali: add missing nand_release() call in denali_remove()Boris BREZILLON1-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 <[email protected]> Acked-by: Dinh Nguyen <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-10mtd: brcmnand: defer to devm_ioremap_resource() for error checkingBrian Norris1-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 <[email protected]> Tested-by: Simon Arlott <[email protected]>
2015-12-09mtd: brcmnand: Add support for the BCM6368Simon Arlott2-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 <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-09mtd: brcmnand: Request and enable the clock if presentSimon Arlott1-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 <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-09doc: dt: mtd: brcmnand: Add brcm,bcm6368-nand device tree bindingSimon Arlott1-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 <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-09mtd: nand: Confine MTD_NAND_SH_FLCTL to SUPERHGeert Uytterhoeven1-1/+1
As of commit a521422ea4ae6128 ("ARM: shmobile: mackerel: Remove Legacy C board code"), the Renesas SuperH FLCTL driver is no longer used on ARM SH-Mobile SoCs. Restrict the dependencies, unless compile-testing. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-09mtd: spi-nor: Check the return value from read_sr()Fabio Estevam1-2/+8
We should better check the return value from read_sr() and propagate it in the case of error. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Brian Norris <[email protected]>
2015-12-09mtd: partitions: support a cleanup callback for parsersBrian Norris4-4/+37
If partition parsers need to clean up their resources, we shouldn't assume that all memory will fit in a single kmalloc() that the caller can kfree(). We should allow the parser to provide a proper cleanup routine. Note that this means we need to keep a hold on the parser's module for a bit longer, and release it later with mtd_part_parser_put(). Alongside this, define a default callback that we'll automatically use if the parser doesn't provide one, so we can still retain the old behavior. Signed-off-by: Brian Norris <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
2015-12-09mtd: partitions: pass around 'mtd_partitions' wrapper structBrian Norris4-22/+38
For some of the core partitioning code, it helps to keep info about the parsed partition (and who parsed them) together in one place. Signed-off-by: Brian Norris <[email protected]>
2015-12-09mtd: partitions: remove kmemdup()Brian Norris3-11/+9
The use of kmemdup() complicates the error handling a bit. We don't actually need to allocate new memory, since this reference is treated as const, and it is copied into new memory by the partition registration code anyway. So remove it. Signed-off-by: Brian Norris <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
2015-12-09mtd: partitions: rename MTD parser get/putBrian Norris1-5/+8
We're going to reuse put_partition_parser(), so let's fix up the prefix naming a bit, to hopefully be more consistent. Also make convert to a true C function instead of a macro. Signed-off-by: Brian Norris <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
2015-12-09mtd: partitions: make parsers return 'const' partition arraysBrian Norris8-9/+9
We only want to modify these arrays inside the parser "drivers", so the drivers should construct them however they like, then return them as immutable arrays. This will make other refactorings easier. Signed-off-by: Brian Norris <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
2015-12-09mtd: ofpart: assign return argument exactly onceBrian Norris1-16/+19
It's easier to refactor these parsers if the return value gets assigned only once, just like every other MTD partition parser. This prepares for making the second arg to the parse_fn() const. This is OK if we construct the partitions completely first, and assign them to the return pointer only after we're done modifying them. Signed-off-by: Brian Norris <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
2015-12-09mtd: merge for-4.4 development into -next developmentBrian Norris3-3/+18
A few MAINTAINERS updates, and some DT binding/documentation fixups. Signed-off-by: Brian Norris <[email protected]>
2015-12-08doc: dt: mtd: partitions: add compatible property to "partitions" nodeBrian Norris2-1/+9
As noted here [1], there are potentially future conflicts if we try to use MTD's "partitions" subnode to describe anything besides just the fixed-in-the-device-tree partitions currently described in this document. Particularly, there was a proposal to use this node for the AFS parser too. It can pose a (small) problem to try to differentiate the following nodes: // using binding as currently specified partitions { #address-cells = <x>; #size-cells = <y>; partition@0 { ...; }; }; and // proposed future binding partitions { compatible = "arm,arm-flash-structure"; }; It's especially difficult if other uses of this node start having subnodes. So, since the "partitions" node is new in v4.4, let's fixup the binding before release so that it requires a compatible property, so it's much clearer to distinguish. e.g.: // proposed partitions { compatible = "fixed-partitions"; #address-cells = <x>; #size-cells = <y>; partition@0 { ...; }; }; [1] Subject: "mtd: create a partition type device tree binding" http://lkml.kernel.org/g/[email protected] http://lists.infradead.org/pipermail/linux-mtd/2015-November/063355.html http://lists.infradead.org/pipermail/linux-mtd/2015-November/063364.html Cc: Michal Suchanek <[email protected]> Signed-off-by: Brian Norris <[email protected]> Acked-by: Rob Herring <[email protected]>
2015-12-08Merge arch/{arm,blackfin,cris,mips}/ refactoring patches into MTD devBrian Norris18-22/+22
These patches may also get merged by other arch/ maintainers, so I've based them on 4.4-rc1 instead of the latest MTD development. Bring them in now. Signed-off-by: Brian Norris <[email protected]>
2015-12-08mips: nand: make use of mtd_to_nand() where appropriateBoris BREZILLON5-5/+5
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all MIPS specific implementations to use this helper. Signed-off-by: Boris Brezillon <[email protected]> Acked-by: Brian Norris <[email protected]> Signed-off-by: Brian Norris <[email protected]>