- 21 5月, 2015 4 次提交
-
-
由 Geert Uytterhoeven 提交于
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where appropriate. Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: linux-mtd@lists.infradead.org Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Baruch Siach 提交于
Copy to/from oob io area might not be aligned to 4 bytes. When 8 bit ECC is used, the buffer size is 26. Add memcpy16_{to,from}io, and use them to avoid truncating the buffer. Prefer memcpy32_{to,from}io when the buffer is properly aligned for better performance. Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Baruch Siach 提交于
For 4k pages the i.MX NFC hardware uses no more than 218 bytes for 8bit ECC data. Larger oobsize confuses the logic of copy_spare(). Limit the size of used oob size to avoid that. Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Uwe Kleine-König 提交于
To give people without the reference manual at hand a chance to understand how spare area is handled in the i.MX nand controller, improve commenting, naming of variables and coding style. No functional change intended. Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> [baruch: declare oob_chunk_size; update comments; reword commit log] Signed-off-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 19 5月, 2015 2 次提交
-
-
由 Hauke Mehrtens 提交于
Remove static in front of ctrl. This variable should not be shared between different instances of brcmnand_probe(), it should be local to this function and stored on the stack. Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Hauke Mehrtens 提交于
The caller already adds a new line and in the other cases there is no new line added. Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 16 5月, 2015 6 次提交
-
-
由 Brian Norris 提交于
Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Tested-by: NFlorian Fainelli <f.fainelli@gmail.com>
-
由 Brian Norris 提交于
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
There are a few small hooks required for chips like BCM63138 and the iProc family. Let's introduce those now. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Tested-by: NFlorian Fainelli <f.fainelli@gmail.com>
-
由 Brian Norris 提交于
BCM7xxx chips are supported entirely by the library code, since they use generic irqchip interfaces and don't need any extra SoC-specific configuration. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
This core originated in Set-Top Box chips (BCM7xxx) but is used in a variety of other Broadcom chips, including some BCM63xxx, BCM33xx, and iProc/Cygnus. It's been used only on ARM and MIPS SoCs, so restrict it to those architectures. There are multiple revisions of this core throughout the years, and almost every version broke register compatibility in some small way, but with some effort, this driver is able to support v4.0, v5.0, v6.x, v7.0, and v7.1. It's been tested on v5.0, v6.0, v6.1, v7.0, and v7.1 recently, so there hopefully are no more lurking inconsistencies. This patch adds just some library support, on which platform drivers can be built. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Tested-by: NFlorian Fainelli <f.fainelli@gmail.com>
-
由 Brian Norris 提交于
In commit 8ff16cf7 ("Documentation: devicetree: m25p80: add "nor-jedec" binding"), we added a generic "nor-jedec" binding to catch all mostly-compatible SPI NOR flash which can be detected via the READ ID opcode (0x9F). This was discussed and reviewed at the time, however objections have come up since then as part of this discussion: http://lkml.kernel.org/g/20150511224646.GJ32500@ld-irv-0074 It seems the parties involved agree that "jedec,spi-nor" does a better job of capturing the fact that this is SPI-specific, not just any NOR flash. This binding was only merged for v4.1-rc1, so it's still OK to change the naming. At the same time, let's move the documentation to a better name. Next up: stop referring to code (drivers/mtd/devices/m25p80.c) from the documentation. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: Marek Vasut <marex@denx.de> Cc: Rafał Miłecki <zajec5@gmail.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: devicetree@vger.kernel.org Acked-by: NStephen Warren <swarren@nvidia.com> Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NMark Rutland <mark.rutland@arm.com>
-
- 15 5月, 2015 1 次提交
-
-
由 Brian Norris 提交于
Commit 2a6a28e7 ("mtd: Make MTD tests cancelable") accidentally clobbered any read failure reports. Coverity CID #1296020 Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 13 5月, 2015 1 次提交
-
-
由 Brian Norris 提交于
On A MIPS 32-cores machine a BUG_ON was triggered because some acesses to mtd->usecount were done without taking mtd_table_mutex. kernel: Call Trace: kernel: [<ffffffff80401818>] __put_mtd_device+0x20/0x50 kernel: [<ffffffff804086f4>] blktrans_release+0x8c/0xd8 kernel: [<ffffffff802577e0>] __blkdev_put+0x1a8/0x200 kernel: [<ffffffff802579a4>] blkdev_close+0x1c/0x30 kernel: [<ffffffff8022006c>] __fput+0xac/0x250 kernel: [<ffffffff80171208>] task_work_run+0xd8/0x120 kernel: [<ffffffff8012c23c>] work_notifysig+0x10/0x18 kernel: kernel: Code: 2442ffff ac8202d8 000217fe <00020336> dc820128 10400003 00000000 0040f809 00000000 kernel: ---[ end trace 080fbb4579b47a73 ]--- Fixed by taking the mutex in blktrans_open and blktrans_release. Note that this locking is already suggested in include/linux/mtd/blktrans.h: struct mtd_blktrans_ops { ... /* Called with mtd_table_mutex held; no race with add/remove */ int (*open)(struct mtd_blktrans_dev *dev); void (*release)(struct mtd_blktrans_dev *dev); ... }; But we weren't following it. Originally reported by (and patched by) Zhang and Giuseppe, independently. Improved and rewritten. Cc: stable@vger.kernel.org Reported-by: NZhang Xingcai <zhangxingcai@huawei.com> Reported-by: NGiuseppe Cantavenera <giuseppe.cantavenera.ext@nokia.com> Tested-by: NGiuseppe Cantavenera <giuseppe.cantavenera.ext@nokia.com> Acked-by: NAlexander Sverdlin <alexander.sverdlin@nokia.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 12 5月, 2015 1 次提交
-
-
由 Brian Norris 提交于
These are already-documented common bindings for NAND chips. Let's handle them in nand_base. If NAND controller drivers need to act on this data before bringing up the NAND chip (e.g., fill out ECC callback functions, change HW modes, etc.), then they can do so between calling nand_scan_ident() and nand_scan_tail(). Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 07 5月, 2015 19 次提交
-
-
由 Rafał Miłecki 提交于
We had many entries that were recently added just to allow selecting some flashes directly but were never used. They weren't providing any special flash handling, we just needed them due to the lack of some generic binding string. With the introduction of "nor-jedec" (in 1103b851) they won't be needed unless we discover some faulty flash requiring workarounds. As explained in m25p80 DT documentation we require specifying "nor-jedec" now as less specific compatible entry. Signed-off-by: NRafał Miłecki <zajec5@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Gabor Juhos 提交于
Signed-off-by: NGabor Juhos <juhosg@openwrt.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Gabor Juhos 提交于
Signed-off-by: NGabor Juhos <juhosg@openwrt.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Lars-Peter Clausen 提交于
Use dev_pm_ops instead of the legacy suspend/resume callbacks for the MTD class suspend and resume operations. While we are at it slightly reorder things to avoid the need for forward declarations. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Krzysztof Kozlowski 提交于
The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Krzysztof Kozlowski 提交于
The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Krzysztof Kozlowski 提交于
The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Rob Herring 提交于
In preparation to enable ARCH_MMP on ARM64, a couple of fixes are needed to build the pxa3xx_nand driver: Legacy DMA will only used on ARM, so also make it condtional on CONFIG_ARM. __raw_{read,write}sl are not available on ARM64 or generically, so use the readsl/writesl variants instead. Somewhat inconsistently, {read,write}sl are inherently non-swapping with the generic version using __raw_{read,write}l. Signed-off-by: NRob Herring <robh@kernel.org> Acked-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: linux-mtd@lists.infradead.org [Brian: added one more __raw_readsl -> readsl] Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Maxime Ripard 提交于
Now that the driver handles the FIFO draining in a threaded interrupt, we can base our timeout on jiffies and sleeping, instead of using mdelay. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Nicholas Mc Guire 提交于
return type of wait_for_completion_timeout is unsigned long not int. An appropriately named unsigned long is added and the assignment fixed up. This not only should help readability but also handles corner cases properly. Signed-off-by: NNicholas Mc Guire <hofrat@osadl.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Nicholas Mc Guire 提交于
wait_for_completion_timeout does not return negative values so result handling here does not need to check for negative return. Signed-off-by: NNicholas Mc Guire <hofrat@osadl.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Richard Weinberger 提交于
As all four bytes are written in any case the memset() is in vain. Signed-off-by: NRichard Weinberger <richard@nod.at> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Fabian Frederick 提交于
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: NFabian Frederick <fabf@skynet.be> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
This statement was written with a cast-to-loff_t to be sure to have a full 64-bit mask. However, we don't account for the fact that '1 << this->bbt_erase_shift' might already overflow. This will not be a problem in practice, since eraseblocks should never be anywhere near 4GiB. But we can do this for completeness, and quiet Coverity in the meantime. CID #1226806. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
Don't leak this->bbt, and return early if check_create() fails. It helps to have a single error path to avoid these problems. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
This implementation detail is no longer needed outside of nand_bbt.c. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
The diskonchip driver almost uses the default nand_base hooks as-is, except that it provides custom on-flash BBT descriptors and avoids using factory-marked bad blockers. So let's refactor the BBT initialization code into a private 'late_init' hook which handles all the private details. Note the usage of NAND_SKIP_BBTSCAN, which allows us to defer the BBT scan until we've prepared everything. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Kevin Cernekee 提交于
Block drivers are responsible for calling flush_dcache_page() on each BIO request. This operation keeps the I$ coherent with the D$ on architectures that don't have hardware coherency support. Without this flush, random crashes are seen when executing user programs from an ext4 filesystem backed by a ubiblock device. This patch is based on the change implemented in commit 2d4dc890 ("block: add helpers to run flush_dcache_page() against a bio and a request's pages"). Fixes: 9d54c8a3 ("UBI: R/O block driver on top of UBI volumes") Signed-off-by: NKevin Cernekee <cernekee@chromium.org> Signed-off-by: NEzequiel Garcia <ezequiel.garcia@imgtec.com> Signed-off-by: NRichard Weinberger <richard@nod.at>
-
- 16 4月, 2015 1 次提交
-
-
由 David Howells 提交于
Signed-off-by: NDavid Howells <dhowells@redhat.com> Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 14 4月, 2015 1 次提交
-
-
Emulate random power cuts by switching device to ro after a number of writes to allow simple power cut testing with nand-sim. Maximum and minimum number of successful writes before power cut and what kind of writes (EC header, VID header or none) to interrupt configurable via debugfs. Signed-off-by: NDavid Oberhollenzer <david.oberhollenzer@sigma-star.at> Signed-off-by: NRichard Weinberger <richard@nod.at>
-
- 06 4月, 2015 4 次提交
-
-
由 Mika Westerberg 提交于
Add Macronix (mx25u6435f) 8MB flash to the list of supported chips. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Mika Westerberg 提交于
Add Winbond (w25q64dw) 8MB flash to the list of supported chips. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Gabor Juhos 提交于
Signed-off-by: NGabor Juhos <juhosg@openwrt.org> Signed-off-by: NLuka Perkov <luka@openwrt.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Shengzhou Liu 提交于
Add support for EON en25s64 SPI flash. Signed-off-by: NShengzhou Liu <Shengzhou.Liu@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-