summaryrefslogtreecommitdiffstats
path: root/include/linux
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/net'Sascha Hauer2017-02-131-1/+1
|\
| * net/phy: marvell: rename 88E1545 to 88E1540Uwe Kleine-König2017-01-131-1/+1
| | | | | | | | | | | | | | The Linux driver calls it 88E1540 so do it here, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | clk: Add support for shared gatesSascha Hauer2017-02-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | Sometimes a single software control knob controls multiple gates in hardware. This patch adds support for shared gates which help coping this situation. The first gate is registered with the hardware gate as usual, the others are registered as shared gates which does not have hardware control itself, but only switches the real hardware gate. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | clk: implement CLK_OPS_PARENT_ENABLESascha Hauer2017-02-061-0/+2
|/ | | | | | | | Some clocks may only be modified when their parent clocks are enabled. The kernel has the CLK_OPS_PARENT_ENABLE flag for this purpose. Implement it for barebox aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: Port of_clk_set_defaults()Andrey Smirnov2017-01-111-0/+17
| | | | | | | | Port of_clk_set_defautls() from Linux kernel in order to support DT configurations that require it (e. g. Vybrid). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: add clock command completionSascha Hauer2016-11-081-0/+4
| | | | | | This adds tab completion for the clk_* commands. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* linux/list.h: Add missing includeSascha Hauer2016-10-181-0/+1
| | | | | | linux/list.h needs linux/kernel.h for container_of(). Add it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/usb'Sascha Hauer2016-10-101-0/+16
|\
| * phy: Introduce to_usbphy conversion functionSascha Hauer2016-09-291-0/+8
| | | | | | | | | | | | | | | | | | | | The generic phy support layer has the necessary list handling and phy retrieval functions, so we should reuse them for usb phys. This adds a phy_to_usbphy() conversion function which drivers can implement which attach to the generic phy layer and are really usb phys. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * phy: Introduce of_phy_get_by_phandleSascha Hauer2016-09-291-0/+8
| | | | | | | | | | | | | | | | | | Currently generic phy support assumes that the standard phy binding from dts/Bindings/phy/phy-bindings.txt is used. This adds a helper function which can be used to retrieve a phy when this standard binding is not used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: ubi: add API call to rename volumes.Giorgio Dal Molin2016-09-271-0/+1
| | | | | | | | | | Signed-off-by: Giorgio Dal Molin <iw3gtf@arcor.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: ubi: Add API calls to create/remove volumesSascha Hauer2016-09-221-0/+3
|/ | | | | | | | | | Currently we use a ioctl API to create/remove ubi volumes. This means we always have to carry all function code for ubi volume manipulation when the ioctl is compiled in. This adds a function API to create/remove volumes so that the linker can throw the unused code away later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand: add ONFI timing mode to nand_timings converterSascha Hauer2016-08-181-0/+3
| | | | | | | | | | | Ported from Linux commit 974647e: | Add a converter to retrieve NAND timings from an ONFI NAND timing mode. | At the moment, only SDR NAND timings are supported. | | Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> | Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand: define struct nand_timingsSascha Hauer2016-08-181-0/+49
| | | | | | | | | | | | Ported from Linux commit bb5fd0b6da: | Define a struct containing the standard NAND timings as described in NAND | datasheets. | | Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> | Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* compiler: avoid redefining symbols when running with checkerLucas Stach2016-07-071-2/+2
| | | | | | | | Avoid redefining __user and __kernel if running with a checker enabled. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand: Enable subpage readsSascha Hauer2016-05-101-1/+1
| | | | | | | | Until now we did not support subpage reads for smaller binary sizes. Scanning UBI volumes on large page NANDs can be painfully slow, subpage reads can speed this up significantly, so enable subpage reads. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand: Pass page argument to read_subpage hookSascha Hauer2016-05-101-1/+1
| | | | | | | Similar to what the kernel does in e004debda (mtd: nand: add "page" argument for read_subpage hook). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: phy: Add fixed link supportSascha Hauer2016-05-091-1/+1
| | | | | | | | | | Some network devices, especially when connected to a switch, are connected via a fixed link. This patch adds support for a fixed phy configured through device tree. TODO: Add support for the "speed" and "full-duplex" properties. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
* whole tree: remove trailing whitespacesDu Huanpeng2016-04-212-3/+3
| | | | | Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* wchar_t: wchar_t should go to stddef.hDu Huanpeng2016-04-141-0/+2
| | | | | | | | | | according to C99 standard, the definition of wchar_t should go stddef.h this patch also remove wchar_t local definition and use stddef.h instead. Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ubifs'Sascha Hauer2016-04-089-122/+516
|\
| * ubifs: update implementation from u-boot v2016.03Alexander Stein2016-04-081-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-081-1/+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>
| * 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>
| * Add list_sort from u-boot v2016.03Alexander Stein2016-04-081-0/+11
| | | | | | | | | | | | | | 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>
| * rbtree: Update to u-boot v2016.03Alexander Stein2016-04-082-108/+267
| | | | | | | | | | | | | | | | | | | | 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>
| * decompressors: Use malloc/free wrappersSascha Hauer2016-04-081-4/+7
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/mtd-imx-nand'Sascha Hauer2016-04-081-19/+0
|\ \
| * | 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: export nand_check_erased_bufSascha Hauer2016-04-081-0/+1
| |/ |/| | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: Introduce mtd_check_patternSascha Hauer2016-03-151-0/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: rename mtd_all_ff -> mtd_buf_all_ffSascha Hauer2016-03-151-1/+1
| | | | | | | | | | | | | | To make clear this function checks a given buffer and not data on a mtd device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: Introduce function to get mtd type stringSascha Hauer2016-03-151-0/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: Add support for marking blocks as goodSascha Hauer2016-03-153-0/+5
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/squashfs'Sascha Hauer2016-03-112-0/+43
|\
| * linux/fs.h: add types and routines needed for SquashFSYegor Yefremov2016-03-021-0/+27
| | | | | | | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * linux/types.h: add sector_t and blkcnt_t typesYegor Yefremov2016-03-021-0/+16
| | | | | | | | | | Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2016-03-112-8/+10
|\ \
| * | mtd: mtd_[read|write|erase]: check for valid input dataSascha Hauer2016-03-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | mtd_[read|write|erase] are input functions to the mtd subsystem, so check for valid input data here rather than relying on the drivers doing this. The checks are copied from the Kernel as of 4.5-rc5 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: Make erase_info structs 64bit where necessarySascha Hauer2016-02-092-8/+8
| |/ | | | | | | | | | | | | | | Make the userspace structs 64bit where necessary. Since we do not have separated kernel/userspace in barebox we can just modifiy the original structs instead of adding separate 64bit structs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / include: linux: add circular buffersSteffen Trumtrar2016-02-121-0/+36
|/ | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/regmap'Sascha Hauer2016-02-081-2/+5
|\
| * bitops: Fix shift overflow in GENMASK macrosSteffen Trumtrar2016-02-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the original patch for linux: commit 00b4d9a14125f1e51874def2b9de6092e007412d Author: Maxime COQUELIN <maxime.coquelin@st.com> Date: Thu Nov 6 10:54:19 2014 On some 32 bits architectures, including x86, GENMASK(31, 0) returns 0 instead of the expected ~0UL. This is the same on some 64 bits architectures with GENMASK_ULL(63, 0). This is due to an overflow in the shift operand, 1 << 32 for GENMASK, 1 << 64 for GENMASK_ULL. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* | Merge branch 'for-next/net'Sascha Hauer2016-02-082-0/+52
|\ \
| * | miitool: Add code to register a PHYAndrey Smirnov2016-02-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the behaviour of the 'miitool'. Now in order to show PHY's link information 'miitool' should be invoked as such: miitool -s [PHY] Also, implment code to allow to register a dummy PHY device in order to be able to perform raw MDIO bus access. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mdio_bus: Add mdiobus_get_bus() functionAndrey Smirnov2016-02-031-0/+2
| | | | | | | | | | | | | | | | | | | | | Add mdiobus_get_bus() -- a function to get a MDIO bus by its number Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: Port bitbanged MDIO code from Linux kernelAndrey Gusakov2016-02-031-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | Port bitbanged MDIO framework and gpiolib MDIO bus driver that uses it from Linux kernel. Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | include/linux/phy.h: Add MII_ADDR_C45Andrey Gusakov2016-02-031-0/+4
| |/ | | | | | | | | | | | | | | Add MII_ADDR_C45 used by bitbanged MDIO Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>