- 04 Feb, 2013 31 commits
-
-
Hauke Mehrtens authored
The callback assumes the number of read bytes is written to retlen. Signed-off-by:
Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Huang Shijie authored
We do the check based on the following two facts: [1] The mx23/mx28 can only support 20-bits ECC, while the mx6 can supports 40-bits ECC. [2] The mx23/mx28 can only support the GF13, while the mx6 can supports GF13 and GF14. Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Huang Shijie authored
The GF13 can be only used in the following case: The ECC data chunk is less then 1K bytes. In mx23/mx28, the ecc data chunk is 512 bytes. So it is okay. But in mx6q, we begin to use some large nand chip whose ecc data chunk maybe 1K bytes long. So when the data chunk is 1K bytes, we have to use the GF14. This patch sets the Golois Field bit when the GF14 is needed. Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Philip Avinash authored
As part of removing generalized dependency, replace <xx> literal fields in DT compatible field with <52> for am335x platforms. Signed-off-by:
Philip Avinash <avinashphilip@ti.com> Acked-by:
Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Huang Shijie authored
The patch "490e280a mtd: gpmi-nand: Convert to module_platform_driver()" introduced a "dereferencing freed memory" error. This patch fixes it. Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Huang Shijie authored
The panic_nand_wait() expects the timeo in ms and not in jiffies. But in nand_wait(), the timeo for panic_nand_wait() is assigned with wrong value(jiffies + some delay). The timeo should be set like the panic_nand_write() does. This patch passes timeo in ms to panic_nand_wait(). And this patch also passes timeo in jiffies(converted by msecs_to_jiffies) to time_before() which makes the code more readable. Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Stefan Roese authored
Currently cfi_cmdset_0002.c does not support PPB locking of sectors. This patch adds support for this locking/unlocking mechanism. It is needed on some platforms, since newer U-Boot versions do support this PPB locking and protect for example their environment sector(s) this way. This PPB locking/unlocking will be enabled for all devices supported by cfi_cmdset_0002 reporting 8 in the CFI word 0x49 (Sector Protect/Unprotect scheme). Please note that PPB locking does support sector-by-sector locking. But the whole chip can only be unlocked together. So unlocking one sector will automatically unlock all sectors of this device. Because of this chip limitation, the PPB unlocking function saves the current locking status of all sectors before unlocking the whole device. After unlocking the saved locking status is re-configured. This way only the addressed sectors will be unlocked. To selectively enable this advanced sector protection mechanism, the device-tree property "use-advanced-sector-protection" has been created. To enable support for this locking this property needs to be present in the flash DT node. E.g.: nor_flash@0,0 { compatible = "amd,s29gl256n", "cfi-flash"; bank-width = <2>; use-advanced-sector-protection; ... Tested with Spansion S29GL512S10THI and Micron JS28F512M29EWx flash devices. Signed-off-by:
Stefan Roese <sr@denx.de> Tested-by:
Holger Brunck <holger.brunck@keymile.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Lubomir Rintel authored
Signed-off-by:
Lubomir Rintel <lkundrak@v3.sk> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Lubomir Rintel authored
All other partitioning schemes can be compiled as modules Signed-off-by:
Lubomir Rintel <lkundrak@v3.sk> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Huang Shijie authored
Dump the BCH registers in gpmi_dump_info(). Signed-off-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Tormod Volden authored
Add the function name to the error message. These messages are not very helpful: [183356.176682] uncorrectable error : [183356.180273] uncorrectable error : [183356.184194] uncorrectable error : [183356.187773] uncorrectable error : [183356.191280] uncorrectable error : Artem: amended the patch a bit Signed-off-by:
Tormod Volden <debian.tormod@gmail.com>
-
Kim Phillips authored
in/out_be32 accessors are Power arch centric whereas ioread/writebe32 are available in other arches. Since the IFC device registers are annotated big endian in fsl_ifc.h, the accessor annotations now match, resulting in the pleasant side-effect of this patch silencing sparse endian warnings such as the following: drivers/mtd/nand/fsl_ifc_nand.c:179:19: warning: incorrect type in argument 1 (different base types) drivers/mtd/nand/fsl_ifc_nand.c:179:19: expected unsigned int volatile [noderef] [usertype] <asn:2>*addr drivers/mtd/nand/fsl_ifc_nand.c:179:19: got restricted __be32 [noderef] <asn:2>*<noident> Signed-off-by:
Kim Phillips <kim.phillips@freescale.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Uwe Kleine-König authored
I was (at least) the second person trying to fix a warning by sparse, so document in the code why this is a bad idea and add an extern declaration to make sparse happy. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by:
Mike Frysinger <vapier@gentoo.org> Acked-by:
Greg Ungerer <gerg@uclinux.org> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Uwe Kleine-König authored
This allows to put the filesystem at a defined address in ROM allowing to save more precious RAM. I think it's safe to default to ROM because the intention of using the uclinux map is to use a romfs and so mtd-ram doesn't give you anything that mtd-rom doesn't. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by:
Greg Ungerer <gerg@uclinux.org> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Rafał Miłecki authored
Signed-off-by:
Rafał Miłecki <zajec5@gmail.com>
-
Rafał Miłecki authored
It's required for accessing trx header (usually re-calculating a checksum) and for writing a new firmware. Signed-off-by:
Rafał Miłecki <zajec5@gmail.com>
-
Rafał Miłecki authored
Signed-off-by:
Rafał Miłecki <zajec5@gmail.com>
-
Michel Stempin authored
Add support for GigaDevice GD25Q32 32 Mbit (4 MB) SPI Flash (see datasheet: http://www.gigadevice.com/UserFiles/GD25Q32_Rev0.2(1).pdf) used in Hame MPR-A1 and clones, and for GigaDevice GD25Q64 64 Mbit (8 MB) SPI Flash used in Hame MPR-A2 devices (datasheet: http://www.gigadevice.com/UserFiles/GD25Q64.pdf). Signed-off-by:
Michel Stempin <michel.stempin@wanadoo.fr> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Philip Avinash authored
ELM module can be used for hardware error correction of BCH 4 & 8 bit. ELM module functionality is verified by checking the availability of handle for ELM module in device tree. Hence supporting 1. ELM module available, BCH error correction done by ELM module. Also support read & write page in one shot by adding custom read_page and write_page methods. This helps in optimizing code for NAND flashes with page size less than 4 KB. 2. If ELM module not available fall back to software BCH error correction support. New structure member is added to omap_nand_info 1. "is_elm_used" to know the status of whether the ELM module is used for error correction or not. 2. "elm_dev" device pointer to elm device on detection of ELM module. Also being here update the device tree documentation of gpmc-nand for adding optional property elm_id. Note: ECC layout uses 1 extra bytes for 512 byte of data to handle erased pages. Extra byte programmed to zero for programmed pages. Also BCH8 requires 14 byte ecc to maintain compatibility with RBL ECC layout. This results a common ecc layout across RBL, U-boot & Linux with BCH8. Signed-off-by:
Philip Avinash <avinashphilip@ti.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Philip Avinash authored
The ELM hardware module can be used to speedup BCH 4/8/16 ECC scheme error correction. For now only 4 & 8 bit support is added Signed-off-by:
Philip Avinash <avinashphilip@ti.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Philip Avinash authored
Remove check of ecc bytes with 13, number of errors can directly update from nand ecc strength. This will increase re-usability of the code. Also add macro definitions BCH8_ERROR_MAX & BCH4_ERROR_MAX for better readability and cleaner code. Signed-off-by:
Philip Avinash <avinashphilip@ti.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Roman Schneider authored
Also compress the id in case of a v3 NAND flash controller (i.mx51, i.mx53) and 16Bit buswidth. Signed-off-by:
Roman Schneider <schneider@at.festo.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Austin Boyle authored
This patch adds generic support for flash protection on STmicro chips. On chips with less than 3 protection bits, the unused bits are don't cares and so can be written anyway. The lock function will only change the protection bits if it would not unlock other areas. Similarly, the unlock function will not lock currently unlocked areas. Tested on the m25p64. Signed-off-by:
Austin Boyle <Austin.Boyle@aviatnet.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Akinobu Mita authored
Use more preferable function name which implies using a pseudo-random number generator. Signed-off-by:
Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Christopher Cordahi authored
/proc/mtd doesn't contain the mtd-id of the device, but the part name from the command line. This corrects what I believe is an obsolete comment from commit a0ee24a0. Signed-off-by:
Christopher Cordahi <christophercordahi@nanometrics.ca> Cc: Philip Rakity <prakity@yahoo.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Christopher Cordahi authored
The mtd documentation makes no mention of the useful feature whereby partitions' logical ordering need not match their physical ordering. Truncation of parts, skipping of zero sized parts, and handling of overlapping parts are similarly not mentioned. This updates the comments at the top of file describing the command line parsing as currently implemented. I proposed this in http://lists.infradead.org/pipermail/linux-mtd/2012-December/045314.htmlSigned-off-by:
Christopher Cordahi <christophercordahi@nanometrics.ca> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Christopher Cordahi authored
Perform flash size truncation before skipping zero sized partition so that if the result is a zero sized, it will be skipped like the others. Signed-off-by:
Christopher Cordahi <christophercordahi@nanometrics.ca> Acked-by:
Shmulik Ladkani <shmulik.ladkani@gmail.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Christopher Cordahi authored
Decrement index i after skipping a zero sized partition. On next loop iteration, the index will be the same as before, but the data will be new as it was moved when earlier partition was skipped. Signed-off-by:
Christopher Cordahi <christophercordahi@nanometrics.ca> Acked-by:
Shmulik Ladkani <shmulik.ladkani@gmail.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Zach Sadecki authored
Always report corrected and failed ECC stats back up to the MTD layer. Also return max_bitflips from read_page() as is expected from NAND drivers now. Signed-off-by:
Zach Sadecki <zsadecki@itwatchdogs.com> Acked-by:
Huang Shijie <b32955@freescale.com> Signed-off-by:
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-
Robert Jarzmik authored
Fix missing dependency which can cause a build error such as: ERROR: "byte_rev_table" [drivers/mtd/devices/docg3.ko] undefined! Reported-by:
Randy Dunlap <rdunlap@infradead.org> Acked-by:
Randy Dunlap <rdunlap@infradead.org> Signed-off-by:
Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by:
David Woodhouse <David.Woodhouse@intel.com>
-
Sergei Shtylyov authored
Commit cdeadd71 (mtd: nand: davinci: add OF support for davinci nand controller) has never been really build tested with the driver as a module. When the driver is built-in, the missing semicolon after structure initializer is "compensated" by MODULE_DEVICE_TABLE() macro being empty and so the initializer using the trailing semicolon on the next line; when the driver is built as a module, compilation error ensues, and as the 'davinci_all_defconfig' has the NAND driver modular, this error prevents DaVinci family kernel from building... Signed-off-by:
Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by:
David Woodhouse <David.Woodhouse@intel.com> Cc: stable@vger.kernel.org # 3.7
-
- 01 Feb, 2013 2 commits
-
-
Linus Torvalds authored
-
git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dmLinus Torvalds authored
Pull more device-mapper fixes from Alasdair G Kergon: "A fix for stacked dm thin devices and a fix for the new dm WRITE SAME support." * tag 'dm-3.8-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm: dm: fix write same requests counting dm thin: fix queue limits stacking
-
- 31 Jan, 2013 7 commits
-
-
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hidLinus Torvalds authored
PullHID fixes from Jiri Kosina: - fix i2c-hid and hidraw interaction, by Benjamin Tissoires - a quirk to make a particular device (Formosa IR receiver) work properly, by Nicholas Santos * 'for-3.8/upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: i2c-hid: fix i2c_hid_output_raw_report HID: usbhid: quirk for Formosa IR receiver HID: remove x bit from sensor doc
-
git://git.linux-nfs.org/projects/trondmy/linux-nfsLinus Torvalds authored
Pull NFS client bugfixes from Trond Myklebust: - Error reporting in nfs_xdev_mount incorrectly maps all errors to ENOMEM - Fix an NFSv4 refcounting issue - Fix a mount failure when the server reboots during NFSv4 trunking discovery - NFSv4.1 mounts may need to run the lease recovery thread. - Don't silently fail setattr() requests on mountpoints - Fix a SUNRPC socket/transport livelock and priority queue issue - We must handle NFS4ERR_DELAY when resetting the NFSv4.1 session. * tag 'nfs-for-3.8-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFSv4.1: Handle NFS4ERR_DELAY when resetting the NFSv4.1 session SUNRPC: When changing the queue priority, ensure that we change the owner NFS: Don't silently fail setattr() requests on mountpoints NFSv4.1: Ensure that nfs41_walk_client_list() does start lease recovery NFSv4: Fix NFSv4 trunking discovery NFSv4: Fix NFSv4 reference counting for trunked sessions NFS: Fix error reporting in nfs_xdev_mount
-
git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds authored
Pull MIPS updates from Ralf Baechle: "A number of fixes all across the MIPS tree. No area is particularly standing out and things have cooled down quite nicely for a release." * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: Function tracer: Fix broken function tracing mips: Move __virt_addr_valid() to a place for MIPS 64 MIPS: Netlogic: Fix UP compilation on XLR MIPS: AR71xx: Fix AR71XX_PCI_MEM_SIZE MIPS: AR724x: Fix AR724X_PCI_MEM_SIZE MIPS: Lantiq: Fix cp0_perfcount_irq mapping MIPS: DSP: Fix DSP mask for registers. MIPS: Fix build failure by adding definition of pfn_pmd(). MIPS: Octeon: Fix warning. MIPS: delay.c: Check BITS_PER_LONG instead of __SIZEOF_LONG__ MIPS: PNX833x: Fix comment. MIPS: Add struct p_format to union mips_instruction. MIPS: Export <asm/break.h>. MIPS: BCM47xx: Enable SSB prerequisite SSB_DRIVER_PCICORE. MIPS: BCM47xx: Select GPIOLIB for BCMA on bcm47xx platform MIPS: vpe.c: Fix null pointer dereference in print arguments.
-
Benjamin Tissoires authored
i2c_hid_output_raw_report is used by hidraw to forward set_report requests. The current implementation of i2c_hid_set_report needs to take the report_id as an argument. The report_id is stored in the first byte of the buffer in argument of i2c_hid_output_raw_report. Not removing the report_id from the given buffer adds this byte 2 times in the command, leading to a non working command. Reported-by:
Andrew Duggan <aduggan@synaptics.com> Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
Al Cooper authored
Function tracing is currently broken for all 32 bit MIPS platforms. When tracing is enabled, the kernel immediately hangs on boot. This is a result of commit b732d439 that changes the kernel/trace/Kconfig file so that is no longer forces FRAME_POINTER when FUNCTION_TRACING is enabled. MIPS frame pointers are generally considered to be useless because they cannot be used to unwind the stack. Unfortunately the MIPS function tracing code has bugs that are masked by the use of frame pointers. This commit fixes the bugs so that MIPS frame pointers don't need to be enabled. The bugs are a result of the odd calling sequence used to call the trace routine. This calling sequence is inserted into every traceable function when the tracing CONFIG option is enabled. This sequence is generated for 32bit MIPS platforms by the compiler via the "-pg" flag. Part of the sequence is "addiu sp,sp,-8" in the delay slot after every call to the trace routine "_mcount" (some legacy thing where 2 arguments used to be pushed on the stack). The _mcount routine is expected to adjust the sp by +8 before returning. So when not disabled, the original jalr and addiu will be there, so _mcount has to adjust sp. The problem is that when tracing is disabled for a function, the "jalr _mcount" instruction is replaced with a nop, but the "addiu sp,sp,-8" is still executed and the stack pointer is left trashed. When frame pointers are enabled the problem is masked because any access to the stack is done through the frame pointer and the stack pointer is restored from the frame pointer when the function returns. This patch writes two nops starting at the address of the "jalr _mcount" instruction whenever tracing is disabled. This means that the "addiu sp,sp.-8" will be converted to a nop along with the "jalr". When disabled, there will be two nops. This is SMP safe because the first time this happens is during ftrace_init() which is before any other processor has been started. Subsequent calls to enable/disable tracing when other CPUs ARE running will still be safe because the enable will only change the first nop to a "jalr" and the disable, while writing 2 nops, will only be changing the "jalr". This patch also stops using stop_machine() to call the tracer enable/disable routines and calls them directly because the routines are SMP safe. When the kernel first boots we have to be able to handle the gcc generated jalr, addui sequence until ftrace_init gets a chance to run and change the sequence. At this point mcount just adjusts the stack and returns. When ftrace_init runs, we convert the jalr/addui to nops. Then whenever tracing is enabled we convert the first nop to a "jalr mcount+8". The mcount+8 entry point skips the stack adjust. [ralf@linux-mips.org: Folded in Steven Rostedt's build fix.] Signed-off-by:
Al Cooper <alcooperx@gmail.com> Cc: rostedt@goodmis.org Cc: ddaney.cavm@gmail.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/4806/ Patchwork: https://patchwork.linux-mips.org/patch/4841/Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-
Alasdair G Kergon authored
When processing write same requests, fix dm to send the configured number of WRITE SAME requests to the target rather than the number of discards, which is not always the same. Device-mapper WRITE SAME support was introduced by commit 23508a96 ("dm: add WRITE SAME support"). Signed-off-by:
Alasdair G Kergon <agk@redhat.com> Acked-by:
Mike Snitzer <snitzer@redhat.com>
-
Steven Rostedt authored
Commit d3ce8843 "MIPS: Fix modpost error in modules attepting to use virt_addr_valid()" moved __virt_addr_valid() from a macro in a header file to a function in ioremap.c. But ioremap.c is only compiled for MIPS 32, and not for MIPS 64. When compiling for my yeeloong2, which supposedly supports hibernation, which compiles kernel/power/snapshot.c which calls virt_addr_valid(), I got this error: LD init/built-in.o kernel/built-in.o: In function `memory_bm_free': snapshot.c:(.text+0x4c9c4): undefined reference to `__virt_addr_valid' snapshot.c:(.text+0x4ca58): undefined reference to `__virt_addr_valid' kernel/built-in.o: In function `snapshot_write_next': (.text+0x4e44c): undefined reference to `__virt_addr_valid' kernel/built-in.o: In function `snapshot_write_next': (.text+0x4e890): undefined reference to `__virt_addr_valid' make[1]: *** [vmlinux] Error 1 make: *** [sub-make] Error 2 I suspect that __virt_addr_valid() is fine for mips 64. I moved it to mmap.c such that it gets compiled for mips 64 and 32. Signed-off-by:
Steven Rostedt <rostedt@goodmis.org> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/4842/Signed-off-by:
Ralf Baechle <ralf@linux-mips.org>
-