aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd
AgeCommit message (Collapse)Author
2018-02-08Convert CONFIG_APBH_DMA et al to KconfigAdam Ford
This converts the following to Kconfig: CONFIG_APBH_DMA CONFIG_APBH_DMA_BURST CONFIG_APBH_DMA_BURST8 Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Stefan Agner <stefan.agner@toradex.com> [trini: Add in MMC as well] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-02-08Convert CONFIG_NAND_MXS to KconfigStefan Agner
This converts CONFIG_NAND_MXS to Kconfig. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2018-02-06ubi: Ensure no fastmap flush after uif_closeMartin Townsend
On detach UBI attempts to update fastmap after closing user interfaces but at this point UBI volumes have already been free()'ed and fastmap can no longer access these data structures. Signed-off-by: Martin Townsend <mtownsend1973@gmail.com> Cc: hs@denx.de Cc: kmpark@infradead.org Cc: richard@sigma-star.at
2018-01-31Merge tag 'xilinx-for-v2018.03' of git://git.denx.de/u-boot-microblazeTom Rini
Xilinx changes for v2018.03 - Several Kconfig fixes (also moving configs to defconfigs) - Some DTS updates - ZynqMP psu rework based on Zynq concept - Add low level initialization for zc770 and zcu102 - Add support for Zynq zc770 x16 nand configuration - Add mini nand/emmc ZynqMP targets - Some arasan nand changes
2018-01-30nand: arasan: Select CONFIG_SYS_NAND_SELF_INITEzequiel Garcia
The Arasan NFC driver requires the self-init mode, so it should select it. Instead of having the config header define the macro, it's cleaner to select the option at the Kconfig level. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-01-30nand: arasan_nfc: Use the calculated ecc address for updating ecc registerSiva Durga Prasad Paladugu
This patch corrects the ecc address calculation before updating to ecc register. The ecc address has to be calculated based on page, oob and ecc sizes of the device. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-01-30nand: arasan_nfc: Add support for ondie eccSiva Durga Prasad Paladugu
This patch adds support for ondie ecc. As of now this adds support for micron parts which supports ondie ecc. Didn't found any better way to detect ondie ecc support by a device except sorting out with manufacture and device id's. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-01-30nand: arasan_nfc: Move common ecc struct initialization init routineSiva Durga Prasad Paladugu
Move common part of ecc structure initialization to arasan_nand_init() routine. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-01-29cfi_flash: Always define cfi_flash_num_flash_banksMario Six
The variable cfi_flash_num_flash_banks is defined iff CONFIG_SYS_MAX_FLASH_BANKS_DETECT is defined, but it is used unconditionally in the function cfi_flash_init_dm. This leads to a undefined variable compile error when CONFIG_SYS_MAX_FLASH_BANKS_DETECT is not defined, but DM is enabled. Fix this by always defining the cfi_flash_num_flash_banks variable. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix indentionMario Six
When long expressions surrounded by parentheses are split into multiple lines, each consecutive line should be aligned with the corresponding parenthesis. Fix all instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix long linesMario Six
Long lines (>80 characters) should be avoided where possible. Break up some long lines where it's not detrimental to readability. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Bound-check index before array accessMario Six
In a while loop in cfi_flash.c the array "start" is accessed at the index "sector" before the index variable "sector" is bounds-checked, which might lead to accesses beyond the bounds of the array. Swap the order of the checks in the "&&" expression, so that the short-circuit evaluation prevents out-of-bounds array accesses. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29flash: Fix spelling of "ERR_TIMOUT"Mario Six
checkpatch.pl complains about the spelling of ERR_TIMOUT. Since the error is only used in a handful of files, we rename the error to ERR_TIMEOUT. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Rename camel-case variablesMario Six
Camel-case naming should be avoided. Rename two camel-case variables, and fix their usage accordingly. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix strings split across linesMario Six
Strings should not be split accross multiple lines. Where possible and not detrimental to readability, fix the instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Use u8 pointers instead of void pointersMario Six
According to the C standard, pointer arithmetic for pointers of type void is undefined behavior (the assumption that they're 8-bit wide is a GCC-specific assumption). In the interest of keeping the code standards-compliant, and also better communicate intent, switch all void* variables where pointer arithmetic is used to u8* variables. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Remove assignments from if conditionsMario Six
The condition in if statements should not be used for variable assignment. Instead, the assignment should be done in a separate step beforehand. Fix all instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Remove return from void functionMario Six
void functions don't need an explicit return at the end. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix placement of braceMario Six
The opening brace of block statements should be attached to the statement itself, and not be on a separate line. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix else after breakMario Six
If in a loop, the if block in a if/else statement ends in a break, the statements in the else blockcan be extracted, since the break stops the execution. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix spelling of "Unknown"Mario Six
"Unkown" should be spelled "Unknown". Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Add missing braces in blocksMario Six
In if/else statements, either both blocks (if and else) should have braces or both blocks should not have braces, but mixed configurations are discouraged. Fix all instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Remove unnecessary bracesMario Six
"==" and "!=" bind tighter than the boolean operators, so parentheses around them in compound logical statements are unnecessary. Fix all instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix comment styleMario Six
Comment blocks should end with a "*/" on a separate line, not with the "*/" attached to the end of the last line of text. Fix all instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Use __func__ macro instead of function nameMario Six
printf/debug statements should not include the file name as a hardcoded string, but instead use the __func__ macro. Fix all instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix logical continuationsMario Six
When splitting long logical statements across multiple lines, the logical operators should be at the end of the lines. Fix all instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Remove braces for single-statement blocksMario Six
Blocks with a single statement should not be enclosed in braces. Fix all instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix missing/superfluous linesMario Six
There should be no consecutive blank lines, and no blank lines at the end of blocks. But there should be blank lines between variable declarations and code. Fix all instances where either occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix spacing around casts/operatorsMario Six
There should be spaces around operators, and no spaces between a cast and the variable its being applied to. Fix all instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix indent of case statementsMario Six
case statements should be at the same level of indent as the switch keyword. Fix all instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix whitespace with castingMario Six
When casting to a pointer type, the asterisk should be attached to the type name, not separated by a space. Fix all instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix Parenthesis spacingMario Six
There should not be additional spaces when nesting parentheses ("( (...) )"). Fix all instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix style of pointer declarationsMario Six
In a pointer declaration there should not be a space between the asterisk and the pointer name. Fix all instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-29cfi_flash: Fix space between function name and parenthesisMario Six
There should not be a space between a function name and a parenthesis ("func (...)"). Fix all instances where this occurs. Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
2018-01-24sf_probe: Merge spi_flash_probe_tail into spi_flash_probeMario Six
spi_flash_probe_tail is now only called from spi_flash_probe, hence we can merge its body into spi_flash_probe. Reviewed-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-01-24spi: sf_probe: Fix style violationsMario Six
Fix two indention-related style violations. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-01-24spi: Remove spi_flash_probe_fdtMario Six
Commit ba45756 ("dm: x86: spi: Convert ICH SPI driver to driver model") removed the last usage of the spi_flash_probe_fdt function, rendering it obsolete. This patch removes the function. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jagan@openedev.com> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-01-24drivers: spi: consider command bytes when sending transfersÁlvaro Fernández Rojas
Command bytes are part of the written bytes and they should be taken into account when sending a spi transfer. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-01-24drivers: spi: allow limiting readsÁlvaro Fernández Rojas
For some SPI controllers it's not possible to keep the CS active between transfers and they are limited to a known number of bytes. This splits spi_flash reads into different iterations in order to respect the SPI controller limits. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-01-24wait_bit: use wait_for_bit_le32 and remove wait_for_bitÁlvaro Fernández Rojas
wait_for_bit callers use the 32 bit LE version Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-01-08mtd: nand: mxs_nand_spl: Remove nand size printJagan Teki
It is not much needed to print nand size in SPL during nand boot, and most of nand spl drivers doesn't print the same. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-12-19Merge git://git.denx.de/u-boot-spiTom Rini
2017-12-19mtd/spi: fix block count for is25lq040bSean Nyekjaer
This spi-nor is 4Mbit/512KB Fixes: b4fbcbc5a5 ("mtd/spi: add support for is25lq040b") Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-12-12mtd: nand: denali: make NAND_DENALI unconfigurable optionMasahiro Yamada
denali.c has no driver entry in itself. It makes sense only when compiled together with denali_dt.c Let NAND_DENALI_DT select NAND_DENALI, and hide NAND_DENALI from the Kconfig menu. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-12-04Merge git://git.denx.de/u-boot-uniphierTom Rini
2017-12-04Merge git://git.denx.de/u-boot-cfi-flashTom Rini
2017-12-04mtd: nand: denali: consolidate include directivesMasahiro Yamada
Include necessary headers explicitly without relying on indirect header inclusion. <common.h>, <malloc.h> are unneeded. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-12-04mtd: nand: denali_dt: replace printf() with pr_err()Masahiro Yamada
The Linux derived log functions can be used anywhere and easily turned on/off by CONFIG_LOGLEVEL. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-12-04mtd: nand: Rename nand.h into rawnand.hMasahiro Yamada
This header was renamed to rawnand.h in Linux. The following is the corresponding commit in Linux. commit d4092d76a4a4e57b65910899948a83cc8646c5a5 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Fri Aug 4 17:29:10 2017 +0200 mtd: nand: Rename nand.h into rawnand.h We are planning to share more code between different NAND based devices (SPI NAND, OneNAND and raw NANDs), but before doing that we need to move the existing include/linux/mtd/nand.h file into include/linux/mtd/rawnand.h so we can later create a nand.h header containing all common structure and function prototypes. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-12-04mtd: nand: denali: remove ad-hoc board_nand_init() entryMasahiro Yamada
This driver is highly dependent on the configuration from denali_dt.c Please enable CONFIG_NAND_DENALI_DT if you use this driver. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>