summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| * console: Use dev_add_param_stringSascha Hauer2017-04-111-1/+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>
| * lib: implement simple_strtollSascha Hauer2017-04-111-0/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * parameter: Give device parameters typesSascha Hauer2017-04-101-0/+15
| | | | | | | | | | | | | | | | This adds a variable type enum and adds this to the device parameters. This information gives the user a hint which values a parameter expects and also helps to organize the parameters better internally. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/libgen'Sascha Hauer2017-05-051-0/+1
|\ \
| * | libgen: implement posix_basenameSascha Hauer2017-04-191-0/+1
| |/ | | | | | | | | | | | | | | | | | | There are two different versions of basename(): The GNU version and the POSIX version. The GNU version never modifies its argument and returns the empty string when path has a trailing slash, and in particular also when it is "/". The POSIX version modifies its argument and thus works properly with strings which have a trailing "/". Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/arm'Sascha Hauer2017-05-051-1/+1
|\ \
| * | mtd: spi-nor: cadence: change devicetree bindings to upstreamSteffen Trumtrar2017-04-191-1/+1
| |/ | | | | | | | | | | | | | | | | Upstream devicetree bindings where changed to use "cdns,is-decoded-cs" instead of "external-decoder". Use it. Also, get rid of the clock-names "qspi_clk" dependency. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / param: fix stub prototype const annotationLucas Stach2017-04-261-1/+1
|/ | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/state'Sascha Hauer2017-04-072-0/+5
|\
| * state: Allow to load without authentificationSascha Hauer2017-03-311-0/+1
| | | | | | | | | | | | | | Sometimes it's useful to be able to load a state even when it can't be authentificated. Add an option for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * keystore: implement forgetting secretsSascha Hauer2017-03-311-0/+4
| | | | | | | | | | | | To be able to change secrets add a function to forget secrets. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ofpart'Sascha Hauer2017-04-073-1/+19
|\|
| * of: of_path: add of_find_node_by_devpath()Sascha Hauer2017-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have of_find_path_by_node() which finds a device path for a given device node. This is used by the state framework to find its backend path. This path has to be translated back to a device node when Linux is started. The current approach turned out to be too simple: We assumed that the node path is the same in the tree Linux is started with. This is not true in several cases: - partition nodes should have the name "partition@<offset>", but in several trees they have "partition@<num>" - There are two different partition bindings: The legacy binding and the new one with an additional partitions subnode which has a compatible = "fixed-partitions" property. The node path only stays the same when the internal tree uses the same bindings and node names as the tree Linux is started with. To overcome this limitation we create of_find_node_by_devpath() which converts the device path back to a device node. It does so by finding the device node of the hardware device rather than the partition node. It then parses over the partitions in this device node with the known bindings looking for a partition which matches in offset and size to the barebox partition. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: partitions: flag partitions from a partition tableSascha Hauer2017-03-311-0/+1
| | | | | | | | | | | | | | | | | | We are going to call the of_partition_fixup for regular block devices like MMC/SD aswell. Add a flag to partitions indicating they are instanciated from a on-disk partition table so that they won't be added as device tree partitions during fixup. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: devfs-core: replace DEVFS_IS_PARTITION flag with pointer to the master cdevSascha Hauer2017-03-311-1/+1
| | | | | | | | | | | | | | | | Instead of having a flag indicating a cdev is a partition on some master cdev, just add a master pointer to the cdev, so that we can also find out who the master is. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * cdev: Collect partitions on listSascha Hauer2017-03-311-0/+1
| | | | | | | | | | | | | | We currently do not have a way to iterate over all partitions of a cdev. Change this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: of: Make used partition binding configurableSascha Hauer2017-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we used the legacy partition binding when fixing up the mtd partition nodes. Change this to default to the new binding with a "partitions" submode. Make this behaviour configurable though: This creates a new of_binding device variable for mtd devices. This can be set to: - "new": Use the new partition binding (default) - "legacy": Use the old partition binding - "donttouch": Do not touch the partition node Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: partition: Move of_mtd_fixup to drivers/of/Sascha Hauer2017-03-301-0/+6
| | | | | | | | | | | | | | | | Move the fixup code where the parser code is already. Since the code will not only be used for mtd in the future drivers/of/ is a better place than drivers/mtd/. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: Add of_property_write_string()Sascha Hauer2017-03-301-0/+8
| | | | | | | | | | | | | | Setting a property to a string is used many times. Create a convenience function for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/nvmem'Sascha Hauer2017-04-072-0/+143
|\ \
| * | drivers: add nvmem framework from kernelSteffen Trumtrar2017-03-302-0/+143
| |/ | | | | | | | | | | | | | | | | | | Add the nvmem framework from Linux. Based on the v4.4-rc3 version. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2017-04-078-24/+53
|\ \
| * | globalvar: remove code for unqualified globalvarsSascha Hauer2017-04-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The globalvar_add_simple_* functions will fail when a globalvar of the name already exists. This happened when the globalvar was created previously because a corresponding nvvar existed. For this reason we removed the globalvars that have been previously created by nvvar creation (we called these unqualified globalvars). Since we no longer create the corresponding globalvars on nvvar creation this code is no longer needed. Remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | globalvar: remove unused globalvar_add()Sascha Hauer2017-04-071-12/+0
| | | | | | | | | | | | | | | | | | globalvar_add() is unused in the tree. Remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | bootchooser: export bootchooser_bootSascha Hauer2017-04-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some boards that boot directly from C code do already know that they want to boot from bootchooser and nothing else. For these it's easiest to call bootchooser_boot directly, so export this function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | bootchooser: register as bootentry providerSascha Hauer2017-04-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Instead of using a global function called by bootentry_create_from_name(), register the bootchooser as bootentry provider. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | boot: Allow to register boot entry providersSascha Hauer2017-04-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bootentry_create_from_name() takes a name and creates bootentries for it. It tries different providers that interpret the name: blspec, bootchooser or script pathes. Instead of hardcoding the different providers in the function, allow the providers to register themselves. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ata: ide-sff: add LBA48 supportAntony Pavlov2017-03-301-0/+3
| | | | | | | | | | | | | | | | | | | | | See http://wiki.osdev.org/ATA_PIO_Mode#48_bit_PIO for details. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: No-op CLK_OF_DECLARE if not enabledAndrey Smirnov2017-03-301-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of wrapping each defenition of CLK_OF_DECLARE hook with preprocessor guards, change the definition of CLK_OF_DECLARE to expand into no-op if COMMON_CLK_OF_PROVIDER is not enabled. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>