- 12 12月, 2015 1 次提交
-
-
由 Boris BREZILLON 提交于
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: 2a0a288e ("mtd: denali: split the generic driver and PCI layer") Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NDinh Nguyen <dinguyen@opensource.altera.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 11 12月, 2015 1 次提交
-
-
由 Brian Norris 提交于
devm_ioremap_resource() does error checking on the 'res' argument, so drop the error check in bcm6368_nand.c. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Tested-by: NSimon Arlott <simon@fire.lp0.eu>
-
- 10 12月, 2015 12 次提交
-
-
由 Simon Arlott 提交于
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: NSimon Arlott <simon@fire.lp0.eu> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Simon Arlott 提交于
Attempt to enable a clock named "nand" as some SoCs have a clock for the controller that needs to be enabled. Signed-off-by: NSimon Arlott <simon@fire.lp0.eu> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Simon Arlott 提交于
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: NSimon Arlott <simon@fire.lp0.eu> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Geert Uytterhoeven 提交于
As of commit a521422e ("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: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Fabio Estevam 提交于
We should better check the return value from read_sr() and propagate it in the case of error. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
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: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Brian Norris 提交于
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: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
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: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Brian Norris 提交于
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: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Brian Norris 提交于
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: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Brian Norris 提交于
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: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Brian Norris 提交于
A few MAINTAINERS updates, and some DT binding/documentation fixups. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 09 12月, 2015 11 次提交
-
-
由 Brian Norris 提交于
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/20151113220039.GA74382@google.com 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 <hramrach@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Acked-by: NRob Herring <robh@kernel.org>
-
由 Brian Norris 提交于
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: NBrian Norris <computersforpeace@gmail.com>
-
由 Boris BREZILLON 提交于
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: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NBrian Norris <computersforpeace@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Boris BREZILLON 提交于
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all blackfin specific implementations to use this helper. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NBrian Norris <computersforpeace@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Boris BREZILLON 提交于
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all CRIS specific implementations to use this helper. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NBrian Norris <computersforpeace@gmail.com> Acked-by: NJesper Nilsson <jesper.nilsson@axis.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Boris BREZILLON 提交于
Add a new helper to retrieve the MTD device attached to a NAND chip. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Boris BREZILLON 提交于
Currently all NAND controller drivers are providing both the mtd_info and nand_chip struct and then let the NAND subsystem to initialize a few things before registering the mtd instance to the MTD layer. Embed an mtd_info field into nand_chip to add some consistency to all NAND controller drivers. This change will also help factorizing boilerplate code copied in all NAND drivers. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Boris BREZILLON 提交于
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all NAND drivers to use it. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Boris BREZILLON 提交于
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Use it where appropriate. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Boris BREZILLON 提交于
mtd_to_nand() was recently introduced to avoid direct access to the mtd->priv field. Update core code to use mtd_to_nand(). Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Boris BREZILLON 提交于
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all SH specific implementations to use this helper. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 08 12月, 2015 1 次提交
-
-
由 Boris BREZILLON 提交于
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all ARM specific implementations to use this helper. Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 05 12月, 2015 4 次提交
-
-
由 Lars-Peter Clausen 提交于
Calling synchronize_irq() right before free_irq() is quite useless. On one hand the IRQ can easily fire again before free_irq() is entered, on the other hand free_irq() itself calls synchronize_irq() internally (in a race condition free way), before any state associated with the IRQ is freed. Patch was generated using the following semantic patch: // <smpl> @@ expression irq; @@ -synchronize_irq(irq); free_irq(irq, ...); // </smpl> Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Heiner Kallweit 提交于
The documenting comment of mtd_erase in mtdcore.c states: Device drivers are supposed to call instr->callback() whenever the operation completes, even if it completes with a failure. Currently the callback isn't called in case of failure. Fix this. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
As of commit 807f16d4 ("mtd: core: set some defaults when dev.parent is set"), the MTD core will set this for us. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: Bayi Cheng <bayi.cheng@mediatek.com>
-
由 Brian Norris 提交于
We can guard against reorganization of struct mtd_part by using container_of(). We can also make sure we're using the right pointer types by making this a static inline function instead of a macro. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 04 12月, 2015 1 次提交
-
-
由 Brian Norris 提交于
The ofpart partition parser might be run on DT-enabled systems that don't have any "ofpart" partition subnodes at all, since "ofpart" is in the default parser list. So don't complain loudly on every boot. Example: using m25p80.c with no intent to use ofpart: &spi2 { status = "okay"; flash@0 { compatible = "jedec,spi-nor"; reg = <0>; }; }; I see this warning: [ 0.588471] m25p80 spi2.0: gd25q32 (4096 Kbytes) [ 0.593091] spi2.0: 'partitions' subnode not found on /spi@ff130000/flash@0. Trying to parse direct subnodes as partitions. Cc: Michal Suchanek <hramrach@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 02 12月, 2015 4 次提交
-
-
由 Brian Norris 提交于
We don't actually need to stash a copy of this device_node indefinitely; we only need it in brcmnand_init_cs(). Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: <bcm-kernel-feedback-list@broadcom.com> Cc: Kamal Dasu <kdasu.kdev@gmail.com> Acked-by: NScott Branden <sbranden@broadcom.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
It's "ADL" ("ALE to data loading" time) not "ALD". Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
-
由 Boris BREZILLON 提交于
src_ssync_features field is only 1 byte large, and the 4th reserved area is actually 8 bytes large. Fixes: d1e1f4e4 ("mtd: nand: add support for reading ONFI parameters from NAND device") Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ricardo Ribalda 提交于
The error message was: m25p80 spi32766.0: unrecognized JEDEC id bytes: 00, 0, 0 The new error message: m25p80 spi32766.0: unrecognized JEDEC id bytes: 00, 00, 00 Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 01 12月, 2015 5 次提交
-
-
由 Julia Lawall 提交于
for_each_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ expression root,e; local idexpression child; @@ for_each_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // </smpl> Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Acked-by: NChen-Yu Tsai <wens@csie.org> Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Julia Lawall 提交于
This patch addresses two related memory management issues in the probe function: 1. for_each_available_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ expression root,e; local idexpression child; @@ for_each_available_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // </smpl> 2. The devm_kzalloc'd data is not used if brcmnand_init_cs fails. Free it immediately, using devm_kfree in this case, instead of waiting for the remove function. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Simon Arlott 提交于
If an error occurs in flash above 4GB in PIO mode then the EXT_ADDR registers will be set to the location of the error and never cleared. Reset them to 0 before reading. Signed-off-by: NSimon Arlott <simon@fire.lp0.eu> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Arnd Bergmann 提交于
The linux/mtd/map.h header file is included by a couple of platform specific files that are built even when CONFIG_MTD is disabled, and we always get warning "No CONFIG_MTD_MAP_BANK_WIDTH_xx selected. No NOR chip support can work" in that case. This adds an #ifdef around the pointless warning, as everything is really fine when we don't build the drivers anyway. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Arnd Bergmann 提交于
MTD allows compile-time configuration of the possible CFI geometry settings that are allowed by the kernel, but that includes a couple of invalid configurations, where no bank width or no interleave setting is allowed. These are then caught with a compile-time warning: include/linux/mtd/cfi.h:76:2: warning: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. include/linux/mtd/map.h:145:2: warning: #warning "No CONFIG_MTD_MAP_BANK_WIDTH_xx selected. No NOR chip support can work" This is a bit annoying for randconfig tests, and can be avoided if we change the Kconfig logic to always select the simplest configuration when no other one is enabled. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-