summaryrefslogtreecommitdiff
path: root/drivers/mtd
AgeCommit message (Collapse)Author
2012-01-19Merge commit 'v2.6.35.14' into del-5.8/mainAlex Gonzalez
Conflicts: arch/arm/plat-mxc/include/mach/gpio.h arch/x86/kernel/cpu/mtrr/main.c drivers/mmc/core/core.c drivers/net/smsc911x.c fs/proc/task_mmu.c include/linux/pm_runtime.h mm/memory.c mm/mlock.c Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2011-09-01merge: merged changes from 2.6.28Robert Hodaszi
Conflicts: gpio Special handling of PORT A gpios is lost. Some code has been ported but it must be fixed. Signed-off-by: Hector Palacios <hector.palacios@digi.com> Signed-off-by: Robert Hodaszi <robert.hodaszi@digi.com>
2011-08-01mtd: mtdconcat: fix NAND OOB writeFelix Radensky
commit 431e1ecabddcd7cbba237182ddf431771f98bb4c upstream. Currently mtdconcat is broken for NAND. An attemtpt to create JFFS2 filesystem on concatenation of several NAND devices fails with OOB write errors. This patch fixes that problem. Signed-off-by: Felix Radensky <felix@embedded-sol.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andi Kleen <ak@linux.intel.com>
2011-08-01mxc_nd2: calculate limit page of boot part to skip BI swapHector Palacios
For platforms that need to skip the BI swap on the boot partition, calculate the limit page to skip the swap basing on the first partition size and the flash page size. The partition size is retrieved from the partition table passed in the command line. This has to be calculated before the second phase of the flash detection, where the bad blocks are scanned. For this reason the nand_scan_tail() is moved after calculating the boot part size, so that we can skip the BI swap (if needed) before scanning for bad blocks. This patch removes the previous hardcoded values, which only apply if the partition table is not given. Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2011-08-01mxc_nd2: skip swap BI for MX51 and MX53 TO1 revisionHector Palacios
MX51 (any revision) and MX53 TO1 ROM don't support BI swap solution so the swapping must be skipped when accessing the boot loader partition. MX53 TO2 and later revisions do support BI swap for the boot loader section and so the swapping must be done for any flash address. Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2011-08-01ENGR00142487 GPMI : use the platform's partition layout firstlyHuang Shijie
If the user has his own partition layout such as Android user. We can use it in the first priority. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2011-08-01ENGR00140486-1 MX50 Add SPI NOR Flash on RD3Robby Cai
support new chip M25P32 driver via FSL SPI interface Signed-off-by: Robby Cai <R63905@freescale.com> (cherry picked from commit fd4834656499f925b185aa70d6e3ba69d7a98d69) Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2011-08-01ENGR00139672-3 Make use of the new mx5x_revision callDinh Nguyen
For better alignment with the upstream i.MX kernel, switch from cpu_is_mx5x_rev() to mx5x_revision(). This is the drivers/ part of the patch. Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com> Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
2011-06-29ccxmx51 nand: compute earlier the last page to skip swap bbiPedro Perez de Heredia
This commit moves at an earlier stage the calculation of the last page where we do not have to do swap bbi. This was computed after the scan of the bbt causing problems on the variants with 2K pages. Signed-off-by: Pedro Perez de Heredia <pedro.perez@digi.com>
2011-06-29ccxmx51: add support for variants with 2GB nand flashPedro Perez de Heredia
Signed-off-by: Pedro Perez de Heredia <pedro.perez@digi.com>
2011-06-13gpmi: Allow building with power management disabled.Alejandro Gonzalez
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
2011-03-31mtd: add "platform:" prefix for platform modaliasAxel Lin
commit c804c733846572ca85c2bba60c7fe6fa024dff18 upstream. Since 43cc71eed1250755986da4c0f9898f9a635cb3bf (platform: prefix MODALIAS with "platform:"), the platform modalias is prefixed with "platform:". Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andi Kleen <ak@linux.intel.com>
2011-02-22ccwmx53: add nand flash supportPedro Perez de Heredia
Signed-off-by: Pedro Perez de Heredia <pedro.perez@digi.com>
2011-02-18cfi_probe: move the CFI read after filling cfi->cfiq membersHector Palacios
Commit 8473044d644553ca3c939249490d1c5ef5f6d4e6 moves down the code to enter Auto Select Mode. For this reason we also need to move down the code for reading the CFI info and apply specific manufacturer handling (like the NUMONYX write-buffer patch). This fixes vantive #37800 Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2011-02-16cfi_probe: add a define to include the m29w640 workaroundHector Palacios
Now the workaround is only applied if the constant is defined. Signed-off-by: Hector Palacios <hector.palacios@digi.com> (cherry picked from commit ae81bad2f9116184f8015e6f56e4f0ef652dce90) Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2011-02-03ENGR00137600-4 GPMI : remove the structure physical_geometry{} for common filesHuang Shijie
Use the MTD/NAND structrues to replace the physical_geometry{}. Frankly speaking, the mtd_info{} and nand_chip{} is the real physical geometry of the NAND. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137600-3 GPMI : remove the structure physical_geometry{} for main fileHuang Shijie
Remove the physical_geometry{} for the main file : [1] remove the /sys file for physical_geometry{} [2] use the nand_chip{} to display the `numchips` infomation. [3] update the copyright. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137600-2 GPMI : remove the structure physical_geometry{} for imx23Huang Shijie
Remove the physical_geometry{} in imx23. Also remove some empty lines. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137600-1 GPMI : remove the structure physical_geometry{}Huang Shijie
The MTD/NAND structrues have all the infomation the physical_geometry{} reserves. The physical_geometry{} makes the code too much layers, and makes the code much harder to understand. So remove it to make the code more readable. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137558-4 GPMI : remove the imx23-specific hooksHuang Shijie
The check_transcription_stamp() and write_transcription_stamp() are imx23-specific hooks. Change them to local functions, and remove the hooks in structure boot_rom_helper{}. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137558-3 GPMI : add ->rom_extra_init() for imx23Huang Shijie
Add the imx23-specific code for imx23. The code is about how to find the bad block marker in imx23. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137558-2 GPMI : remove the imx23-specific code from the common fileHuang Shijie
The removed code is all about the imx23. It should not exist in the common file. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137558-1 GPMI : add rom_extra_init() hook for ROMHuang Shijie
Add the ->rom_extra_init() hook for structure boot_rom_helper{}. This hook is used to initialize the ARCH-specific code. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137554 GPMI : init the `chip_count` after the identifier has been foundHuang Shijie
The chip_count should be initialized after the identifier is found, and just before we scan the bbt. The mil_set_boot_rom_helper_geometry() needs the `chip_count` to initialize some parameters, so move it in mil_pre_bbt_scan() too. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137496 GPMI : add alloc/free DMA buffer functionsHuang Shijie
Add these two functions to allocate or free the DMA buffers(including the DMA command buffer and DMA page buffer) for the GPMI driver. And use them to make code tidy and clean. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137487 GPMI : remove fake_ecc_layoutHuang Shijie
We use the ->init_size() to initialize the nand->ecc.layout now. So the fake_ecc_layout is redundant. Just remove it. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137479 NAND : change the `pagesize` field from 8192 to 0 for ONFI NANDHuang Shijie
Change the field to 0 will cause the kernel call the ->init_size() hook of the nand_chip{} which will set the proper parameters. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137472-2 GPMI : remove mil_set_mtd_geometry()Huang Shijie
This function is used to re-calculate the parameters for NAND and MTD. But because we have used the ->init_size() to initialize these parameters. So this function is useless, just remove it. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137472-1 GPMI : spilit the hack code from the mil_scan_bbt()Huang Shijie
Add the ->init_size() hook function for the GPMI driver. Move most the initialization code to ->init_size(). The origin code will do some more initialization in the BBT scanning which make the code mess. This patch makes the logic more clear. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137439 GPMI : remove the empty linesHuang Shijie
Remove the useless empty lines. Also remove some useless comments. Make the code tidy and clean. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137424 GPMI : remove the event reporting codeHuang Shijie
The code is compiled error, and it is useless to debug. Remove the code, make the code tidy. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137388 NAND: Correct flash-based BBT versionJason Liu
The flash-based BBT version is not set correctly Signed-off-by: Jason Liu <r64343@freescale.com>
2011-02-03ENGR00137270-4 GPMI : replace the old code with start_dma_without_bch_irq()Huang Shijie
Replace the old code with the function start_dma_without_bch_irq(). This will make code tidy and clean. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137270-3 GPMI : add a DMA starting function called in non-BCH contextHuang Shijie
This function is called in non-BCH context, such send_command(), read_data() and send_data(). Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137270-2 GPMI : use start_dma_with_bch_irq() to replace old codeHuang Shijie
Use the start_dma_with_bch_irq() to replace old code. This new code will make the imx23/imx28 wait the DMA for one second, If the DMA failed, an error will be printed. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137270-1 GPMI : add a separate DMA starting function with BCH interruptHuang Shijie
Add a separate DMA starting function for common use. Imx23 and imx28 should not wait for the DMA without time out. If a bug exits in the DMA engine, it will very hard to debug. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137259-2 NAND : remove `onfi_ddr_mode`Huang Shijie
Remove the onfi_ddr_mode valuable. Do not change any logic of the DATA operation. Remove some empty lines too. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-03ENGR00137259-1 NAND : share the same code for ONFI and TOGGLE nandHuang Shijie
Spilit the same initialization code for DDR. Make the code simply and tidy. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-02-01Merge branch 'hpalacio/2.6.35_merged' into master (2.6.35)Hector Palacios
Conflicts: arch/arm/Kconfig arch/arm/Makefile drivers/mtd/nand/Makefile drivers/net/can/Makefile drivers/net/smsc9118/smsc911x.c drivers/net/wireless/Kconfig drivers/net/wireless/Makefile drivers/spi/Kconfig drivers/spi/Makefile The following files were wrongly merged by git automatic merge tool and have to be reset to v2.6.35 version drivers/net/phy.c include/linux/phy.h Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2011-01-26solve merge conflictsHector Palacios
The previous merge commit was a mixed auto-manual merge operation not followed by a compilation. The present commit fixes compilation problems introduced by the merge operation. Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2011-01-21ccwmx51: add support to swap the bbi in the nandPedro Perez de Heredia
This commit adds the support to swap the bad block indicator. This is needed due to the special way that the nfc works, not being able of writing the full data page and then the spare area, on 2K page devices. Because the nfc writes blocks of 512+16 bytes, the bad block has to be relocated to take advantage of the hardware support when writing/reading to/from the nand using the ECC. Signed-off-by: Pedro Perez de Heredia <pedro.perez@digi.com>
2011-01-20mxc_nd2: disable writing BBT into flashPedro Perez de Heredia
We need to revisit in future the way used to handle bad blocks, using Bad Block Tables or just the informatino on the spare area. With the current linux driver, when writing the BBT into flash, causes that the bootlaoder missunderstands the 2 sectors where the BBT is stored, considering them as bad blocks. So, at the moment we skip the writing of the BBT into the flash. This review needs to be done in parallel with the bootloader (and WinCE). Signed-off-by: Pedro Perez de Heredia <pedro.perez@digi.com>
2011-01-20ccwmx51: Fix compilation warningAlejandro Gonzalez
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
2011-01-20mxc_nd2: add specific support for ccxmx51 modules (cmd line mtd partitions)Pedro Perez de Heredia
Signed-off-by: Pedro Perez de Heredia <pedro.perez@digi.com>
2011-01-20Merge branch 'del-2.6.28' into hpalacio/2.6.35_mergedHector Palacios
Conflicts: Documentation/filesystems/squashfs.txt arch/arm/Kconfig arch/arm/configs/ns9xxx_defconfig arch/arm/include/asm/elf.h arch/arm/kernel/module.c arch/arm/mach-ns9xxx/include/mach/system.h arch/arm/mach-ns9xxx/include/mach/uncompress.h arch/arm/mach-ns9xxx/irq.c arch/arm/mach-ns9xxx/plat-serial8250.c arch/arm/mach-s3c2410/include/mach/gpio.h arch/arm/mach-s3c2410/include/mach/map.h arch/arm/mach-s3c2410/include/mach/regs-gpio.h arch/arm/mach-s3c2410/include/mach/regs-gpioj.h arch/arm/mach-s3c2410/include/mach/usb-control.h arch/arm/plat-s3c/Kconfig arch/arm/plat-s3c/include/plat/regs-adc.h arch/arm/plat-s3c/include/plat/regs-serial.h arch/arm/plat-s3c/include/plat/uncompress.h arch/arm/plat-s3c24xx/Kconfig arch/arm/plat-s3c24xx/Makefile arch/arm/plat-s3c24xx/cpu.c arch/arm/plat-s3c24xx/devs.c arch/arm/plat-s3c24xx/dma.c arch/arm/plat-s3c24xx/include/plat/udc.h arch/arm/plat-s3c24xx/pm.c arch/arm/plat-s3c24xx/pwm-clock.c arch/arm/plat-s3c24xx/time.c arch/arm/tools/mach-types crypto/api.c drivers/Makefile drivers/base/sys.c drivers/char/Kconfig drivers/char/keyboard.c drivers/char/mem.c drivers/char/random.c drivers/crypto/Makefile drivers/gpio/gpiolib.c drivers/i2c/busses/Kconfig drivers/i2c/busses/i2c-s3c2410.c drivers/input/touchscreen/Kconfig drivers/input/touchscreen/Makefile drivers/input/touchscreen/ads7846.c drivers/leds/Kconfig drivers/leds/Makefile drivers/leds/leds-pwm.c drivers/mmc/core/mmc.c drivers/mmc/host/Kconfig drivers/mmc/host/s3cmci.c drivers/mtd/chips/cfi_probe.c drivers/mtd/nand/Makefile drivers/mtd/nand/s3c2410.c drivers/net/Kconfig drivers/net/Makefile drivers/net/can/Kconfig drivers/net/can/Makefile drivers/net/can/dev.c drivers/net/can/mcp251x.c drivers/net/can/mscan/Makefile drivers/net/can/mscan/mscan.c drivers/net/can/mscan/mscan.h drivers/net/can/sja1000/Makefile drivers/net/can/sja1000/ems_pci.c drivers/net/can/sja1000/kvaser_pci.c drivers/net/can/sja1000/sja1000.c drivers/net/can/sja1000/sja1000.h drivers/net/can/sja1000/sja1000_platform.c drivers/net/can/vcan.c drivers/net/wireless/Kconfig drivers/net/wireless/Makefile drivers/rtc/Kconfig drivers/rtc/Makefile drivers/scsi/Kconfig drivers/serial/Kconfig drivers/serial/Makefile drivers/serial/samsung.c drivers/serial/serial_core.c drivers/spi/Kconfig drivers/spi/Makefile drivers/usb/gadget/Kconfig drivers/usb/gadget/gadget_chips.h drivers/video/Makefile drivers/watchdog/Kconfig drivers/watchdog/Makefile fs/Kconfig fs/squashfs/Kconfig fs/squashfs/Makefile fs/squashfs/block.c fs/squashfs/cache.c fs/squashfs/dir.c fs/squashfs/export.c fs/squashfs/file.c fs/squashfs/fragment.c fs/squashfs/id.c fs/squashfs/inode.c fs/squashfs/namei.c fs/squashfs/squashfs.h fs/squashfs/squashfs_fs.h fs/squashfs/squashfs_fs_i.h fs/squashfs/squashfs_fs_sb.h fs/squashfs/super.c fs/squashfs/symlink.c include/asm-arm/plat-s3c24xx/mci.h include/linux/can/dev.h include/linux/can/platform/mcp251x.h include/linux/can/platform/sja1000.h include/linux/ieee80211.h include/linux/magic.h include/linux/miscdevice.h include/linux/mmc/host.h include/linux/mtd/cfi.h include/linux/nl80211.h include/linux/random.h include/linux/skbuff.h include/linux/spi/ads7846.h include/net/cfg80211.h include/net/ieee80211.h include/net/mac80211.h include/net/wireless.h include/sound/soc.h init/do_mounts_rd.c init/initramfs.c init/main.c lib/kobject.c net/core/skbuff.c net/ieee80211/Kconfig net/ieee80211/Makefile net/ieee80211/ieee80211_tx.c net/ieee80211/ieee80211_wx.c net/mac80211/Kconfig net/mac80211/cfg.c net/mac80211/debugfs.c net/mac80211/debugfs_netdev.c net/mac80211/debugfs_sta.c net/mac80211/event.c net/mac80211/ht.c net/mac80211/ieee80211_i.h net/mac80211/iface.c net/mac80211/key.c net/mac80211/main.c net/mac80211/mesh.c net/mac80211/mesh_plink.c net/mac80211/mlme.c net/mac80211/rate.c net/mac80211/rate.h net/mac80211/rc80211_minstrel.c net/mac80211/rc80211_pid_algo.c net/mac80211/rx.c net/mac80211/scan.c net/mac80211/sta_info.c net/mac80211/sta_info.h net/mac80211/tx.c net/mac80211/util.c net/mac80211/wep.c net/mac80211/wep.h net/mac80211/wext.c net/mac80211/wme.c net/mac80211/wpa.c net/wireless/Kconfig net/wireless/Makefile net/wireless/core.c net/wireless/core.h net/wireless/lib80211_crypt_ccmp.c net/wireless/lib80211_crypt_tkip.c net/wireless/nl80211.c net/wireless/reg.c net/wireless/reg.h net/wireless/sysfs.c net/wireless/util.c net/wireless/wext-compat.c net/wireless/wext.c scripts/kallsyms.c scripts/mod/modpost.c scripts/setlocalversion scripts/unifdef.c sound/soc/codecs/wm8753.c sound/soc/s3c24xx/Kconfig sound/soc/s3c24xx/Makefile sound/soc/s3c24xx/s3c2412-i2s.c sound/soc/s3c24xx/s3c24xx-pcm.c sound/soc/soc-core.c Signed-off-by: Hector Palacios <hector.palacios@digi.com>
2011-01-18[ccwmx51js]: add first support for CCWi-MX51 platform on a JSK boardAlejandro Gonzalez
This commit provides the first support for the Embedded module ConnectCore Wi-MX51 on a JSK board. Supported interfaces are: -Serial -Internal Ethernet controller (FEC) -External Ethernet controller. -NAND flash Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
2011-01-17ENGR00136994 UBI : system halt when detaching UBI in NFS environmentHuang Shijie
The problem is caused by: ubi double free ubiblk_dev structrue, cause the list and memory mess up. This patch changes field `m` in the ubiblk_dev{} from the mtd_blktrans_dev{} to pointer. Also add a mutex for protecting the global ubiblk_devices. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-01-17ENGR00137101-6 mark the erase failed block to the bbt table.Huang Shijie
If it return failure in erasing a block, mark the block bad in the bbt table. Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-01-17ENGR00137101-5 GPMI : add TOGGLE NAND supportHuang Shijie
[1] Add the initializtion for TOGGLE nand. [2] chang the is_onfi_nand() to is_ddr_nand(). [3] add NAND_LOCK in the send_command() Signed-off-by: Huang Shijie <b32955@freescale.com>
2011-01-17ENGR00137101-4 GPMI : change the is_onfi_nand() to is_ddr_nand()Huang Shijie
change the function name is_onfi_nand() to is_ddr_nand(). Signed-off-by: Huang Shijie <b32955@freescale.com>