u-boot/common
Daniel Schwierzeck 9fe6d8716e mtd, spi: Add MTD layer driver
Add MTD layer driver for spi, original patch from:
http://git.denx.de/?p=u-boot/u-boot-mips.git;a=commitdiff;h=bb246819cdc90493dd7089eaa51b9e639765cced

Changes from Heiko Schocher against this patch:
- Remove compile error if not defining CONFIG_SPI_FLASH_MTD:

  LD      drivers/mtd/spi/built-in.o
drivers/mtd/spi/sf_probe.o: In function `spi_flash_mtd_unregister':
/home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: multiple definition of `spi_flash_mtd_unregister'
drivers/mtd/spi/sf_params.o:/home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: first defined here
drivers/mtd/spi/sf_ops.o: In function `spi_flash_mtd_unregister':
/home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: multiple definition of `spi_flash_mtd_unregister'
drivers/mtd/spi/sf_params.o:/home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: first defined here
make[1]: *** [drivers/mtd/spi/built-in.o] Fehler 1
make: *** [drivers/mtd/spi] Fehler 2

- Add a README entry.
- Add correct writebufsize, to fit with Linux v3.14
  MTD, UBI/UBIFS sync.

Note (From Jagan): For testing raw mtd parition erase/read/write operations
using cmd_sf, sf_mtd should be required to register the spi flash device to
MTD layer but the sf_mtd_info ops were not required until and unless if we
use any flash filesystem layer say for example UBI. Due to this the foot-print
got increased ~290bytes in non-UBI case here that should be acceptible.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Jagannadh Teki <jteki@openedev.com>
Reviewed-by: Jagannadh Teki <jteki@openedev.com>
2015-06-30 00:40:11 +05:30
..
spl spl: spl_mmc: MMC boot mode provisions checks 2015-06-18 16:11:42 -04:00
aboot.c aboot: fix block addressing for don't care chunk type 2014-10-27 17:54:09 -04:00
autoboot.c autoboot.c: Add feature to stop autobooting via SHA256 encrypted password 2015-06-08 17:32:40 -04:00
bedbug.c Consolidate bool type 2013-04-01 16:33:52 -04:00
board_f.c Fix comment nits in board_f.c 2015-04-29 21:02:32 -06:00
board_info.c generic-board: show model name in board_init_f() too 2015-01-29 17:09:49 -07:00
board_r.c ppc4xx: Remove sc3 board 2015-05-10 09:59:38 -04:00
bootm_os.c image: bootm: Add OpenRTOS image type 2015-01-14 11:37:39 -05:00
bootm.c Combine bootm_find_<thing> functions together 2015-05-28 08:18:21 -04:00
bootretry.c Rename bootretry functions and remove #ifdefs 2014-05-29 17:49:00 -04:00
bootstage.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
bouncebuf.c Fix a few printf argument verification warnings 2014-09-15 13:32:55 -04:00
cli_hush.c Revert "hush: fix segfault on syntax error" 2014-11-24 12:06:06 -05:00
cli_readline.c Move bootretry code into bootretry.c and clean up 2014-05-29 17:48:21 -04:00
cli_simple.c cli: Export cli_simple_process_macros for use outside of cli_simple 2014-08-21 12:01:13 -04:00
cli.c cli: hush: Adjust 'run' command to run each line of the env var 2014-10-27 11:03:33 -04:00
cmd_aes.c aes: Add 'aes' command to access AES-128-CBC 2014-03-21 16:43:58 -04:00
cmd_ambapp.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_armflash.c common/armflash: Support for ARM flash images 2015-04-10 11:54:08 -04:00
cmd_bdinfo.c common/cmd_bdinfo: show gd->board_type 2015-06-11 08:29:14 -04:00
cmd_bedbug.c Use run_command_repeatable() 2014-06-11 16:25:47 -04:00
cmd_blob.c crypto/fsl: Make function names consistent for blob encapsulation/decapsulation. 2015-02-25 13:19:48 -08:00
cmd_bmp.c Remove typedefs from bmp_layout.h 2015-06-10 19:26:54 -06:00
cmd_boot.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_bootldr.c Blackfin: bootldr: use common defines 2011-04-08 00:44:27 -04:00
cmd_bootm.c Combine bootm_find_<thing> functions together 2015-05-28 08:18:21 -04:00
cmd_bootmenu.c Remove unnecessary use of hush header file 2014-05-29 17:45:31 -04:00
cmd_bootstage.c Kconfig: Move CONFIG_BOOTSTAGE to Kconfig 2015-04-18 11:11:37 -06:00
cmd_cache.c common: commands: make commands static 2014-07-18 17:53:23 -04:00
cmd_cbfs.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_clk.c common: Add new clk command 2014-02-04 16:32:20 +01:00
cmd_console.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_cplbinfo.c various cmd_* files: fixed layout a little bit 2010-08-09 01:07:37 +02:00
cmd_cpu.c Add a 'cpu' command to print CPU information 2015-04-29 21:02:33 -06:00
cmd_cramfs.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_dataflash_mmc_mux.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_date.c dm: rtc: Convert 'date' command to support driver model 2015-05-05 20:58:40 -06:00
cmd_dcr.c Add cli_ prefix to readline functions 2014-05-29 17:45:31 -04:00
cmd_demo.c common: Make sure arch-specific map_sysmem() is defined 2015-04-18 11:11:09 -06:00
cmd_dfu.c dfu: cmd: trigger watchdog before calling usb_gadget_handle_interrupts 2015-04-14 10:18:49 +02:00
cmd_diag.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_disk.c bootm: make use of legacy image format configurable 2014-06-05 14:44:56 -04:00
cmd_display.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_dtt.c Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
cmd_echo.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_eeprom.c cmd_eeprom: make it possible to define the used i2c bus 2015-02-17 10:42:53 +01:00
cmd_elf.c net: cosmetic: Fix checkpatch.pl failures in net.c 2015-04-18 11:11:35 -06:00
cmd_exit.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_ext2.c Fix help text of ext2load and fatload. 2014-07-22 07:44:25 -04:00
cmd_ext4.c ext4: Prepare API change for files greater than 2GB 2014-11-23 06:49:04 -05:00
cmd_fastboot.c fastboot: Proper download gadget unregister and clear when cable is missing 2015-04-14 10:19:05 +02:00
cmd_fat.c common: Make sure arch-specific map_sysmem() is defined 2015-04-18 11:11:09 -06:00
cmd_fdc.c bootm: make use of legacy image format configurable 2014-06-05 14:44:56 -04:00
cmd_fdt.c common: Make sure arch-specific map_sysmem() is defined 2015-04-18 11:11:09 -06:00
cmd_fitupd.c common/cmd_fitupd.c: restore corrupted file 2014-11-07 16:27:08 -05:00
cmd_flash.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_fpga.c fpga: Extend dump description 2015-01-30 09:19:17 -05:00
cmd_fpgad.c common: Fix cmd_fpgad addressing 2014-11-19 08:48:41 +01:00
cmd_fs_uuid.c fs: make it possible to read the filesystem UUID 2014-11-23 06:49:01 -05:00
cmd_fs.c fs: Add command to retrieve the filesystem type 2015-01-29 13:36:54 -05:00
cmd_fuse.c cmd_fuse: return CMD_RET_FAILURE on error 2014-12-08 09:35:43 -05:00
cmd_gettime.c cmd: Fix gettime command help 2015-01-30 09:19:16 -05:00
cmd_gpio.c Merge git://git.denx.de/u-boot-dm 2014-10-26 14:03:08 -04:00
cmd_gpt.c gpt: support random UUIDs without setting environment variables 2015-03-05 11:17:53 -05:00
cmd_hash.c Fix hash verification 2014-12-29 16:31:24 -05:00
cmd_help.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_host.c sandbox: Implement host dev [device] 2015-04-19 14:45:57 -06:00
cmd_i2c.c dm: i2c: Implement 'i2c bus' command for driver model 2015-05-14 18:49:33 -06:00
cmd_ide.c cmd_ide: Eliminate build warnings in atapi_inquiry() 2015-06-04 02:39:39 -06:00
cmd_immap.c powerpc: mpc8260: consolidate CONFIG_MPC8260 and CONFIG_8260 2014-03-07 10:59:06 -05:00
cmd_ini.c SPDX-License-Identifier: convert BSD-3-Clause files 2013-08-19 15:45:35 -04:00
cmd_io.c common/cmd_io.c: Fix incorrect help for iod/iow 2014-10-27 17:54:09 -04:00
cmd_iotrace.c Add an I/O tracing feature 2014-06-20 11:54:29 -06:00
cmd_irq.c Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
cmd_itest.c Fix itest mask overflow 2014-06-05 14:38:38 -04:00
cmd_jffs2.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_ldrinfo.c Blackfin: ldrinfo: new command 2011-04-08 00:44:27 -04:00
cmd_led.c cmd_led: Extend led command to support blinking and more leds 2015-04-23 09:43:08 -04:00
cmd_license.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_load.c Export redesign 2015-01-29 17:09:57 -07:00
cmd_log.c stdio: Pass device pointer to stdio methods 2014-07-23 14:07:23 +01:00
cmd_lzmadec.c common: Make sure arch-specific map_sysmem() is defined 2015-04-18 11:11:09 -06:00
cmd_mac.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_md5sum.c common: Make sure arch-specific map_sysmem() is defined 2015-04-18 11:11:09 -06:00
cmd_mdio.c net: add support for extended registers to mdio command 2013-11-22 16:50:52 -06:00
cmd_mem.c meminfo cmd: Enable printing >=4GiB SDRAM sizes 2015-05-28 08:18:21 -04:00
cmd_mfsl.c common: fsl: Fix broken SPDX-License-Identifier change 2013-10-16 09:24:38 -04:00
cmd_mii.c mii: add read-modify-write option to mii command 2015-04-20 17:57:12 -05:00
cmd_misc.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_mmc_spi.c mmc: Split mmc struct, rework mmc initialization (v2) 2014-03-24 12:58:56 +02:00
cmd_mmc.c mmc: Implement SD/MMC versioning properly 2015-02-23 19:34:29 +02:00
cmd_mp.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_mtdparts.c Fix a few printf argument verification warnings 2014-09-15 13:32:55 -04:00
cmd_nand.c cmd, nand: add more info to "nand info" 2015-04-23 14:56:08 -04:00
cmd_net.c net: cosmetic: Fix checkpatch.pl failures in net.c 2015-04-18 11:11:35 -06:00
cmd_nvedit.c env: Distinguish finer between source of env change 2015-05-21 09:13:19 -04:00
cmd_onenand.c mtd: resync with Linux-3.7.1 2013-05-31 17:12:03 -05:00
cmd_otp.c Add the function 'confirm_yesno' for interactive 2014-05-23 11:53:05 +03:00
cmd_part.c common: cmd_part: start and size sub-commands introduction 2015-06-19 16:46:47 -04:00
cmd_pci.c dm: pci: Add a uclass for PCI 2015-04-16 19:27:43 -06:00
cmd_pcmcia.c powerpc: mpc824x: remove MPC824X cpu support 2015-01-05 12:08:55 -05:00
cmd_pmic.c common: cmd pmic: command cleanup 2015-05-14 19:58:34 -06:00
cmd_portio.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_pxe.c pxe: Fix crash if 'sysboot' is run without args 2015-05-27 13:35:48 -04:00
cmd_read.c Add a command to read raw blocks from a partition 2012-12-11 13:17:33 -07:00
cmd_reginfo.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_regulator.c common: cmd regulator: command cleanup 2015-05-14 19:58:34 -06:00
cmd_reiser.c cmd_reiser: normalize 'file not found' errors 2013-11-08 15:25:13 -05:00
cmd_sata.c cmd_sata: implement sata stop command 2014-11-24 12:00:00 +01:00
cmd_scsi.c ahci: support LBA48 data reads for 2+TB drives 2015-06-12 16:52:32 -04:00
cmd_setexpr.c Use map_sysmem when accessing memory in setexpr 2015-05-14 07:03:15 -04:00
cmd_sf.c mtd, spi: Add MTD layer driver 2015-06-30 00:40:11 +05:30
cmd_sha1sum.c includes: move openssl headers to include/u-boot 2014-06-19 11:19:04 -04:00
cmd_softswitch.c blackfin: bf609: add softswitch config command 2013-05-13 16:26:12 +08:00
cmd_sound.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_source.c common: Make sure arch-specific map_sysmem() is defined 2015-04-18 11:11:09 -06:00
cmd_spi.c dm: spi: Adjust cmd_spi to work with driver model 2014-10-22 10:36:47 -06:00
cmd_spibootldr.c various cmd_* files: fixed layout a little bit 2010-08-09 01:07:37 +02:00
cmd_spl.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_strings.c Convert cmd_usage() calls in common to use a return value 2012-03-06 21:09:46 +01:00
cmd_terminal.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_test.c cmd_test: implement -e test for file existence 2014-02-19 09:47:34 -05:00
cmd_thordown.c usb: gadget: thor: Invoke board specific USB cleanup interface 2015-04-14 05:48:11 +02:00
cmd_time.c cmd_time: do not show ticks 2014-05-12 15:19:46 -04:00
cmd_tpm.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_trace.c common: Make sure arch-specific map_sysmem() is defined 2015-04-18 11:11:09 -06:00
cmd_tsi148.c Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
cmd_ubi.c common, ubi: use positive return values for ubi check 2015-04-10 11:54:06 -04:00
cmd_ubifs.c mtd, ubi, ubifs: resync with Linux-3.14 2014-08-25 19:25:55 -04:00
cmd_universe.c Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
cmd_unzip.c unzip: add gzwrite command to write compressed image to block device 2015-04-22 12:14:55 -04:00
cmd_usb_mass_storage.c cmd_usb_mass_storage: Use 'USB Mass Storage' in the help text 2015-04-14 09:50:47 +02:00
cmd_usb.c dm: usb: Convert 'usb' command to support driver model 2015-04-18 11:11:20 -06:00
cmd_version.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
cmd_ximg.c common: Make sure arch-specific map_sysmem() is defined 2015-04-18 11:11:09 -06:00
cmd_yaffs2.c cmd_yaffs: Clean up command usage messages 2015-03-05 20:13:20 -05:00
cmd_zfs.c cmd_zfs: normalize 'file not found' errors 2013-11-08 15:25:13 -05:00
cmd_zip.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
command.c common: command: trivial coding style fixes 2014-10-27 17:54:12 -04:00
console.c console: Fix pre-console flushing via cfb_console being very slow 2015-05-19 18:37:30 +02:00
cros_ec.c cros_ec: Remove unused cros_ec_board_init() function 2015-04-18 11:11:16 -06:00
ddr_spd.c driver/ddr/fsl: Add DDR4 support to Freescale DDR driver 2014-04-22 17:58:48 -07:00
dlmalloc.c Move initf_malloc() to a common place 2015-04-23 09:05:53 -06:00
dlmalloc.src Consolidate bool type 2013-04-01 16:33:52 -04:00
edid.c edid: Add a function to read detailed monitor timings 2015-05-13 09:24:10 -07:00
env_attr.c env: Add regex support to env_attrs 2015-05-21 09:13:19 -04:00
env_callback.c env: Allow env_attr_walk to pass a priv * to callback 2015-05-21 09:13:19 -04:00
env_common.c Add option -r to env import to allow import of text files with CRLF as line endings 2014-07-22 07:44:26 -04:00
env_dataflash.c env: Add env_export() wrapper 2014-03-21 16:43:59 -04:00
env_eeprom.c env_eeprom: Assign default environment during board_init_f 2014-06-05 14:44:56 -04:00
env_embedded.c nand_spl: remove nand_spl infrastructure 2014-06-05 17:01:59 -04:00
env_fat.c fat: Prepare API change for files greater than 2GB 2014-11-23 06:49:04 -05:00
env_flags.c env: Allow env_attr_walk to pass a priv * to callback 2015-05-21 09:13:19 -04:00
env_flash.c env_flash.c: Drop unused variables 2014-04-17 17:44:36 -04:00
env_mmc.c env_mmc: add error message to pass to set_default_env 2015-05-27 13:35:54 -04:00
env_nand.c env_nand: use nand_spl_load_image for readenv if SPL 2015-05-19 15:00:56 +02:00
env_nowhere.c Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
env_nvram.c env: Add env_export() wrapper 2014-03-21 16:43:59 -04:00
env_onenand.c env: Add env_export() wrapper 2014-03-21 16:43:59 -04:00
env_remote.c Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
env_sf.c env_sf: Fix recovery default 2015-04-07 08:41:10 -04:00
env_ubi.c env: Add env_export() wrapper 2014-03-21 16:43:59 -04:00
exports.c Export redesign 2015-01-29 17:09:57 -07:00
fb_mmc.c fastboot: check for alias when looking up partition by name 2015-04-14 10:19:04 +02:00
fdt_support.c fdt: Pass the device serial number through devicetree 2015-06-05 08:32:07 -06:00
flash.c mpc8xx: remove SPD823TS board support 2015-01-05 12:08:51 -05:00
hash.c autoboot.c: Add feature to stop autobooting via SHA256 encrypted password 2015-06-08 17:32:40 -04:00
hwconfig.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
image-android.c image: android: handle default kernel address 2015-05-08 17:24:17 -04:00
image-fdt.c fdt: Pass the device serial number through devicetree 2015-06-05 08:32:07 -06:00
image-fit.c image-fit: Fix compiler warning in fit_conf_print() 2015-06-06 09:30:20 -04:00
image-sig.c image: Convert to use fdt_for_each_subnode macro 2015-02-16 12:41:41 -05:00
image.c image: fix build when CONFIG_NR_DRAM_BANKS is disabled on ARM 2015-05-28 08:18:23 -04:00
iomux.c Coding Style cleanup: remove trailing white space 2013-10-14 16:06:53 -04:00
iotrace.c common: Make sure arch-specific map_sysmem() is defined 2015-04-18 11:11:09 -06:00
kallsyms.c Add support for Linux-like kallsysms 2009-06-12 20:45:48 +02:00
Kconfig Move defaults from config_cmd_default.h to Kconfig 2015-06-25 22:18:34 -04:00
kgdb_stubs.c kgdb: add default generic stubs 2010-01-18 00:23:00 +01:00
kgdb.c kgdb: Remove first_entry for kgdb 2014-09-16 12:23:56 -04:00
lcd_console_rotation.c common/lcd_console: introduce display/framebuffer rotation 2015-04-18 17:40:37 +02:00
lcd_console.c common/lcd_console: introduce display/framebuffer rotation 2015-04-18 17:40:37 +02:00
lcd_simplefb.c lcd: dt: extract simplefb support 2015-02-10 13:31:26 +01:00
lcd.c lcd: Support colour lookup table on 16bpp display in BMP images 2015-06-10 19:26:55 -06:00
lynxkdi.c checkpatch whitespace cleanups 2011-10-22 01:13:35 +02:00
main.c common: main.c: make show_boot_progress __weak 2014-07-18 17:53:23 -04:00
Makefile dm: regulator: add regulator command 2015-05-14 18:49:37 -06:00
malloc_simple.c Add a simple version of memalign() 2015-06-10 19:26:55 -06:00
memsize.c common/memsize.c: Coding style cleanup 2015-01-14 11:35:43 -05:00
menu.c menu: Return an error code if Ctrl-C is pressed 2015-05-27 13:35:54 -04:00
miiphyutil.c dm: net: Adjust PHY interface to work with CONFIG_DM_ETH 2015-04-18 11:11:36 -06:00
modem.c modem.c: Switch to debug() from dbg found in common/console.c 2014-10-25 07:27:37 -04:00
s_record.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
splash_source.c common: convert compulab splash load code to common code 2015-01-29 17:44:08 +01:00
splash.c lcd: split splash code into its own function 2015-02-10 13:31:58 +01:00
stdio.c stdio: Fix memleak on stdio_deregister 2014-11-04 06:04:00 +01:00
system_map.c Add support for Linux-like kallsysms 2009-06-12 20:45:48 +02:00
update.c net: cosmetic: Fix checkpatch.pl failures in net.c 2015-04-18 11:11:35 -06:00
usb_hub.c usb: add device connection/disconnection detection 2015-05-14 18:49:33 -06:00
usb_kbd.c usb: kbd: Disable idle input reports when we do not need them 2015-06-19 14:33:29 +02:00
usb_storage.c dm: usb: Convert usb_storage to driver model 2015-04-18 11:11:23 -06:00
usb.c usb: Remove unused variable in usb_setup_descriptor() 2015-05-29 12:41:04 +02:00
xyzModem.c common/xyzModem.c: move empty statements to newline 2014-06-11 16:27:06 -04:00