summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/usb'Sascha Hauer2018-11-094-5/+26
|\
| * usbgadget: autostart: add DFU supportLadislav Michl2018-10-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | Use global variable dfu_function to autostart DFU. As similar code is used to start multifunction gadget using command, move common code to common/usbgadget.c and consolidate it. It turned out that '-s' option of usbgadget command does nothing, so remove its help text and make it function as '-a'. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: gadget: fsl_udc: pass controller instance to unregisterSascha Hauer2018-10-291-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | ci_udc_unregister() used to unregister "the controller". Since we may register multiple chipidea devices we called ci_udc_unregister() for each of them. This led to messages like: ERROR: imx-usb 53f80000.usb: gadget not registered. Fix this by returning the registered controller. This allows us to call ci_udc_unregister() only when we actually registered one before. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: host: ehci: do not use dev->privSascha Hauer2018-10-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | An ehci can be registered with ehci_register which is passed a struct device_d *. In that case the priv pointer may already be used by the caller, so we must not use it in the ehci code. At least for the Atmel ehci driver this fixes a bug, here dev->priv is set two times to different values. Since we need dev->priv in the ehci code to get the controller in ehci_detect() we can no longer implement that without the help of the caller, hence we eport ehci_detect() and epect it to be called by the code which registers a ehci host. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: host: ehci: add ehci_unregister()Sascha Hauer2018-10-291-3/+11
| | | | | | | | | | | | | | | | | | ehci_register() allocates data and registers a ehci host. Add ehci_unregister() to properly halt the controller and to free the memory again.. To do so, change ehci_register() to return the ehci host rather than an error code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb: Add usb_unregister_host()Sascha Hauer2018-10-261-0/+1
| | | | | | | | | | | | | | | | We have usb_register_host() which puts a new host on the list of hosts we should also have the opposite which removes the host from the list again. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/net-switch-mv88e6xxx'Sascha Hauer2018-11-095-6/+49
|\ \
| * | mdio_bus: Allow for non PHY-devices on MDIO busesAndrey Smirnov2018-10-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of just creating a simple PHY device for every child of MDIO bus node, add code to check if any of them have "compatible" property set, as well as code to create a proper platform device for such cases. This change is useful for when MDIO bus and some of Ethernet ports are connected to a switch or some other MDIO device that doesn't behave like a generic PHY and can't be probed via its PHY ID. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | include: linux: ethtool: Add missing *_UNKNOWN constantsAndrey Smirnov2018-10-181-0/+3
| | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | include: linux: phy: Add missing PHY_INTERFACE_* constantsAndrey Smirnov2018-10-181-0/+9
| | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | linux: string: Port kbasename()Andrey Smirnov2018-10-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Port kbasename() from Linux and use it to implement basename() we already have. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | drivers: base: Convert device_d name to be dynamically allocatedAndrey Smirnov2018-10-181-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | Convert device_d name to be dynamically allocated in order to lift MAX_DRIVER_NAME length limit needed for commits that follow. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | base: Don't use shared buffer for results of dev_id()Andrey Smirnov2018-10-181-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using shared memory buffer to return results of dev_id() leads to incorrect results when used as follows: dev_info(..., "... %s ...\n", ..., dev_name(foo), ...); since result returned for dev_name(foo) will be overwritten by dev_name() call that will happen as a part of dev_* logging functions. To prevent that allocate a dedicated field "unique_name" in struct device_d and use it to store unique name returned by dev_id()/dev_name(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | drivers: Introduce dev_set_name()Andrey Smirnov2018-10-181-3/+8
| |/ | | | | | | | | | | | | | | Introduce dev_set_name() in order to hide implementation details of setting device's name so it'd be easier to change it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/missing-prototypes'Sascha Hauer2018-11-091-0/+5
|\ \
| * | dma: Add missing re-inclusion protectorSascha Hauer2018-10-191-0/+5
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2018-11-092-0/+5
|\ \
| * | net: dhcp: fix option 54Marcin Niestroj2018-10-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Option 54 (Server Identifier) is something different than SIADDR (Server IP address). Currently they are used interchangeably. This causes DHCPNAK with DHCP servers that have configured different values for each field. Create new 'dhcp_serverip' field in 'struct dhcp_result', so we treat option 54 separately. This fixes DHCP requests for servers that send two different values for SIADDR and option 54 in DHCPOFFER. Fixes: 528298b702a0 ("net: dhcp: rework") Fixes: e18cc5b7e9ce ("DHCP: fix option 54 passing") Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | i2c: introduce device_i2c_driver() macroMarco Felsch2018-10-191-0/+4
| |/ | | | | | | | | | | | | | | | | Add macro and dependency to avoid boilerplate code. Since now simple i2c drivers only have to include the i2c.h header and call the device_i2c_driver() macro to register a i2c device driver. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2018-11-091-0/+101
|\ \
| * | lib: Port CRC8 implementation from Linux kernelAndrey Smirnov2018-11-061-0/+101
| |/ | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/gpio'Sascha Hauer2018-11-094-0/+112
|\ \
| * | gpiolib: Introduce gpio_find_by_label()Andrey Smirnov2018-10-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Introduce gpio_find_by_label() in order to allow manipulating GPIOs by the labels assigned to them via DT or board/driver code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | lib: Port kstrtox.c from Linux kernelAndrey Smirnov2018-10-292-0/+97
| | | | | | | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | linux/ctype.h: Port _tolower()Andrey Smirnov2018-10-291-0/+9
| |/ | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/driver'Sascha Hauer2018-11-091-4/+0
|\ \
| * | drivers: base: Drop dev_get_mem_region_by_name()Andrey Smirnov2018-10-291-4/+0
| |/ | | | | | | | | | | | | | | Drop dev_get_mem_region_by_name() which doesn't seem to have any users in the codebase. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / fs: implement d_revalidateSascha Hauer2018-10-291-0/+3
|/ | | | | | | d_revalidate is useful when filesystems change under the hood of the fs layer. This can happen with network filesystems or with devfs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ubifs'Sascha Hauer2018-10-0915-471/+1066
|\
| * vsprintf: implement %pVSascha Hauer2018-10-081-0/+5
| | | | | | | | | | | | | | %pV allows to pass in a struct va_format as a pointer. UBIFS uses this for its logging functions, but it may be useful in other places aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * compiler: Update to v4.19-rc6Sascha Hauer2018-10-085-457/+535
| | | | | | | | | | | | | | | | This updates include/linux/compiler* to Linux-4.19-rc6. Among other things this gives us __printf Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: implement clear_nlink and set_nlinkSascha Hauer2018-10-081-0/+2
| | | | | | | | | | | | | | Implement clear_nlink and set_nlink and remove the private versions from UBIFS. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: implement iget_locked and iget_failedSascha Hauer2018-10-081-0/+2
| | | | | | | | | | | | Implement in fs core rather than using a private version in UBIFS. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: implement file_inodeSascha Hauer2018-10-081-0/+5
| | | | | | | | | | | | To ease code porting from Linux Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: Add SB_* flagsSascha Hauer2018-10-081-0/+19
| | | | | | | | | | | | | | Newer Kernel fs code uses SB_* flags rather than the same MS_* flags. Add them to barebox to make porting code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: Add fscrypt no-op headersSascha Hauer2018-10-082-0/+378
| | | | | | | | | | | | Newer versions of UBIFS use fscrypt, so add no-op headers here. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: let dir_emit_dots return intSascha Hauer2018-10-081-1/+2
| | | | | | | | | | | | | | Change to the same prototype as the kernel to make code porting easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Add more mutex no-opsSascha Hauer2018-10-081-0/+3
| | | | | | | | | | | | | | Add mutex_lock_nested, mutex_unlock_nested and mutex_is_locked to include/linux/mutex.h and remove them from UBIFS. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Add kmemdupSascha Hauer2018-10-082-1/+7
| | | | | | | | | | | | | | | | We have kmemdup as a UBIFS specific variant, put it into the correct header files. Instead of reimplementing it just use memdup we already have. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Add linux/slab.hSascha Hauer2018-10-083-12/+108
| | | | | | | | | | | | | | | | | | Move stuff we already have in include/linux/barebox-wrapper.h that really belongs to include/linux/slab.h to there. Also add kmem_cache_* functions. UBIFS uses them in there own implementation, so we have to remove it there. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ratp'Sascha Hauer2018-10-091-0/+10
|\ \
| * | ratp: implement support for GPIO commandsAleksander Morgado2018-09-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Introduce three new RATP commands that allow getting and setting GPIO values as well as configuring the direction of the GPIO pins. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ratp: implement i2c read/write supportAleksander Morgado2018-09-171-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce two new RATP commands that allow running i2c read/write operations, very similar in format to the already existing md/mw RATP commands. The messages are defined with a fixed 16-bit long register field, but it will only be treated as a 16-bit address if I2C_FLAG_WIDE_ADDRESS is set in the message flags field. If this flag is unset, the start register address is assumed 8-bit long. If the message includes the I2C_FLAG_MASTER_MODE flag, the start register field is ignored and a i2c master send/receive operation is performed. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2018-10-092-1/+17
|\ \
| * | digest.h: Sync hash_algo values with kernelSascha Hauer2018-10-081-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | enum hash_algo is exported from the Kernel, so sync it with the numbers that are exported. Since we have barebox specific extensions to the hash_algo list add a big comment and put the extenstions at the end. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | environment: Do not use environment when overlapping with other partitionsSascha Hauer2018-09-261-0/+10
| |/ | | | | | | | | | | | | | | | | | | | | Environment partitions are usually specified with their hardcoded offset and size, either in the device tree or the board file. These partitions potentially overlap with other partitions read from the partition table. Overlapping partitions for sure have bad effects. Be more friendly to our users and warn them when such a situation occurs and stop using that partition for storing the environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bbu: Add "handler" parameter to barebox_update()Andrey Smirnov2018-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add "handler" parameter to barebox_update() and remove the code that was respondible for header lookup before. With this change finding appropriate handler is caller's responsibility, which makes it possible to implement custom handler lookup/existence check, chache it, and then re-use it without calling handler_find_by_* functions for the second time. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bbu: Expose bbu_find_handler_by_*() functionsAndrey Smirnov2018-10-081-1/+2
|/ | | | | | | | | | | | Expose bbu_find_handler_by_device() and bbu_find_handler_by_name() as public functions and convert the only user of barebox_update_handler_exists() to use the former function instead. With this done, barebox_update_handler_exists() is no longer used anywhere in the code and can be removed. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2018-09-114-38/+58
|\
| * mfd: rave-sp: Add mapping for legacy EEPROM commandAndrey Smirnov2018-08-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This is needed to make rave-sp-eeprom driver work on "legacy" firmware. This is a backport of Linux kernel patch [1] [1] https://lore.kernel.org/lkml/20180707024108.32373-5-andrew.smirnov@gmail.com/T/#mae2272763ae092b5b11ab128f5c22039d55557cb Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>