summaryrefslogtreecommitdiff
path: root/drivers/mtd
AgeCommit message (Collapse)Author
2012-11-12Merge branch 'l4t/l4t-r16-r2' into colibriMarcel Ziswiler
Conflicts: arch/arm/mach-tegra/tegra3_usb_phy.c arch/arm/mach-tegra/usb_phy.c drivers/usb/gadget/tegra_udc.c drivers/usb/otg/Makefile drivers/video/tegra/fb.c sound/soc/tegra/tegra_pcm.c
2012-09-10Merge branch 'l4t/l4t-r16' into colibriMarcel Ziswiler
Merge with latest NVIDIA L4T R16. Only real conflict concerning inverted VBUS gpio support.
2012-08-28E1853 BRINGUP Linux Snor: Micron SupportBob Johnston
Expanding NOR functionality to work with ADMUX and Burst mode for Micron Support in E1853. Bug 989919 Bug 966833 - Adding fields for picking MUX vs NONMUX and picking Async, Paging, Burst mode for reads - Added run time decision between them - 1853 specific settings for Async NOR - 1852 specific settings for NOR - 1853 NOR timings changed Reviewed-on: http://git-master/r/122286 (cherry picked from commit a242e7194c7de559d22fe5b275a8782086f10e50) Change-Id: I79de1d52d4c7199c83b380c2fa6d8cae6b35f09d Signed-off-by: Bob Johnston <BJohnston@nvidia.com> Reviewed-on: http://git-master/r/124946 Tested-by: Bob Johnston <bjohnston@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2012-08-24mtd: tegra: initialize writebufsizeMarcel Ziswiler
Using UBI on tegra can give messages like: root@colibri-t20:~# ubiattach -m 0 [ 115.218710] UBI: attaching mtd0 to ubi0 [ 115.229108] UBI error: io_init: bad write buffer size 0 for 4096 min. I/O unit ubiattach: error!: cannot attach mtd0 error 22 (Invalid argument) The writebufsize concept was introduce by commit "0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents the maximum amount of data the device writes to the media at a time. This is an important parameter for UBIFS which is used during recovery and which basically defines how big a corruption caused by a power cut can be. Set writebufsize to the flash page size because it is the maximum amount of data it writes at a time.
2012-08-13mtd: tegra-nor: treat warnings as errorsDeepak Nibade
add compilation flag to treat warnings as errors handle error of variable declaration bug 949219 Change-Id: Iac05d4d0e4c4cbf39a534b7aee32c0dac57ae49d Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/118027 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sanjay Singh Rawat <srawat@nvidia.com> Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com> Reviewed-by: Manoj Chourasia <mchourasia@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-08-03mtd: nand: tegra: get rid of tegra_gpio_enable()Laxman Dewangan
The gpio mode of pin is configured when setting direction and hence this call is no more required. Change-Id: Id1730f48d43134c67eb1e6edf70884e3e5f582d2 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/120849 Reviewed-by: Automatic_Commit_Validation_User
2012-08-02nand: tegra: treat warnings as errorsDeepak Nibade
add compilation flag to treat warnings as errors bug 949219 Change-Id: Iac1b0e608ac5b19f5f84380ab7ffc76e14c3d7a0 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/118033 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sanjay Singh Rawat <srawat@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2012-06-13mtd: tegra-nor: Fix dma/cpu coherency issuesManoj Chourasia
Call dma sync single api's to maintain coherency between CPU, dma and device in data transfers. bug 984029 bug 980884 Change-Id: I50b5a24a7ce482f473670347af3c75d6975c6060 Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com> Reviewed-on: http://git-master/r/105917 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2012-06-08Initial Toradex Colibri T20 L4T R15 support.Marcel Ziswiler
2012-05-10Arm: Tegra: Nor: use timing1 proper valueMohit Kataria
timing1_read was initialized with timing0 from nor platform data changed the same to use timing1 from platform data instead of timing0 Bug 934187 Change-Id: I04c41323de25fb2bb53dac91301cee9c0820707a Signed-off-by: Mohit Kataria <mkataria@nvidia.com> Reviewed-on: http://git-master/r/95293 Reviewed-on: http://git-master/r/100904 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Amlan Kundu <akundu@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2012-03-30mtd: chips: support for the new CFI version 1.5 and write buffer programmingManoj Chourasia
This patch add CFI version 1.5 support. It replaces classic word programming by write buffer programming and sets the FFS write size to 512 bytes. The patch taken from spansion bug 906309 Reviewed-on: http://git-master/r/89412 (cherry picked from commit 733c7ef4b9bdc52ac95095436a5cf83aa0296da5) Change-Id: I63cbd0bad077e055d6efd4e2b4c7d26c608d1b66 Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com> Reviewed-on: http://git-master/r/91307 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Amlan Kundu <akundu@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2012-03-19Drivers: MTD: NAND: restore to the NAND controllerRamalingam C
On entering the power saving mode NAND controller registers are getting reset. With this change resume will restore the controller registers' values. Bug 933291 Change-Id: Ia1a43827b4b4a91ab1383bf07c3c0fe3068b666b Signed-off-by: Ramalingam C <ramalingamc@nvidia.com> Reviewed-on: http://git-master/r/90883 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Preetham Chandru <pchandru@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-02-17mtd: tegra-nor: Use staged read from NORManoj Chourasia
Most of the large read requests passed by upper MTD block layer are for highmem region which dma_map_single cannot handle. Those requests were getting serviced by memcpy_fromio, this was degrading performance. Moreover the memory region passed to dma_map_single should be on cache line boundaries. If the requirement is not met then system may crash due to cache incoherency. The approach added in this patch is to have a DMA coherent memory buffer. Read device via DMA to this coherent buffer and them memcpy it to user space pointer. This not only fixes some bugs but also enhances the NOR read performance. bug 928788 bug 898250 Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com> Reviewed-on: http://git-master/r/76866 (cherry picked from commit 1491c0461a627c3bb63b01e126585eff9922ba1a) Change-Id: Ic8e24d2cc965f84bb97d2b6b29f27458aba17720 Reviewed-on: http://git-master/r/84026 Tested-by: Manoj Chourasia <mchourasia@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2012-02-13mtd: tegra-nor: Replace add_mtd_device with mtd_device_register()Manoj Chourasia
The older add_mtd_device()/add_mtd_partitions() and their removal are depricated. Replace uses with mtd_device_register() and mtd_device_unregister(). bug 923135 Change-Id: I03790072d95ac27b4f11a6c522bb5d9de087a0df Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com> Reviewed-on: http://git-master/r/83073 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Preetham Chandru <pchandru@nvidia.com> Reviewed-by: Sandeep Trasi <strasi@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-24Merge branch 'linux-3.1.y' into android-tegra-nv-3.1Varun Wadekar
Linux 3.1.10 Change-Id: I465d184c492e8041dd0cd90f2cb70fde17ba7118 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-19tegra: nor: always build partitioning supportPreetham Chandru
Remove the CONFIG_MTD_PARTITIONS preprocessor conditionals as partitioning is always available. Moreover as none of the drivers use CONFIG_MTD_PARTITIONS, this has been undefined in Kconfig from 2.6.39 onwords. The following commit 6a8a98b22b10f1560d5f90aded4a54234b9b2724 has removed the CONFIG_MTD_PARTITIONS in Kconfig. Bug: 923135 Change-Id: I8acb6ac2df26d9983b4cfe5869bc97a5861da573 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Reviewed-on: http://git-master/r/75895 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Shashank Sharma <shashanks@nvidia.com> Reviewed-by: Kiran Adduri <kadduri@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-19tegra: nand: always build partitioning supportPreetham Chandru
Remove the CONFIG_MTD_PARTITIONS preprocessor conditionals as partitioning is always available. Moreover as none of the drivers use CONFIG_MTD_PARTITIONS, this has been undefined in Kconfig from 2.6.39 onwords. The following commit 6a8a98b22b10f1560d5f90aded4a54234b9b2724 has removed the CONFIG_MTD_PARTITIONS in Kconfig. Bug: 923135 Change-Id: Id75da462c4ec58baf4da72a0f210b02517374de6 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Reviewed-on: http://git-master/r/75871 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Shashank Sharma <shashanks@nvidia.com> Reviewed-by: Kiran Adduri <kadduri@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-18UBI: fix use-after-free on error pathArtem Bityutskiy
commit e57e0d8e818512047fe379157c3f77f1b9fabffb upstream. When we fail to erase a PEB, we free the corresponding erase entry object, but then re-schedule this object if the error code was something like -EAGAIN. Obviously, it is a bug to use the object after we have freed it. Reported-by: Emese Revfy <re.emese@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-18UBI: fix missing scrub when there is a bit-flipBhavesh Parekh
commit e801e128b2200c40a0ec236cf2330b2586b6e05a upstream. Under some cases, when scrubbing the PEB if we did not get the lock on the PEB it fails to scrub. Add that PEB again to the scrub list Artem: minor amendments. Signed-off-by: Bhavesh Parekh <bparekh@nvidia.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-18mtd: tests: stresstest: bail out if device has not enough eraseblocksWolfram Sang
commit 2f4478ccff7df845dc9c0f8996a96373122c4417 upstream. stresstest needs at least two eraseblocks. Bail out gracefully if that condition is not met. Fixes the following 'division by zero' OOPS: [ 619.100000] mtd_stresstest: MTD device size 131072, eraseblock size 131072, page size 2048, count of eraseblocks 1, pages per eraseblock 64, OOB size 64 [ 619.120000] mtd_stresstest: scanning for bad eraseblocks [ 619.120000] mtd_stresstest: scanned 1 eraseblocks, 0 are bad [ 619.130000] mtd_stresstest: doing operations [ 619.130000] mtd_stresstest: 0 operations done [ 619.140000] Division by zero in kernel. ... caused by /* Read or write up 2 eraseblocks at a time - hence 'ebcnt - 1' */ eb %= (ebcnt - 1); Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-18mtd: mtd_blkdevs: don't increase 'open' count on error pathBrian Norris
commit 342ff28f5a2e5aa3236617bd2bddf6c749677ef2 upstream. Some error paths in mtd_blkdevs were fixed in the following commit: commit 94735ec4044a6d318b83ad3c5794e931ed168d10 mtd: mtd_blkdevs: fix error path in blktrans_open But on these error paths, the block device's `dev->open' count is already incremented before we check for errors. This meant that, while the error path was handled correctly on the first time through blktrans_open(), the device is erroneously considered already open on the second time through. This problem can be seen, for instance, when a UBI volume is simultaneously mounted as a UBIFS partition and read through its corresponding gluebi mtdblockX device. This results in blktrans_open() passing its error checks (with `dev->open > 0') without actually having a handle on the device. Here's a summarized log of the actions and results with nandsim: # modprobe nandsim # modprobe mtdblock # modprobe gluebi # modprobe ubifs # ubiattach /dev/ubi_ctrl -m 0 ... # ubimkvol /dev/ubi0 -N test -s 16MiB ... # mount -t ubifs ubi0:test /mnt # ls /dev/mtdblock* /dev/mtdblock0 /dev/mtdblock1 # cat /dev/mtdblock1 > /dev/null cat: can't open '/dev/mtdblock4': Device or resource busy # cat /dev/mtdblock1 > /dev/null CPU 0 Unable to handle kernel paging request at virtual address fffffff0, epc == 8031536c, ra == 8031f280 Oops[#1]: ... Call Trace: [<8031536c>] ubi_leb_read+0x14/0x164 [<8031f280>] gluebi_read+0xf0/0x148 [<802edba8>] mtdblock_readsect+0x64/0x198 [<802ecfe4>] mtd_blktrans_thread+0x330/0x3f4 [<8005be98>] kthread+0x88/0x90 [<8000bc04>] kernel_thread_helper+0x10/0x18 Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-18mtd: mtdoops: skip reading initially bad blocksRoman Tereshonkov
commit 3538c56329936c78f7d356889908790006d0124c upstream. Use block_isbad to check and skip the bad blocks reading. This will allow to get rid of the read errors if bad blocks are present initially. Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-18mtdoops: fix the oops_page_used array sizeRoman Tereshonkov
commit 556f063580db2953a7e53cd46b47724246320f60 upstream. The array of unsigned long pointed by oops_page_used is allocated by vmalloc which requires the size to be in bytes. BITS_PER_LONG is equal to 32. If we want to allocate memory for 32 pages with one bit per page then 32 / BITS_PER_LONG is equal to 1 byte that is 8 bits. To fix it we need to multiply the result by sizeof(unsigned long) equal to 4. Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-21tegra: nand: fix memory leak in cleanup codeBhavesh Parekh
Bug 913416 Change-Id: I19f45bcd2c1ef9cb625728294b1dd53695e7d64b Signed-off-by: Bhavesh Parekh <bparekh@nvidia.com> Reviewed-on: http://git-master/r/69938 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: David Schalig <dschalig@nvidia.com> Tested-by: David Schalig <dschalig@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2011-12-15tegra: nor: Add NOR mapping driver.Manoj Chourasia
This patch adds NOR mapping driver for tegra2 and tegra3. Signed-off-by: Manoj Chourasia<mchourasia@nvidia.com> Change-Id: Ie773d024a49977e356d4a9d605910ca30f22a3f3 Reviewed-on: http://git-master/r/43566 Reviewed-on: http://git-master/r/62149 Tested-by: Manoj Chourasia <mchourasia@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
2011-11-30Merge branch 'korg-android-tegra-3.1' into after-upstream-androidDan Willemsen
Conflicts: arch/arm/mach-tegra/Kconfig arch/arm/mach-tegra/board-ventana.c drivers/misc/Kconfig drivers/video/tegra/dc/hdmi.c Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
2011-11-30gcov-kernel: Add GCOV_KERNEL := y to MakefilesJuha Tukkinen
These changes have no effect if CONFIG_GCOV_KERNEL is not set in defconfig. It is easier to trigger GCOV for kernel if this patch is in by only setting the before mentioned flag. Change-Id: I8aade309da2da62c4b3889bd84e4123ba8f182da Signed-off-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-on: http://git-master/r/62999 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Rebase-Id: R4c238f707f1db600f188ae83426336753992b7be
2011-11-303.0: update mtd apiDan Willemsen
Rebase-Id: R3cff5fe5cf5f95670f9481dcbf66d230e3cde6b1
2011-11-30tegra: nand: Added features in the driverBhavesh Parekh
Added 4K page support. Added 16-bit support Added sys interfaces for various operations. Added support for un-aligned page read. Added setting timing values based on vendor-id/device-id. Moved support for setting clock to platform from the driver. Fixed OOB-Read/Write issues. Original-Change-Id: Idf920c1cb0352dcda0282fa399d6c1f57a20736c Reviewed-on: http://git-master/r/42347 Tested-by: Bhavesh Parekh <bparekh@nvidia.com> Reviewed-by: Sandeep Trasi <strasi@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Rebase-Id: Refa8b8aa651f824a27513bfe663c57237dde2beb
2011-11-30Merge branch 'korg-android-3.1' into korg-android+linux-tegra-3.1Dan Willemsen
Conflicts: arch/arm/mm/cache-l2x0.c drivers/misc/Kconfig drivers/misc/Makefile Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
2011-11-30mtd: nand: Add naieve panic_write support for generic nand devices.San Mehat
Signed-off-by: San Mehat <san@google.com> mtd: nand_base: fix nand_panic_wait fix the problem of nand_panic_wait Signed-off-by: Tom Zhu <a2289c@android-hal-04.(none)> Signed-off-by: San Mehat <san@google.com>
2011-11-30mtd: nand: Allow NAND chip ids to be included standalone.Dima Zavin
Lets non-standard NAND drivers take advantage of known NAND chip information. Change-Id: I87e2fcb40b07b2ec91e102f1fa7f419a4b4af0a3 Signed-off-by: Dima Zavin <dima@android.com>
2011-11-30mtd/tegra_nand: don't ignore return value for add_mtd_partitionsGary King
when the mtd partition command line format is used, ignoring the return value left err set to the number of partitions, which was later interpreted as an error return code for tegra_nand_probe, which caused the MTD master to be unregistered (ultimately causing NULL pointer derefs when mounting the root partition). Change-Id: Icebfb295810554617c56deeafc91bc22cc43bb35 Signed-off-by: Gary King <gking@nvidia.com>
2011-11-30[ARM] mtd: NVIDIA Tegra NAND controller driver.Colin Cross
Change-Id: I6f0b18c5621bcf8fb6cde8e7b05828075db72594 CC: Dima Zavin <dima@android.com> Signed-off-by: Colin Cross <ccross@android.com>
2011-11-11mtd: nand_base: always initialise oob_poi before writing OOB dataTHOMSON, Adam (Adam)
commit f722013ee9fd24623df31dec9a91a6d02c3e2f2f upstream. In nand_do_write_ops() code it is possible for a caller to provide ops.oobbuf populated and ops.mode == MTD_OOB_AUTO, which currently means that the chip->oob_poi buffer isn't initialised to all 0xFF. The nand_fill_oob() method then carries out the task of copying the provided OOB data to oob_poi, but with MTD_OOB_AUTO it skips areas marked as unavailable by the layout struct, including the bad block marker bytes. An example of this causing issues is when the last OOB data read was from the start of a bad block where the markers are not 0xFF, and the caller wishes to write new OOB data at the beginning of another block. In this scenario the caller would provide OOB data, but nand_fill_oob() would skip the bad block marker bytes in oob_poi before copying the OOB data provided by the caller. This means that when the OOB data is written back to NAND, the block is inadvertently marked as bad without the caller knowing. This has been witnessed when using YAFFS2 where tags are stored in the OOB. To avoid this oob_poi is always initialised to 0xFF to make sure no left over data is inadvertently written back to the OOB area. Credits to Brian Norris <computersforpeace@gmail.com> for fixing this patch. Signed-off-by: Adam Thomson <adam.thomson@alcatel-lucent.com> Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11mtd: pxa3xx_nand: Fix blank page ECC mismatchDaniel Mack
commit 543e32d5ff165d0d68deedb0e3557478c7c36a4a upstream. This bug was introduced in f8155a40 ("mtd: pxa3xx_nand: rework irq logic") and causes the PXA3xx NAND controller fail to operate with NAND flash that has empty pages. According to the comment in this block, the hardware controller will report a double-bit error for empty pages, which can and must be ignored. This patch restores the original behaviour of the driver. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Lei Wen <leiwen@marvell.com> Cc: Haojian Zhuang <haojian.zhuang@marvell.com> Cc: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11mtd: pxa3xx_nand: fix nand detection issueLei Wen
commit 0fab028b77d714ad302404b23306cf7adb885223 upstream. When keep_config is set, the detection would goes different routine. That the driver would read out the setting which is set previously by bootloader. While most bootloader keep the irq mask as off, and current driver need all irq default open, keep_config behavior would lead to no irq at all. Signed-off-by: Lei Wen <leiwen@marvell.com> Tested-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11mtd: provide an alias for the redboot module nameAndres Salomon
commit d5de1907d0af22e1a02de2b16a624148517a39c2 upstream. parse_mtd_partitions takes a list of partition types; if the driver isn't loaded, it attempts to load it, and then it grabs the partition parser. For redboot, the module name is "redboot.ko", while the parser name is "RedBoot". Since modprobe is case-sensitive, attempting to modprobe "RedBoot" will never work. I suspect the embedded systems that make use of redboot just always manually loaded redboot prior to loading their specific nand chip drivers (or statically compiled it in). Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11mtd: mtdchar: add missing initializer on raw writePeter Wippich
commit bf5140817b2d65faac9b32fc9057a097044ac35b upstream. On writes in MODE_RAW the mtd_oob_ops struct is not sufficiently initialized which may cause nandwrite to fail. With this patch it is possible to write raw nand/oob data without additional ECC (either for testing or when some sectors need different oob layout e.g. bootloader) like nandwrite -n -r -o /dev/mtd0 <myfile> Signed-off-by: Peter Wippich <pewi@gw-instruments.de> Tested-by: Ricard Wanderlof <ricardw@axis.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19UBI: do not link debug messages when debugging is disabledArtem Bityutskiy
Michal Marek spotted the same issue in UBIFS and this patch fixes UBI, see "UBIFS: not build debug messages with CONFIG_UBIFS_FS_DEBUG disabled" When UBI debugging is disabled, we have debugging messages defined as: if (0) pr_debug() But pr_debug macro defines data structures with debugging data and makes the linux binary larger, even though we have "if (0)". Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
2011-07-25Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) fs: Merge split strings treewide: fix potentially dangerous trailing ';' in #defined values/expressions uwb: Fix misspelling of neighbourhood in comment net, netfilter: Remove redundant goto in ebt_ulog_packet trivial: don't touch files that are removed in the staging tree lib/vsprintf: replace link to Draft by final RFC number doc: Kconfig: `to be' -> `be' doc: Kconfig: Typo: square -> squared doc: Konfig: Documentation/power/{pm => apm-acpi}.txt drivers/net: static should be at beginning of declaration drivers/media: static should be at beginning of declaration drivers/i2c: static should be at beginning of declaration XTENSA: static should be at beginning of declaration SH: static should be at beginning of declaration MIPS: static should be at beginning of declaration ARM: static should be at beginning of declaration rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check Update my e-mail address PCIe ASPM: forcedly -> forcibly gma500: push through device driver tree ... Fix up trivial conflicts: - arch/arm/mach-ep93xx/dma-m2p.c (deleted) - drivers/gpio/gpio-ep93xx.c (renamed and context nearby) - drivers/net/r8169.c (just context changes)
2011-07-24VFS : mount lock scalability for internal mountsTim Chen
For a number of file systems that don't have a mount point (e.g. sockfs and pipefs), they are not marked as long term. Therefore in mntput_no_expire, all locks in vfs_mount lock are taken instead of just local cpu's lock to aggregate reference counts when we release reference to file objects. In fact, only local lock need to have been taken to update ref counts as these file systems are in no danger of going away until we are ready to unregister them. The attached patch marks file systems using kern_mount without mount point as long term. The contentions of vfs_mount lock is now eliminated. Before un-registering such file system, kern_unmount should be called to remove the long term flag and make the mount point ready to be freed. Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-07-22Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (107 commits) vfs: use ERR_CAST for err-ptr tossing in lookup_instantiate_filp isofs: Remove global fs lock jffs2: fix IN_DELETE_SELF on overwriting rename() killing a directory fix IN_DELETE_SELF on overwriting rename() on ramfs et.al. mm/truncate.c: fix build for CONFIG_BLOCK not enabled fs:update the NOTE of the file_operations structure Remove dead code in dget_parent() AFS: Fix silly characters in a comment switch d_add_ci() to d_splice_alias() in "found negative" case as well simplify gfs2_lookup() jfs_lookup(): don't bother with . or .. get rid of useless dget_parent() in btrfs rename() and link() get rid of useless dget_parent() in fs/btrfs/ioctl.c fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers drivers: fix up various ->llseek() implementations fs: handle SEEK_HOLE/SEEK_DATA properly in all fs's that define their own llseek Ext4: handle SEEK_HOLE/SEEK_DATA generically Btrfs: implement our own ->llseek fs: add SEEK_HOLE and SEEK_DATA flags reiserfs: make reiserfs default to barrier=flush ... Fix up trivial conflicts in fs/xfs/linux-2.6/xfs_super.c due to the new shrinker callout for the inode cache, that clashed with the xfs code to start the periodic workers later.
2011-07-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1287 commits) icmp: Fix regression in nexthop resolution during replies. net: Fix ppc64 BPF JIT dependencies. acenic: include NET_SKB_PAD headroom to incoming skbs ixgbe: convert to ndo_fix_features ixgbe: only enable WoL for magic packet by default ixgbe: remove ifdef check for non-existent define ixgbe: Pass staterr instead of re-reading status and error bits from descriptor ixgbe: Move interrupt related values out of ring and into q_vector ixgbe: add structure for containing RX/TX rings to q_vector ixgbe: inline the ixgbe_maybe_stop_tx function ixgbe: Update ATR to use recorded TX queues instead of CPU for routing igb: Fix for DH89xxCC near end loopback test e1000: always call e1000_check_for_link() on e1000_ce4100 MACs. netxen: add fw version compatibility check be2net: request native mode each time the card is reset ipv4: Constrain UFO fragment sizes to multiples of 8 bytes virtio_net: Fix panic in virtnet_remove ipv6: make fragment identifications less predictable ipv6: unshare inetpeers can: make function can_get_bittiming static ...
2011-07-22Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6Linus Torvalds
* 'linux-next' of git://git.infradead.org/ubi-2.6: UBI: clarify the volume notification types' doc UBI: remove dead code UBI: dump stack when switching to R/O mode UBI: fix oops in error path UBI: switch debugging tests knobs to debugfs UBI: make it possible to use struct ubi_device in debug.h UBI: prepare debugging stuff to further debugfs conversion UBI: use debugfs for the extra checks knobs UBI: change the interface of a debugging check function
2011-07-20fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlersJosef Bacik
Btrfs needs to be able to control how filemap_write_and_wait_range() is called in fsync to make it less of a painful operation, so push down taking i_mutex and the calling of filemap_write_and_wait() down into the ->fsync() handlers. Some file systems can drop taking the i_mutex altogether it seems, like ext3 and ocfs2. For correctness sake I just pushed everything down in all cases to make sure that we keep the current behavior the same for everybody, and then each individual fs maintainer can make up their mind about what to do from there. Thanks, Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-07-11Merge branch 'master' into for-nextJiri Kosina
Sync with Linus' tree to be able to apply pending patches that are based on newer code already present upstream.
2011-07-05Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
2011-06-22powerpc/85xx: fix NAND_CMD_READID read bytes numberShaohui Xie
when nand_get_flash_type() is called, it will read 8 bytes of ID instead of 5, but the driver only read 5 bytes, so kernel will dump error messages like: fsl-lbc ffe124000.localbus: read_byte beyond end of buffer fsl-lbc ffe124000.localbus: read_byte beyond end of buffer fsl-lbc ffe124000.localbus: read_byte beyond end of buffer Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-06-21net: remove mm.h inclusion from netdevice.hAlexey Dobriyan
Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually). To prevent mm.h inclusion via other channels also extract "enum dma_data_direction" definition into separate header. This tiny piece is what gluing netdevice.h with mm.h via "netdevice.h => dmaengine.h => dma-mapping.h => scatterlist.h => mm.h". Removal of mm.h from scatterlist.h was tried and was found not feasible on most archs, so the link was cutoff earlier. Hope people are OK with tiny include file. Note, that mm_types.h is still dragged in, but it is a separate story. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>