summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/usbgadget'Sascha Hauer2017-10-193-0/+14
|\
| * usbgadget: fastboot: Allow to automatically export the bbu handlersSascha Hauer2017-09-271-0/+7
| | | | | | | | | | | | | | | | | | | | We have a list of registered handlers which take a barebox update. Do the next step and allow to automatically export them via fastboot so that barebox can be updated via fastboot without manually exporting the partition. Since this may not be desirable in all cases this behaviour is configurable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * bbu: Add function to iterate over registered handlersSascha Hauer2017-09-271-0/+2
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * file_list: Add function to get entry by its nameSascha Hauer2017-09-271-0/+2
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * file_list: Add function to add an entry to the listSascha Hauer2017-09-271-0/+3
| | | | | | | | | | | | | | | | Add file_list_add_entry() to add a single entry to a file_list. Then use it in file_list_parse_one() instead of open coding adding a new entry. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2017-10-193-2/+4
|\ \
| * | regmap: port regmap_update_bits from linuxSteffen Trumtrar2017-10-161-1/+2
| | | | | | | | | | | | | | | | | | | | | Port the regmap_update_bits function from linux v4.14-rc1 to barebox. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | elf.h: Use EI_NIDENT instead of numeric valueAntony Pavlov2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an adoption of the linux kernel commit | commit eb6900fbfa43cb50391b80b38608e25280705693 | Author: Cyrill Gorcunov <gorcunov@gmail.com> | Date: Tue Apr 29 01:01:17 2008 -0700 | | ELF: Use EI_NIDENT instead of numeric value | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mmc: allow skipping SD card initializationPhilipp Zabel2017-09-261-0/+1
| |/ | | | | | | | | | | | | | | | | This patch allows to skip SD card initialization for eMMCs by setting the "no-sd" property in the host controller device tree node. Avoiding two SD command timeouts speeds up detection time by well over 200 ms. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / of: base: add function to copy a device tree nodeMichael Olbrich2017-10-171-0/+2
|/ | | | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mtd'Sascha Hauer2017-09-081-0/+3
|\
| * mtd: nand: Only call ONFI get/set features on supported chipsSascha Hauer2017-09-061-0/+3
| | | | | | | | | | | | | | Older versions of the ONFI spec do not support get/set features, so do not call these commands when they are not available. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2017-09-082-28/+223
|\ \
| * | asm-generic: partially sync io.h with linux kernelOleksij Rempel2017-09-081-28/+217
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: base: port of_device_is_big_endian from linuxOleksij Rempel2017-09-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |commit 37786c7fee40771d13901de129af7e084ed48b55 |Author: Kevin Cernekee <cernekee@gmail.com> |Date: Thu Apr 9 13:05:14 2015 -0700 | | of: Add helper function to check MMIO register endianness | | SoC peripherals can come in several different flavors: | | - little-endian: registers always need to be accessed in LE mode (so the | kernel should perform a swap if the CPU is running BE) | | - big-endian: registers always need to be accessed in BE mode (so the | kernel should perform a swap if the CPU is running LE) | | - native-endian: the bus will automatically swap accesses, so the kernel | should never swap | | Introduce a function that checks an OF device node to see whether it | contains a "big-endian" or "native-endian" property. For the former case, | always return true. For the latter case, return true iff the kernel was | built for BE (implying that the BE MMIO accessors do not perform a swap). | Otherwise return false, assuming LE registers. | | LE registers are assumed by default because most existing drivers (libahci, | serial8250, usb) always use readl/writel in the absence of instructions | to the contrary, so that will be our fallback. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mips'Sascha Hauer2017-09-081-1/+1
|\| |
| * | filetype: fix file type detection for Barebox MIPSOleksij Rempel2017-08-151-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since there is no "0/" after "barebox" in the file header, comparison won't stop on the right place. Fix regression introduced by patch: |commit 03939c0dfbf27d99e81d85e1bc0340fbee083d74 |Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |Date: Tue Jan 22 15:40:36 2013 +0100 | | filetype: add is_barebox_mips_head support Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | Merge branch 'for-next/efi'Sascha Hauer2017-09-081-0/+2
|\ \
| * | efi: make sure efi-fs is started in the right orderMichael Olbrich2017-09-081-0/+2
| |/ | | | | | | | | | | | | | | | | with this parch, EFI System partition will be mounted to /boot instead of /mnt/diskXX. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / atmel_lcdfb: define power_control gpio in platform_dataSam Ravnborg2017-09-061-1/+2
|/ | | | | | | | | | | | | | | | | | | | | | Simplify board specific code by specifying the power_control gpio direct in platform data. Move registration of the GPIO to the driver so we no longer need to duplicate this for each board. As an intended side-effect there is no longer any references to platform_data outside atmel_lcdc_register() so remove it from struct atmel_lcdfb_info The implementation assumes that GPIO=0 is the same as no power control. This prevents us from using any GPIO=0 for power control, but this is not considered a problem for current users. Future DT users will not have this limitation. This commit include a fix so we will actually power down if requested. Previously this was hardcoded to ON. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mmc'Lucas Stach2017-07-311-49/+43
|\
| * mmc_extcsd command: reworkSascha Hauer2017-07-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a rework of the mmc_extcsd command: - Always print registers. Previously we never printed registers that were already present in an older version of the spec - Put register names, access type and width into an array indexed by the register number - Print multibyte registers only once with the resulting value, and not bytewise. There's still more to cleanup, like for example we want to write multibyte registers once with the complete value, not bytewise. Anyway, this is a start. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * mmc: add eMMC v5 and V5.1 detection supportPeter Seiderer2017-07-061-0/+2
| | | | | | | | | | | | | | Just add the defines. Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * mmc: Consistently use EXT_CSD_* names from eMMC 5.1 specSascha Hauer2017-07-061-48/+37
| | | | | | | | | | | | | | | | | | | | We have kept the EXT_CSD registers which were added in the 5.1 spec separately for no good reason. Order the EXT_CSD defines by register number instead. Also we had some duplicates, for these consistently use the names from the 5.1 spec. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | Merge branch 'for-next/imx'Lucas Stach2017-07-312-0/+63
|\ \
| * | include: Add phy-id-list.hAndrey Smirnov2017-07-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add phy-id-list.h as a place to share Etherent PHY IDs between board specific code. Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
| * | ARM: i.MX: Import imx7-iomuxc-gpr.h from Linux kernelAndrey Smirnov2017-07-301-0/+51
| | | | | | | | | | | | | | | | | | Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* | | Merge branch 'for-next/efi'Lucas Stach2017-07-311-0/+1
|\ \ \
| * | | devfs-core: add function to find cdev by partuuidSteffen Trumtrar2017-07-101-0/+1
| |/ / | | | | | | | | | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* / / gpio: move active state function stubs to GPIOLIBLucas Stach2017-07-101-5/+6
|/ / | | | | | | | | | | | | | | Those are only implemented by GPIOLIB, not by GENERIC_GPIO. Fixes like failure on old platforms, that aren't converted to gpiolib, yet. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* / Revert "param: fix stub prototype of dev_add_param"Lucas Stach2017-07-061-2/+2
|/ | | | | | | This reverts commit 441941f5a664e0333d78ee480ea8b974a9a99d9d, which was on top of the recently reverted nvvar rework, so needs to be reverted, too. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2017-06-143-2/+13
|\
| * fs: add cdev_create_loop and cdev_remove_loop for loop mount optionPhilipp Zabel2017-06-062-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow to create a loopback cdev from a file. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Fixed up with: fs: Makefile: Add parseopt to all builds parseopt.h was included to fs.c with commit 9248b, but parseopt.o has a dependency to CONFIG_FS_NFS. Moved parseopt.o to the default build to eliminate build failures. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * cdev: make file operations constPhilipp Zabel2017-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | scripts/checkpatch.pl warns that struct file_operations should be const, but cdev->ops is not const, so without this patch we can choose between a warning from checkpatch and a warning from the compiler about discarding the const attribute when assigning the struct file_operations cdev->ops. Since there is no reason to modify the contents of cdev->ops after probing, make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * commands: allow <cmd>_aliases[] to be constIan Abbott2017-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commands with aliases define an array of alias strings such as: static const char *<cmd>_aliases[] = { "<alias1>", NULL}; Although the elements are of type `const char *`, the elements themselves are not `const`-qualified. If the array is declared as: static const char * const <cmd>_aliases[] = { "<alias1>", NULL}; then the compiler warns about const qualifiers being discarded. This is because the `aliases` member of `struct command` is declared as `const char *aliases;`. Change the declaration of the `aliases` member of `struct command` to `const char * const *aliases;` so that it can point to a `const` array of `const char *`. Also change the declaration of the `aliases` variable in `register_command()` to avoid unnecessary type casts. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: Create automount entries for the default mount pathesSascha Hauer2017-05-101-0/+8
| | | | | | | | | | | | | | | | | | | | In barebox the default mount path for a cdev is /mnt/<cdevname> which can be mounted with "mount <cdevname>" without specifying a target path explicitly. Simplify this further by creating automount entries for the default mount pathes which makes a manual mount completely unnecessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/gpio'Sascha Hauer2017-06-141-0/+25
|\ \
| * | gpiolib: Add code to support "active low" GPIOsAndrey Smirnov2017-06-061-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far this particular aspect of various DT-bindings has been handled on a per-driver basis. With this change, hopefully, we'll have a single place to handle necessary logic inversions and eventually would be able to migrate existing users as well as avoiding adding redundant code to new drivers. Cc: cphealy@gmail.com Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/directory-links'Sascha Hauer2017-06-141-1/+2
|\ \ \
| * | | fs: Implement links to directoriesSascha Hauer2017-05-111-1/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far links can only point to files. Implement links to directories. With this all kinds of links are supported: - relative links - absolute links - links including ".." - link loops (are detected, return -EMLINK) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Revert "globalvar: remove code for unqualified globalvars"Sascha Hauer2017-06-131-0/+1
| | | | | | | | | | | | This reverts commit e4f81050e098074792730b61563538d9e394e3d6.
* | | Revert "globalvar: make globalvar functions more consistent"Sascha Hauer2017-06-131-96/+13
| | | | | | | | | | | | This reverts commit 1b4a05c9263ae26083526acfabdea1ef96531a1d.
* | | Revert "param: remove unnecessary device_d * argument"Sascha Hauer2017-06-131-5/+6
| |/ |/| | | | | This reverts commit 0071bacb4c7cab21c9fab8540f5aa9922a270a85.
* | param: fix stub prototype of dev_add_paramLucas Stach2017-05-171-2/+2
|/ | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/parameter-types'Sascha Hauer2017-05-056-57/+252
|\
| * param: remove unnecessary device_d * argumentSascha Hauer2017-04-111-6/+5
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * globalvar: make globalvar functions more consistentSascha Hauer2017-04-111-13/+96
| | | | | | | | | | | | | | | | | | Similar to the device parameter functions also make the globalvar functions more consistent. This also adds support for readonly globalvars and changes several existing globalvars which should really be readonly to readonly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * param: make parameter functions more consistentSascha Hauer2017-04-111-37/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch creates a consitent set of device parameter functions. With this we have: dev_add_param_<type><access> "type" is one of: int32, uint32, int64, uint64, string, mac, ipv4, enum, bitmask The improvement here is that we now can exactly specify the width of the int type parameters and also correctly distinguish between signed and unsigned variables which means that a variable no longer ends up with INT_MAX when it's assigned -1. "access" can be empty for regular read/write parameter, "_ro" for readonly parameters which get their value from a variable pointer in the background or "_fixed" for parameters which are set to a fixed value (without a pointer in the background). Some more exotic types are not (yet) implemented, like dev_add_param_ip_ro. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: use dev_add_param_stringSascha Hauer2017-04-111-0/+1
| | | | | | | | | | | | | | dev_add_param_string allows to pass a priv * so that the device_d * argument is not needed and can be removed later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: nand: use dev_add_param_enumSascha Hauer2017-04-111-0/+1
| | | | | | | | | | | | | | dev_add_param_enum allows to pass a priv * so that the device_d * argument is not needed and can be removed later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>