summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release v2016.05.0v2016.05.0Sascha Hauer2016-05-091-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sata-imx: Fix a typoAndrey Smirnov2016-04-281-1/+1
| | | | | | | | It looks like comma operator was accidentaly used instead of regular semicolon. Fix this to avoid confusing future readers of the code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* documentation: i2c_read() does not expect any "DATA".Andreas Geisenhainer2016-04-281-1/+1
| | | | | | | Remove information about DATA from help text. Signed-off-by: Andreas Geisenhainer <Andreas.Geisenhainer@atsonline.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX53: ccxmx53: Fix memory detection.Jason Cobham2016-04-214-20/+29
| | | | | | | | | This patch fixes memory detection on the Digi ccxmx53 board. Also updates dts to support nand. Cleaned up whitespace? Signed-off-by: Jason Cobham <cobham.jason@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: Fix booting ARM Linux Kernels with CONFIG_EFI enabledSascha Hauer2016-04-191-2/+3
| | | | | | | | When an ARM kernel is built with CONFIG_EFI enabled, then the kernel image also looks like a EXE file. Move ARM zImage detection before EXE detection so that the kernel is still detected as zImage. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix erasing/protecting flashes with unspecified sizeSascha Hauer2016-04-198-8/+12
| | | | | | | | | | | | | | | | | fixes: 81737c1 mtd: Fix erasing of devices >4GiB Several places erased a complete flash partition passing ~0 as count to erase(). With the above commit count to erase was changed from an unsigned type to a signed type, so the (count > f->size - offset) check in erase() no longer triggers and the ~0 count is no longer adjusted to the whole device size. Among other things this results in saveenv failures on NOR flashes. This patch fixes this by introducing an explicit macro for erasing the whole device which is tested for in erase(). All other negative values are rejected. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Giorgio <giorgio.nicole@arcor.de>
* i2c_probe: fix wrong start and stop addressesMiquel Raynal2016-04-151-1/+1
| | | | | | | | | | This patch fixes the wrong range of i2c addresses used by the i2c_probe command when a stop address is provided. In this case the start address (startaddr) was taking the value of the stop address and the stop address (stopaddr) was always set to its default value. Signed-off-by: Miquel Raynal <raynal.miquel@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: tegra: set up stack before calling maincluster entryLucas Stach2016-04-141-3/+4
| | | | | | | | Allows this code to work correct regardless of the used compiler optimizations. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: imx-image: Fix image size in flash header for i.MX35Alexander Stein2016-04-141-3/+4
| | | | | | | | | | The i.MX35 needs additional 0x1000 byte. This quirk moved to the wrong location during refactoring of imx-image for v2016.03.0. Fixes: adade597593442 ""scripts: imx: Allow to create signed images") Signed-off-by: Daniel Krueger <daniel.krueger@systec-electronic.com> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lib: declared buffer is too small to hold stringRenaud Barbier2016-04-121-1/+1
| | | | | | | | | | Displaying an unsigned 64-bit integer can be represented by up to 20 characters. The 20 bytes buffer reserved to store the formatted string "%llu Bytes" is to small: (20 + 6) = 26. Hence, a bigger buffer is reserved to hold this string. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ubifs'Sascha Hauer2016-04-0855-2386/+18644
|\
| * ubifs: update implementation from u-boot v2016.03Alexander Stein2016-04-0825-1960/+16758
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updated code supports recovering from unclean unmounts when write buffer size is larger than 8. Linux uses takes information into consideration when checking for writes. The following list shows the changes for each file done compared to u-boot v2016.03 code. Makefile * Add gc.o, do not include header as in u-boot budget.c: * Replace __UBOOT__ with __BAREBOX__ debug.c: * Replace __UBOOT__ with __BAREBOX__ * Remove #include <linux/compat.h> * Replace current->pid with 0 debug.h * Replace __UBOOT__ with __BAREBOX__ * Add "0 &&" to ubifs_assert condition check U-Boot essentially disabled pr_crit output and dump_stack() is defined to do { } while (0), so ubifs_assert does nothing despite condition. gc.c: * Replace __UBOOT__ with __BAREBOX__ io.c: * Replace __UBOOT__ with __BAREBOX__ * Remove #include <linux/compat.h> key.h: * No changes log.c: * No changes lprops.c: * Replace __UBOOT__ with __BAREBOX__ lpt.c * Replace __UBOOT__ with __BAREBOX__ * Remove #include <linux/compat.h> * Remove #include <ubi_uboot.h> lpt_commit.c * Replace __UBOOT__ with __BAREBOX__ * Remove #include <linux/compat.h> master.c * Replace __UBOOT__ with __BAREBOX__ * Remove #include <linux/compat.h> * Remove #include <ubi_uboot.h> misc.h * Replace __UBOOT__ with __BAREBOX__ * Add #ifndef __BAREBOX__ around unneeded ubifs_current_time orphan.c * No changes recovery.c * Replace __UBOOT__ with __BAREBOX__ replay.c * Replace __UBOOT__ with __BAREBOX__ * Remove #include <linux/compat.h> sb.c * Replace __UBOOT__ with __BAREBOX__ * Remove #include <linux/compat.h> * Remove #include <ubi_uboot.h> * rp_uid and rp_gid are still uid_t, not kuid_t, so remove .val scan.c * Replace __UBOOT__ with __BAREBOX__ super.c: * Replaced current->pid with 0 * Replaced __UBOOT__ with __BAREBOX__ * Removed #include <ubi_uboot.h> * Removed #include <memalign.h> * Added #include <init.h> * Replaced malloc_cache_aligned with kzalloc * Replaced I_LOCK with I_SYNC * i_uid and i_gid are still uid_t, not kuid_t, so remove .val * Replaced string "U-Boot" with "Barebox" * Add #ifndef __BAREBOX__ around open_ubi, sb_test, sb_set, ubifs_mount, kill_ubifs_super, ubifs_fs_type * Do not call ubi_open_volume or ubi_close_volume in ubifs_fill_super Those will already be handled in ubifs_probe * Replaced uboot_ubifs_mount with new ubifs_get_super implementation using existing functions alloc_super, alloc_ubifs_info tnc.c * Replace __UBOOT__ with __BAREBOX__ * Remove #include <linux/compat.h> tnc_misc.c * Replace __UBOOT__ with __BAREBOX__ ubifs-media.h * Replace __UBOOT__ with __BAREBOX__ ubifs.c: * Replaced __UBOOT__ with __BAREBOX__ * Adjusted header includes * Removed DECLARE_GLOBAL_DATA_PTR * Add static struct z_stream_s variable * Add struct ubifs_priv delcaration * Replaced zunzip with deflate_decompress call * Add ifdef for disabling ZLIB and/or LZO support * Replaced malloc_cache_aligned with kzalloc * Added #ifndef __BAREBOX__ around filldir, ubifs_printdir, ubifs_set_blk_dev, ubifs_ls, ubifs_exists, ubifs_size, do_readpage, ubifs_read, ubifs_close, ubifs_load * Make parameter filename const char* in ubifs_findfile * Add UBIFS fs_driver_d implementation * Add zlib_decomp_init, ubifs_init ubifs.h: * Replaced __UBOOT__ with __BAREBOX__ * Adjusted header includes * Added old #define crc32 * Added helper around kmem* * Added XATTR_LIST_MAX define * Added #ifndef __BAREBOX__ around current_fs_time struct inode, struct super_block, file_system_type, dentry and friends which barebox already has * Added #ifndef __BAREBOX__ around write_inode in super_operations to avoid declaration of writeback_control * Change rp_uid and rp_gid to uid_t and gui_t * Added struct device_d to struct ubifs_info * Added forward declaration of ubifs_get_super linux/fs.h: * Make struct inode's i_nlink a union containing a non-const int __i_nlink while making i_nlink a const int linux/fs.h: * Add s_remove_count linux/fs.h: * Convert struct super_block.s_instances and struct file_system_type.fs_supers to hlist_head Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * barebox-wrapper: Add kcalloc and __vmallocAlexander Stein2016-04-081-0/+2
| | | | | | | | | | | | | | They call xzalloc and malloc respectively. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * barebox-wrapper: Implement kfree and vfree as static inline functionsAlexander Stein2016-04-081-2/+9
| | | | | | | | | | | | | | | | | | If kfree/vfree is called where free is a already variable name, code will not compile. Also both take a const* in Linux kernel code. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Move GFP_NOFS to barebox-wrapperAlexander Stein2016-04-082-3/+2
| | | | | | | | | | | | | | This will also be used by upcoming UBIFS update. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: Add atomic.h from u-boot v2016.03Alexander Stein2016-04-083-0/+595
| | | | | | | | | | | | | | | | atomic-long.h: * Replace __UBOOT__ with __BAREBOX__ Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * module.h: Add THIS_MODULEAlexander Stein2016-04-081-0/+1
| | | | | | | | | | | | | | This is required by upcoming UBIFS update. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * compiler*.h: include/linux/compiler*.h with Linux 4.5Alexander Stein2016-04-083-4/+203
| | | | | | | | | | | | | | | | | | Include <linux/types.h> instead of uapi/linux/types.h. This is required for READ_ONCE and WRITE_ONCE for upcoming atomic_t. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * printk: Add pr_contAlexander Stein2016-04-081-0/+1
| | | | | | | | | | | | | | This is needed by upcoming UBIFS update. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Add list_sort from u-boot v2016.03Alexander Stein2016-04-083-0/+308
| | | | | | | | | | | | | | This is required by UBIFS update. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * printk: Add printk_onceAlexander Stein2016-04-081-0/+10
| | | | | | | | | | | | | | This is needed by upcoming list_sort implementation. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * rbtree: Update to u-boot v2016.03Alexander Stein2016-04-083-373/+697
| | | | | | | | | | | | | | | | | | | | This adds (among others) rbtree_postorder_for_each_entry_safe which is required by the upcoming UBIFS update. Changes to u-boot source: * Adding include <module.h> for EXPORT_SYMBOL* Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: ubi: Set max_write_size to actual value read from flashAlexander Stein2016-04-081-1/+1
| | | | | | | | | | | | | | | | | | Currently max_write_size is set to minimal I/O size. Set to buffer size read from flash. Required by UBIFS recovery which uses max_write_size for error detection. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: cfi-flash: Set MTD's writebufsizeAlexander Stein2016-04-081-0/+1
| | | | | | | | | | | | | | writebufsize is zero initialized, set actual value during init. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * decompressors: Use malloc/free wrappersSascha Hauer2016-04-0810-41/+55
| | | | | | | | | | | | | | | | | | | | The decompressors are used both in a regular image and also for image decompression. Both need different malloc implementations. Using malloc/free directly in the decompressor code easily leads to include file conflicts, so use MALLOC/FREE which can be defined correctly for the two different usecases. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PPC: atomic: remove non existing header includeSascha Hauer2016-04-081-2/+0
| | | | | | | | | | | | linux/config.h does not exist. Remove its inclusion. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * PPC: discard unused functionsSascha Hauer2016-04-081-0/+1
| | | | | | | | | | | | | | Use --gc-sections to discard unused functions. This makes the image smaller. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: doc3: Fix wrong format specifierSascha Hauer2016-04-081-1/+1
| | | | | | | | | | | | Fixes: 1e009bf mtd: Make erase_info structs 64bit where necessary Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: nandtest: Fix wrong format specifierSascha Hauer2016-04-081-1/+1
| | | | | | | | | | | | Fixes: 1e009bf mtd: Make erase_info structs 64bit where necessary Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: i.MX27: Fix gpt compatible for latest device treesSascha Hauer2016-04-081-0/+3
| | | | | | | | | | | | | | | | In v4.2-rc3 the "fsl,imx1-gpt" compatible was replaced with "fsl,imx21-gpt" so i.MX27 currently ends up without clocksource. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ubiformat'Sascha Hauer2016-04-089-12/+157
|\ \
| * | ubiformat: Cleanly umount and detach the ubi before formatingMarkus Pargmann2016-04-081-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was an open fixme for some time. ubiformat does not care about used ubi volumes or attached ubis. This patch adds functionality that umounts all filesystems that are mounted from this nand device. After that the ubi is detached. Then the normal ubiformat code reformats the ubi. If a ubi was detached previously, the code tries to reattach the ubi. Filesystems are not remounted. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | commands: ubidetach: Allow mtd devices as argumentSascha Hauer2016-04-081-4/+26
| | | | | | | | | | | | | | | | | | | | | Instead of only allow ubi numbers make it possible to detach a mtd device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: Add function to get ubi number from mtd deviceSascha Hauer2016-04-082-0/+21
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: umount mounted volumes before detaching a ubi deviceSascha Hauer2016-04-081-0/+17
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: make ubi_detach_mtd_dev ubi internalSascha Hauer2016-04-084-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to extend the functionality of the ubi detach function, but we don't want to change the original detach function to make UBI updates easier. This adds a barebox specific detach function which encapsulates the original UBI function. Also this makes the original ubi detach function internal to ubi. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: ubi: rename cdev.c to barebox.cSascha Hauer2016-04-082-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | cdev.c exists in the kernel UBI code, but barebox has completely different content in this file. rename it to barebox.c to reduce the number of merge conflicts. Also with the name barebox.c we now have a place to put other barebox specific UBI code to. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | fs: umount based on device path and mount pathMarkus Pargmann2016-04-083-4/+47
| | | | | | | | | | | | | | | | | | | | | umount on Linux can be used on a mount pathes and device pathes. This patch adds this functionality to barebox. Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
| * | fs: Add for_each_fs_device_safe()Markus Pargmann2016-04-081-0/+1
| |/ | | | | | | | | | | | | We need to be able to umount specific filesystems while iterating all of them. This helper gives us a safe macro to do so. Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
* | Merge branch 'for-next/rtc'Sascha Hauer2016-04-082-7/+19
|\ \
| * | ds1307: Configure ds1341 for lowest power modeAndrey Smirnov2016-04-051-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Empirical observations show that configuring INTCN=1, ECLK=0, EGFIL=0, DOSF=1 on DS1341 put the chip in the mode where it draws the least amount fo current. Add code to configure DS1341 in such a way in case Barebox is the last code that runs on the processor before being shut down. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ds1307: Fix a bug in probe()Andrey Smirnov2016-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | Add missing "~" to bit clearing operation. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | rtc: abracon: Check obtained time for validityAndrey Smirnov2016-04-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Check obtianed time for validity before returning it to the caller the same way other RTC drivers do. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mtd-imx-nand'Sascha Hauer2016-04-082-121/+139
|\ \ \
| * | | mtd: nand-imx: fix raw read/writeSascha Hauer2016-03-171-28/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw read/write was not possible because we enabled the ECC engine during driver initialization. To support raw mode we have to disable the ECC engine dynamically when needed. This has to be done before the send_page function is called. The places where we have to disable the ECC engine are not available in the driver, but are buried in the Nand layer. To make them available we have to implement driver specific write/read_page functions in which we configure the ECC mode. This also makes the driver better readable as it makes the detour around the driver internal data buffer when reading/writing pages unnecessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: remove unused debug definesSascha Hauer2016-03-171-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MTD_DEBUG was only used by the i.MX Nand driver and is now unused. Remove the mtd specific debug defines. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand-imx: remove/replace debug printSascha Hauer2016-03-171-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The relevant informations which command is sent for which page is already contained in the informations imx_nand_command() prints, so remove the debug prints in send_cmd and send_addr (which only exist for v1/v2 controllers, not for v3). Also use dev_dbg to print debug informations instead of MTD_DEBUG. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand-imx: remove dead codeSascha Hauer2016-03-171-45/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Neither CONFIG_MXC_NAND_LOW_LEVEL_ERASE nor CONFIG_MTD_NAND_MXC_FORCE_CE are defined anywhere, remove the code inside the ifdefs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand-imx: Fix correct_data return value for v2/v3 controllersSascha Hauer2016-03-171-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The correct return value for a uncorrectable page is -EBADMSG, not -1 (which is -EPERM). Also the max_bitflips returned shall be the bitflips per ecc step, not per page. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | mtd: nand-imx: Fix v1 controller ECC codeSascha Hauer2016-03-171-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver returns wrong values for the ECC correction. For 2k pages the controller reads and corrects in chunks of 512 bytes. The ECC status register values are overwritten with each each new chunk read, so after reading for chunks the .correct callback wil only return the ECC errors for the last 512 byte chunk. ECC errors in the other three chunks remain undetected. Fix this by accumulating the ECC status while reading the chunks and return the accumulated value in the .correct callback. Also return -EBADMSG for a bad message and not -1. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>