- 06 7月, 2014 1 次提交
-
-
由 Ted Juan 提交于
These two function's switch case lack the 'break' that make them always return error. Signed-off-by: NTed Juan <ted.juan@gmail.com> Acked-by: NPekon Gupta <pekon@ti.com> Cc: <stable@vger.kernel.org> # 3.12.x+ Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 29 5月, 2014 5 次提交
-
-
由 Huang Shijie 提交于
The gpmi's IP for imx6sx is nearly the same as the gpmi's IP for imx6q, except the following two new features: (1) the new BCH contoller has 62-BIT correcting ECC strength (The BCH for imx6q only has 40-BIT ECC strength). (2) add the hardware Randomizer support. This patch does the follow changes: (1) add a new macro GPMI_IS_MX6SX to represent the imx6sx's gpmi. (2) add a new macro GPMI_IS_MX6. We use this macro to initialize the same registers for both imx6sx and imx6q, and so on. (3) add a new gpmi_devdata instance, the gpmi_devdata_imx6sx, for imx6sx. Signed-off-by: NHuang Shijie <b32955@freescale.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Paul Bolle 提交于
Since (a few releases before) v2.6.0 there have been checks for CONFIG_MTD_SUPERH_RESERVE. One check is still present. But a Kconfig symbol MTD_SUPERH_RESERVE has never been added. So a few lines of dead code can be removed. Signed-off-by: NPaul Bolle <pebolle@tiscali.nl> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Himangi Saraogi 提交于
This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. Also, the now unnecessary label out_err_hw_init is done away with and the label out_err_kzalloc is renamed to out_err. The following Coccinelle semantic patch was used for making the change: @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .probe = probefn, .remove = removefn, }; @prb@ identifier platform.probefn, pdev; expression e, e1, e2; @@ probefn(struct platform_device *pdev, ...) { <+... - e = kzalloc(e1, e2) + e = devm_kzalloc(&pdev->dev, e1, e2) ... ?-kfree(e); ...+> } @rem depends on prb@ identifier platform.removefn; expression e; @@ removefn(...) { <... - kfree(e); ...> } Signed-off-by: NHimangi Saraogi <himangi774@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Thomas Petazzoni 提交于
The pxa3xx_nand driver currently uses __raw_writel() and __raw_readl() to access I/O registers. However, those functions do not do any endianness swapping, which means that they won't work when the CPU runs in big-endian but the I/O registers are little endian, which is the common situation for ARM systems running big endian. Since __raw_writel() and __raw_readl() do not include any memory barriers and the pxa3xx_nand driver can only be compiled for ARM platforms, the closest I/o accessors functions that do endianess swapping are writel_relaxed() and readl_relaxed(). This patch has been verified to work on Armada XP GP: without the patch, the NAND is not detected when the kernel runs big endian while it is properly detected when the kernel runs little endian. With the patch applied, the NAND is properly detected in both situations (little and big endian). Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: <stable@vger.kernel.org> # v3.13+ Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ted Juan 提交于
Fixes: 2c9f2365 mtd: nand: omap: ecc.calculate: merge omap3_calculate_ecc_bch4 in omap_calculate_ecc_bch Fixes: 7bcd1dca mtd: nand: omap: ecc.calculate: merge omap3_calculate_ecc_bch8 in omap_calculate_ecc_bch Cc: <stable@vger.kernel.org> # 3.13.x+ Signed-off-by: NTed Juan <ted.juan@gmail.com> Acked-by: NPekon Gupta <pekon@ti.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 28 5月, 2014 5 次提交
-
-
由 Brian Norris 提交于
The two loops in r852_write_buf() are designed to handle 4-byte-aligned and then 1-byte-aligned portions, respectively. However, there are two issues: (1) The first loop will only terminate if 'len' is a multiple of 4 (2) The second loop will never terminate if it runs at least once Rewrite these loops as they were probably intended. Compile tested only. Issues pointed out by Coverity Scan. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: Maxim Levitsky <maximlevitsky@gmail.com>
-
由 Brian Norris 提交于
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
Set, but unused, variable. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
On m86k, and maybe a few other architectures, we get this kind of warning, due to misuse of volatile: drivers/mtd/maps/sc520cdp.c: In function 'sc520cdp_setup_par': >> drivers/mtd/maps/sc520cdp.c:223:2: warning: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type [enabled by default] arch/m68k/include/asm/raw_io.h:22:13: note: expected 'void *' but argument is of type 'volatile long unsigned int *' Rather than annotating the variable declaration, let's just use the proper accessors, which add the 'volatile' qualifier to the operation. Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Brian Norris 提交于
drivers/mtd/devices/slram.c: In function 'init_slram': drivers/mtd/devices/slram.c:283:6: warning: variable 'i' set but not used [-Wunused-but-set-variable] Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 27 5月, 2014 2 次提交
-
-
由 Helmut Schaa 提交于
Otherwise we'd return a random value if allocation of the workqueue fails. Signed-off-by: NHelmut Schaa <helmut.schaa@googlemail.com> Acked-by: NBrian Norris <computersforpeace@gmail.com> Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
由 Brian Norris 提交于
Not all architectures implement a writel_relaxed() accessor. Hopefully this will change eventually, but for now, this means lpddr2_nvm.c can't compile on some architectures. Let's add an ARM dependency for now, and leave a comment so maybe we can change this in the future. Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Cc: Vincenzo Aliberti <vincenzo.aliberti@gmail.com>
-
- 22 5月, 2014 3 次提交
-
-
由 Ezequiel Garcia 提交于
This commit adds support for the user to specify the ECC strength and step size through the devicetree. We keep the previous behavior, when there is no DT parameter provided. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ezequiel Garcia 提交于
Let's make pxa_ecc_init() return a negative errno on error or zero if succesful, which is standard kernel practice. Also, report the selected ECC strength and step size, which is important information. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ezequiel Garcia 提交于
This commit makes use of the chip->ecc_strength_ds and chip->ecc_step_ds which contain the datasheet minimum requested ECC strength to produce a noisy warning if the configured ECC strength is weaker. Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 21 5月, 2014 16 次提交
-
-
由 pekon gupta 提交于
This patch add support for BCH16 ecc-scheme in OMAP NAND driver, by extending following functions: - omap_enable_hwecc (nand_chip->ecc.hwctl): configure GPMC controller - omap_calculate_ecc_bch (nand_chip->ecc.calculate): fetch ECC signature from GPMC controller - omap_elm_correct_data (nand_chip->ecc.correct): detect and correct ECC errors using ELM (a) BCH16 ecc-scheme can detect and correct 16 bit-flips per 512Bytes of data. (b) BCH16 ecc-scheme generates 26-bytes of ECC syndrome / 512B. Due to (b) this scheme can only be used with NAND devices which have enough OOB to satisfy the relation: "OOBsize per page >= 26 * (page-size / 512)" Signed-off-by: NPekon Gupta <pekon@ti.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 pekon gupta 提交于
ELM hardware engine is used to detect ECC errors for BCHx ecc-schemes (like BCH4/BCH8/BCH16). This patch extends configuration of ELM registers for adding support of BCH16_HW ecc-scheme. Signed-off-by: NPekon Gupta <pekon@ti.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Ron Lee 提交于
Signed-off-by: NRon Lee <ron@debian.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Vincenzo Aliberti 提交于
Signed-off-by: NVincenzo Aliberti <vincenzo.aliberti@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Philippe De Muyter 提交于
Enhances the help for the CFI command set choices. Signed-off-by: NPhilippe De Muyter <phdm@macqel.be> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Joe Schultz 提交于
A workaround was already in place that set the WP bit in the IFC_CSPR0 register after a STATUS command, however it used an 8-bit write method. As a result, the WP bit was never set on 16-bit devices, and these devices would eventually be incorrectly marked as write-protected. This patch checks the chip options for a 16-bit device and uses the appropriate write method to set the WP bit after a STATUS command. Signed-off-by: NJoe Schultz <jschultz@xes-inc.com> Signed-off-by: NAaron Sierra <asierra@xes-inc.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Aaron Sierra 提交于
The IFC buffer is accessed via 8-bit and 16-bit accessors. Changing the 'addr' member of 'struct fsl_ifc_nand_ctrl' from 'u8 __iomem *' to 'void __iomem *' eliminates the need for explicit casts when the 16-bit accessors are used. Signed-off-by: NAaron Sierra <asierra@xes-inc.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Dan Carpenter 提交于
The break statements should be indented another tab. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Kamal Dasu 提交于
nand_base can be passed a kmap()'d buffers from highmem by filesystems like jffs2. This results in failure to map the physical address of the DMA buffer on various contoller driver on different platforms. This change adds a chip option to use preallocated databuf as bounce buffers used in nand_do_read_ops() and nand_do_write_ops(). This allows for specific nand controller driver to set this option as needed. Signed-off-by: NKamal Dasu <kdasu.kdev@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Pekon Gupta 提交于
As subpage write is enabled by default for all drivers, nand_write_subpage_hwecc causes a crash if the driver did not register ecc->hwctl or ecc->calculate. This behavior was introduced in commit 837a6ba4 "mtd: nand: subpage write support for hardware based ECC schemes". This fixes a crash by emulating subpage write support by padding sub-page data with 0xff on either sides to make it full page compatible. Reported-by: NHelmut Schaa <helmut.schaa@googlemail.com> Tested-by: NHelmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: NPekon Gupta <pekon@ti.com> Reviewed-by: NScott Wood <scottwood@freescale.com> Cc: <stable@vger.kernel.org> # 3.10.x+ Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Arnd Bergmann 提交于
The samsung onenand driver passes around a dma address token through a void pointer, which is incorrect and leads to warnings like this one: onenand/samsung.c:548:2: warning: passing argument 1 of '__fswab32' makes integer from pointer without a cast [enabled by default] writel(src, base + S5PC110_DMA_SRC_ADDR); ^ This patch makes it use dma_addr_t here, which is more appropriate. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: linux-mtd@lists.infradead.org Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Jingoo Han 提交于
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Acked-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Jingoo Han 提交于
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Acked-by: NJason Cooper <jason@lakedaemon.net> Acked-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Jingoo Han 提交于
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Geert Uytterhoeven 提交于
On m68k, where access_ok() doesn't cast the address parameter: drivers/mtd/mtdchar.c: In function 'mtdchar_write_ioctl': drivers/mtd/mtdchar.c:575:4: warning: passing argument 2 of 'access_ok' makes pointer from integer without a cast [enabled by default] arch/m68k/include/asm/uaccess_mm.h:17:90: note: expected 'const void *' but argument is of type '__u64' drivers/mtd/mtdchar.c:576:4: warning: passing argument 2 of 'access_ok' makes pointer from integer without a cast [enabled by default] arch/m68k/include/asm/uaccess_mm.h:17:90: note: expected 'const void *' but argument is of type '__u64' The address parameter of access_ok() is really a userspace pointer. On most architectures, access_ok() is a macro that casts the address parameter, hiding issues in its users. Move around and use the existing usr_data and usr_oob temporary variables to kill the warnings. Add a few "consts", and make more use of the temporaries while we're at it. Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 pekon gupta 提交于
fixes: commit 62116e51 mtd: nand: omap2: Support for hardware BCH error correction. In omap_elm_correct_data(), if bitflip_count in an erased-page is within the correctable limit (< ecc.strength), then it is not indicated back to the caller ecc->read_page(). This mis-guides upper layers like MTD and UBIFS layer to assume erased-page as perfectly clean and use it for writing even if actual bitflip_count was dangerously high (bitflip_count > mtd->bitflip_threshold). This patch fixes this above issue, by returning 'stats' to caller ecc->read_page() under all scenarios. Reported-by: NBrian Norris <computersforpeace@gmail.com> Signed-off-by: NPekon Gupta <pekon@ti.com> Cc: <stable@vger.kernel.org> # 3.9.x+ Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 14 5月, 2014 1 次提交
-
-
由 Rusty Russell 提交于
In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 13 5月, 2014 6 次提交
-
-
由 Mike Snitzer 提交于
The comparisons used in add_vol() shouldn't be identical. Pretty sure the following is correct but it is completely untested. Signed-off-by: NMike Snitzer <snitzer@redhat.com> Acked-by: NRichard Weinberger <richard@nod.at> Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
由 Ezequiel Garcia 提交于
The UBI volume rename ioctl (UBI_IOCRNVOL) open the volumes in exclusive mode. The volumes are opened for two reasons: to build a volume rename list, and a volume remove list. However, the first open constraint is excessive and can be replaced by a 'read-write' open mode. The second open constraint is properly set as 'exclusive' given the volume is opened for removal and we don't want any users around. By weakening the former 'exclusive' mode, we allow 'read-only' users to keep the volume open, while a rename is taking place. This is useful to perform an atomic rename, in a firmware upgrade scenario, while keeping the volume in read-only use (for instance, if a ubiblock is mounted as rootfs). It's worth mention this is not the case of UBIFS, which keeps the volume opened as 'read-write' despite mounted as read-write or read-only mode. This change was suggested at least twice by Artem: http://lists.infradead.org/pipermail/linux-mtd/2012-September/044175.html http://permalink.gmane.org/gmane.linux.drivers.mtd/39866Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
由 Geert Uytterhoeven 提交于
Spansion s25sl032p supports Dual and Quad SPI transfers, hence set the SPI_NOR_DUAL_READ and SPI_NOR_QUAD_READ flags. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Geert Uytterhoeven 提交于
Commit 03e296f6 ("mtd: m25p80: use the SPI nor framework") accidentally removed support for Dual SPI read transfers. Add it back. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NHuang Shijie <shijie8@gmail.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Wolfram Sang 提交于
Fixes: drivers/mtd/devices/elm.c:480:12: warning: 'elm_suspend' defined but not used [-Wunused-function] drivers/mtd/devices/elm.c:488:12: warning: 'elm_resume' defined but not used [-Wunused-function] Signed-off-by: NWolfram Sang <wsa@sang-engineering.com> Acked-by: NPekon Gupta <pekon@ti.com> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
由 Jean Delvare 提交于
Anyone working with an AMD Elan SC520 development or evaluation board would be building a dedicated kernel for it, so we can make the sc520cdp and netsc520 maps depend on MELAN. SC520_CPUFREQ already depends on MELAN so it makes things more consistent. It also makes kernel configuration for every other x86 user easier. Signed-off-by: NJean Delvare <jdelvare@suse.de> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
-
- 10 5月, 2014 1 次提交
-
-
由 Brian Norris 提交于
The nand_chip::erase_cmd callback previously served a dual purpose; for one, it allowed a per-flash-chip override, so that AG-AND devices could use a different erase command than other NAND. These AND devices were dropped in commit 14c65786 (mtd: nand: remove AG-AND support). On the other hand, some drivers (denali and doc-g4) need to use this sort of callback to implement controller-specific erase operations. To make the latter operation easier for some drivers (e.g., ST's new BCH NAND driver), it helps if the command dispatch and wait functions can be lumped together, rather than called separately. This patch does two things: 1. Pull the call to chip->waitfunc() into chip->erase_cmd(), and return the status from this callback 2. Rename erase_cmd() to just erase(), since this callback does a little more than just send a command Signed-off-by: NBrian Norris <computersforpeace@gmail.com> Tested-by: NLee Jones <lee.jones@linaro.org>
-