summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* barebox remote controlSascha Hauer2016-01-189-4/+571
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to control barebox over serial lines. The regular console is designed for human input and is unsuitable for controlling barebox from scripts since characters can be lost on both ends, the data stream contains escape sequences and the prompt cannot be easily matched upon. This approach is based on the RATP protocol. RATP packages start with a binary 0x01 which does not occur in normal console data. Whenever a 0x01 character is detected in the console barebox goes into RATP mode. The RATP packets contain a simple structure with a command/respone type and data for that type. Currently defined types are: BB_RATP_TYPE_COMMAND (host->barebox): Execute a command in the shell BB_RATP_TYPE_COMMAND_RETURN (barebox->host) Sends return value of the command back to the host, also means barebox is ready for the next command BB_RATP_TYPE_CONSOLEMSG (barebox->host) Console message from barebox Planned but not yet implemented are: BB_RATP_TYPE_PING (host->barebox) BB_RATP_TYPE_PONG (barebox->host) For testing purposes BB_RATP_TYPE_GETENV (host->barebox) BB_RATP_TYPE_GETENV_RETURN (barebox->host) Get values of environment variables Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Andrey Smirnov <andrew.smirnov@gmail.com>
* Add Reliable Asynchronous Transfer ProtocolSascha Hauer2016-01-184-0/+1865
| | | | | | | | | | | | | | | | | | This patch adds support for Reliable Asynchronous Transfer Protocol (RATP) as described in RFC916. Communication over RS232 is often unreliable as characters are lost or misinterpreted. This protocol allows for a reliable packet based communication over serial lines. The implementation simply follows the state machine described in the RFC text with one exception. RFC916 uses a plain checksum for the transferred data. We decided to use CRC16 for greater robustness. Since this is the only RFC916 implementation we currently know of interoperability with other implementations should not matter. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Andrey Smirnov <andrew.smirnov@gmail.com>
* of_path: Fix bug with partitions, simply codeTrent Piepho2016-01-081-18/+29
| | | | | | | | | | | | | | | | | | | | | | In commit 75b682795eafb2385556a9642f09e0af96a1264a using a path that has a partition description broke. Fix this and simpfy the code some. There is no need to loop over each string in the path property: it's defined to have at most one parition description, no extant dts has more than one, and how it would handle more than one didn't make sense anyway. Once not looping, __of_find_path() just needs the partition description text, not both the original node and property name to look it up from. When using a partition description, don't lookup the cdev of the node just to replace it with the partition's cdev. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* memtest: fix missing arguments in help stringAlexander Aring2016-01-041-1/+1
| | | | | | | This patch adds some missing arguments in help string of memtest. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* environment: allow saving of symbolic link changesZahari Doychev2015-12-171-9/+10
| | | | | | | | | | | | | | | | | | | | Currently it is not possible to change symbolic links in the default environment. For example if the default environment contains the link "current_boot -> mmc" then the following does not work: $ rm current_boot $ ln net current_boot $ saveenv After reset the link is still pointing to "mmc" and this error appears: "symlink: /env/boot/current_boot -> net : error -17" The patch fixes the above problem and moves the "ENV_FLAG_NO_OVERWRITE" to enable handling of symbolic links in this case too. Signed-off-by: Zahari Doychev <zahari.doychev@linux.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: dts: Add *.dtb.lzo to clean filesSascha Hauer2015-12-111-1/+1
| | | | | | *.dtb.lzo are generated during compilatiion, delete them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MCI: init device_node for MCI mainarea cdevLucas Stach2015-12-101-0/+3
| | | | | | | | | | | | | This fixes a regression, where boards specifying the environment path using the form device-path = &phandle, "partname:part" would be unable to find their env. This is due to of_find_path() switching to cdev_by_device_node() internally, which expects the device_node member of the main area cdev to be initialized. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: ccxmx53: properly guard initcall for multiimageLucas Stach2015-12-101-0/+3
| | | | | | | | Make sure to not run this board specific initcall on any other board. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i2c: Port two utility functions from Linux kernelAndrey Smirnov2015-12-081-0/+15
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/state'Sascha Hauer2015-12-0812-113/+373
|\
| * state: backend_raw: add hmac supportMarc Kleine-Budde2015-11-273-8/+156
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds hmac support to the raw backend. With this patch, modifications of the header or data of a state partition can be detected, as the hmac woudln't match anymore. The hmac relies on a shared secret, which is requested from the keystore, with keystore_get_secret() using the name of the state partition as the "name" of the secret. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: prepare raw backend for hmac supportMarc Kleine-Budde2015-11-271-5/+10
| | | | | | | | | | | | | | | | This patch cleans up the raw backend, so that adding hmac support in the next patch is easier. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * crypto: add simple keystoreMarc Kleine-Budde2015-11-274-0/+113
| | | | | | | | | | | | | | | | This patch adds a simple keystore to barebox. The keystore implements a simple key-value store to hold arbitrary values. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * crypto: Kconfig: add submenu for crypto related config optionsMarc Kleine-Budde2015-11-271-0/+4
| | | | | | | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: disable load commandEnrico Jorns2015-11-274-43/+23
| | | | | | | | | | | | | | | | | | Explicitly loading environment is not required as it will be loaded if available during device probing Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: use name of device node as name if alias is not availableMarc Kleine-Budde2015-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | Wihtout this patch, when using more than one state device an alias is mandatory, otherwise the there will be two state devices with the name state. This patch fixes the limitation by using the device node's name if no alias is defined. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: make use of of_find_path_by_node() and add return -EPROBE_DEFER if ↵Marc Kleine-Budde2015-11-271-22/+9
| | | | | | | | | | | | | | | | device is not available Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of_path: add of_find_path_by_node()Marc Kleine-Budde2015-11-272-1/+17
| | | | | | | | | | | | | | | | | | This patch adds the function of_find_path_by_node(), which is similar to of_find_path(), but it translates a device tree node into a barebox device path directly. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of_path: of_find_path() factor out device detection logic into separate functionMarc Kleine-Budde2015-11-271-37/+44
| | | | | | | | | | | | | | | | This patch factors out the device detection logic into separate function, so that it can be used from another function. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/socfpga'Sascha Hauer2015-12-082-14/+66
|\ \
| * | socfpga: Initialize emac physels to RGMII correctlyTrent Piepho2015-11-111-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A comment in the socfpga init said that it was "Clearing emac0 PHY interface select to 0", but this was doubly incorrect. It was setting physel for emac1, not emac0, and it was setting physel to 1 (RGMII) not 0 (GMII). All supported socfpga boards use RGMII, and use emac1, so fix the comment to reflect the code. But then extend the code to set the physel for both emac0 and emac1, so it can work on boards that use either or both emacs (which are called gmac0/1 in the dts). The Cyclone V datasheet, page 17-60 "EMAC HPS Interface Initialization", says to set physel while the EMAC is in reset. So place the EMAC in reset while changing physel. The emacs are not in reset as code earlier in the boot has already taken most of the modules out of reset. So put them back in reset while the physel is changed. The Linux kernel does it this way too. If barebox has no network support, there is not much point in configuring the emac physel lines. This would be the case for the xloader pre-bootloader config, which configures physel, doesn't use the network, loads the main barebox, which then reconfigures physel again. Make this code depend on CONFIG_NET so it's just done in the main barebox. The Linux kernel does not need barebox to do this initialization to use networking. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | firmware: socfpga: Add parameter "programmed" to fpgamgr driverTrent Piepho2015-11-111-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This boolean parameter tells you if the FPGA is programmed or not. It can be accessed from the shell as "$fpga.programmed". One could use this to not program the FPGA if it's already programmed. There is an annoying limitation of the way barebox puts parameters into the shell env: it requires they have no periods in the device name. It uses the first period to divide the variable name into a device and parameter name, which doesn't work correctly if the device name has a period in it. Since the names of any devices created from the OF device tree have a period in them, this is a problem. So what I did here was create a new device. Its parent will be the OF device for the fpgamgr and it will in turn be the parent of the firmware cdev. Previously the cdev's parent was the OF device. This device won't have period in the name and the parameter is attached to it. Even without the period limitation, doing this gives a nicer name "fpga.programmed" instead of "ff706000.fpgamgr.programmed". The fpgamgr code had a pointer to the OF device in its private state. I changed this to be a struct for the new "fpga" device, which is then used in all the places the former pointer was (nothing but dev_dbg, etc. calls). Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/reset'Sascha Hauer2015-12-082-22/+103
|\ \ \
| * | | reset: Add gpio reset supportSascha Hauer2015-11-232-1/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a device has the reset-gpios property we can support this through the reset controller API, so drivers do not have to open code the support for this property each time themselves as done a few dozen times in the kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | reset: Remove unused *_optional functionsSascha Hauer2015-11-231-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we now have dummy reset controllers we no longer need the *_optional functions. These have been unused anyway, so just remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | reset: Allow dummy reset linesSascha Hauer2015-11-231-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Treat NULL as a dummy reset line which is returned by the reset core when there is no reset line connected to a device (that is, no reset is described in the device tree). With this consumers can just use the reset functions without having to check for existence. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/omap'Sascha Hauer2015-12-085-45/+213
|\ \ \ \
| * | | | driver: watchdog: Add support for omap_wdtTeresa Remmet2015-11-233-0/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for OMAP Watchdog driver. Based on omap_wdt Linux driver (v4.3-rc1). Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | common: filetype: do not redetect MBR-type devices as a FAT-typePeter Mamonov2015-11-231-31/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deleted pieces of code detect MBR-containig device as a FAT-type device, if it's first partition contains a FAT filesystem. This behaviour enabled one to mount the FAT FS which is either directly on the device (disk0) or on the first partition (disk0.0) using the same command: mount /dev/disk0 /fat However, the desired behaviour can be reached with a: mount /dev/disk0 /fat || mount /dev/disk0.0 /fat || echo "Mounting failed" Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | ARM: omap: Use correct device to mount on /bootSascha Hauer2015-11-101-14/+7
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code tests if a partition (i.e. disk0.0) exists and instead of mounting boot from this partition it uses the whole device (disk0). This only works because the the FAT code accepts a MBR as input and automatically skips it. Let the code use the partition to mount /boot instead as it was intended. We don't have to stat() the partition device, since this error will be caught by mount() anyway, so remove the unnecessary stat(). Reported-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/net'Sascha Hauer2015-12-085-20/+49
|\ \ \ \
| * | | | net: tap: fix whitespacesAntony Pavlov2015-12-041-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net: tap: make locally used functions staticAntony Pavlov2015-12-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net: usb: asix: fix 'no previous prototype' warningAntony Pavlov2015-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here is the warning message: drivers/net/usb/asix.c:427:5: warning: no previous prototype for 'asix_rx_fixup_internal' [-Wmissing-prototypes] int asix_rx_fixup_internal(struct usbnet *dev, void *buf, int len, ^ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net: usb: asix: make rx_fixup ax_skb buffer alignedAntony Pavlov2015-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ax_skb receive buffer unalignment leads to consequent unalignment data access in network stack routines, especially in net_checksum(). By-turn unalignment data accesses lead to performance penalty. Moreover on classic MIPS CPUs without hardware unalignment access support this leads to undesirable exceptions. At the moment barebox on MIPS can't parry these unalignment access exceptions, so the Asix USB Ethernet chips, that need receive fixup workaround, are completely unusable on MIPS without this patch. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net: fec: fix indentation and whitspacesStefan Christ2015-11-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net: fec: implement dtb property phy-reset-durationStefan Christ2015-11-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement device tree property phy-reset-duration to adjust length of phy reset. Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net: fec: set phy reset time to 1msStefan Christ2015-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the device tree bindings in dts/Bindings/net/fsl-fec.txt the default phy-reset time is 1ms. Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net: rtl8169: get rid of DMA_ADDRESS_BROKENLucas Stach2015-11-131-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't assume a 1:1 virt to phys mapping, but use the real physical address returned by the dma alloc function. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net: designware: Don't hang in reset with powered down phyTrent Piepho2015-11-131-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dw MAC requires that all clock domains to be running for it to finish a MAC reset. This include the clock provided by the PHY. If the PHY is powered down, bit BMCR_PDOWN set, then it won't be generating a clock. And so the MAC never comes out of reset. On shutdown, Linux will put the PHY in powerdown mode, so it can easily be the case that the PHY is powered down on boot. See Linux kernel commit 2d871aa07136fe6e576bde63072cf33e2c664e95. Currently the MAC reset is done before the phy is probed. We can't power up the phy until it's probed, so the resets must be in the opposite order. The MAC reset is in device init but the PHY probe is in device open. Device init is done first, always, while open is done later, and only if the device is used. Rather than move the phy probe to init, this moves the MAC reset to open. It seems better to speed up boots that doesn't use ethernet by skipping MAC reset than to slow them down by adding PHY probe. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/mtd'Sascha Hauer2015-12-089-23/+292
|\ \ \ \ \
| * | | | | mtd: nand_mrvl_nfc: Add optimized timings for Samsung K9K8G08USebastian Hesselbarth2015-11-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds optimized timings for Samsung K9K8G08U 1Gb NAND flash. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: nand_mrvl_nfc: Add support for Marvell Armada 370/XPSebastian Hesselbarth2015-11-232-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Marvell PXA3xx and Armada 370/XP share the same NAND controller IP with some minor differences. With support for controller IP v2, now allow to build the driver on Armada 370/XP. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: nand_mrvl_nfc: Add support for NDCB3 registerSebastian Hesselbarth2015-11-231-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer versions of PXA3xx NAND controller support a 4th Command Buffer register. Add the required HWFLAGS and additional write to NDCB0. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: nand_mrvl_nfc: Add support for HW BCH ECCSebastian Hesselbarth2015-11-231-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for HW BCH ECC for those HW versions that support it. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: nand_mrvl_nfc: Add support for 8bit BCH HW ECCSebastian Hesselbarth2015-11-231-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for 8bit HW ECC modes supported by later IP versions. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: nand_mrvl_nfc: Add support for 4bit BCH HW ECCSebastian Hesselbarth2015-11-231-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for 4bit HW ECC modes supported by later IP versions. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: nand_mrvl_nfc: Add hwflags to distinguish different HW versionsSebastian Hesselbarth2015-11-231-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Marvell PXA3xx NAND flash controller IP has been reused in later SoCs with additional HW features. Add HW BCH ECC as the first known HW difference. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: nand_mrvl_nfc: Prepare for different HW ECC strengthsSebastian Hesselbarth2015-11-231-7/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer versions of Marvell PXA3xx NFC also support BCH and therefore higher ECC strengths than 1. Prepare for different ECC strength by factoring out ECC init into separate functions by strength. Also, add a new host variable that indicates BCH ECC. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | mtd: nand_mrvl_nfc: Get ecc parameters from DTSebastian Hesselbarth2015-11-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With DT helpers for ECC step size and strength, now use them on Marvell NAND driver. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>