summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/zynq'Sascha Hauer2020-01-152-0/+93
|\
| * serial: cadence: add lowlevel init and putc functionsLucas Stach2020-01-141-0/+55
| | | | | | | | | | | | | | This allows to use the Cadence serial as a PBL console. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * serial: cadence: move register definitions into header fileLucas Stach2020-01-141-0/+37
| | | | | | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * filetype: add Zynq image typeLucas Stach2019-12-111-0/+1
| | | | | | | | | | | | | | | | Use the 2 invariant words (width detection and image identification) from the Zynq image header to detect the filetype. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/rpi'Sascha Hauer2020-01-156-4/+156
|\ \
| * | regulator: add function to get regulator by its nameSascha Hauer2019-12-201-0/+1
| | | | | | | | | | | | | | | | | | | | | Useful for getting regulators that are not correctly associated with a device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: Add usbroothubdes.hSascha Hauer2019-12-201-0/+128
| | | | | | | | | | | | | | | | | | Taken from U-Boot, needed for the upcoming dwc2 driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: Read dma_offset from device treeSascha Hauer2019-12-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reads the dma-ranges property from the device tree and sets dma_offset in the devices accordingly. The code is mostly taken from the Kernel as of v5.5-rc1. of_dma_configure() is trimmed down to the cases we want to support currently. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | device: Introduce dma_offsetSascha Hauer2019-12-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For devices that do not have a 1:1 mapping between DMA and CPU we need a dma_offset. This adds dma_offset to struct device_d and starts honoring it in ARM dma_(un)map_single(). Also we add some comments to functions that would normally need a device argument to make the DMA <-> CPU translations device specific. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: Add of_bus_n_xxx_cells()Sascha Hauer2019-12-201-0/+12
| | | | | | | | | | | | | | | | | | Added straight from the Kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: Make timeout unit clearSascha Hauer2019-12-201-4/+4
| |/ | | | | | | | | | | | | The usb_*_msg() functions take a timeout parameter. Make clear which unit is expected by adding a _ms suffix to the variable name. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2020-01-152-6/+5
|\ \
| * | include/linux/amba/bus.h: drop unused declarationsAntony Pavlov2020-01-081-6/+0
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Allow usage of default environment without environment file storageAlbert Schwarzkopf2019-12-111-0/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the default environment is only used when the barebox environment on the persistent store is not valid or when ENVFS_FLAGS_FORCE_BUILT_IN is set in the super block. However, ENVFS_FLAGS_FORCE_BUILT_IN can be cleared and the environmnet variables in the persistent store will be used again. This may not be desirable. This patch allows building CONFIG_DEFAULT_ENVIRONMENT independent of CONFIG_ENV_HANDLING. This can be useful if you never want to load or write values from the persistent store and you only need to read environment variables from your default environment. If CONFIG_ENV_HANDLING is not set, a message will be printed to the user indicating that changes to non-volatile variables won't be persisted. Move envfs functions that are needed when CONFIG_DEFAULT_ENVIRONMENT and/or CONFIG_ENV_HANDLING is set to a new file common/envfs-core.c. Signed-off-by: Albert Schwarzkopf <a.schwarzkopf@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | include/soc/fsl: Make struct ccsr_qman v3 specificSascha Hauer2020-01-131-12/+1
| | | | | | | | | | | | | | | | | | | | struct ccsr_qman is ifdeffed for different versions of this structure. CONFIG_SYS_FSL_QMAN_V3 is not defined which means we happen to use the wrong version on LS1046a. Hardcode it to the v3 version to make it work on LS1046a and rename it to ccsr_qman_v3 to make it obvious that it needs a change on non v3 versions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | include/soc/fsl: remove unused function prototypesSascha Hauer2020-01-131-5/+0
| | | | | | | | | | | | | | include/soc/fsl/fsl_qbman.h contains function prototypes we do not implement, drop them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: Layerscape: replace overcomplicated macrosSascha Hauer2020-01-131-0/+1
| | | | | | | | | | | | | | The icid tables are generated with several macros which makes the code hard to read. Drop the macros. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lds: align RO_DATA_SECTION membersLucas Stach2019-12-201-0/+11
|/ | | | | | | | | | | | When using the RO_DATA_SECTION macro, all the individual components are put into the rodata section. As they now end up in the same section there is no alignment enforced between them anymore. This leads to unaligned start pointers when any of the components have a unaligned size. Enforce some alignment between them. Fixes: c5d38e920101 (lds: Add and use RO_DATA_SECTION macro) Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/zynq'Sascha Hauer2019-12-102-2/+2
|\
| * bootsource: add JTAG bootsourceLucas Stach2019-11-111-0/+1
| | | | | | | | | | | | | | | | Some SoCs are able to detect if they are booted from JTAG. Add the enum value to be able to represent this as a valid bootsource. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: zynq: move header generation to zynq_mkimageLucas Stach2019-11-111-2/+1
| | | | | | | | | | | | | | | | | | | | Instead of generating a suitable image header with linker magic, move all of this into zynq_mkimage. The configuration file format and parsing is based on imx-image. This gets us one step further on the road to proper multi-image support. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/watchdog'Sascha Hauer2019-12-102-7/+44
|\ \
| * | watchdog: core: use new dev_add_param_tristate helper for .running paramAhmad Fatoum2019-12-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previous commit added a dev_add_param_tristate_ro that can be readily used instead of the enum parameter here. Use it. This also fixes the issue that running_names had external linkage. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | param: add dev_add_param_tristate(_ro) helpersAhmad Fatoum2019-12-051-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is can be considered an extension to the dev_add_param_bool interfaces with a third value that's "unknown". This can be used for cases, where barebox can flip a bit somewhere, but it has no way of knowing what the initial state of the bit was, e.g. turn on/off the watchdog, but no watchdog status. Turn on/off a co-processor, but no co-processor online status. And so on. Not providing a way to customize the "unknown" string is a deliberate choice, so future device parameters follow the same naming scheme. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | watchdog: implement generic support for .running device parameterAhmad Fatoum2019-11-111-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux watchdog have an optional WDOG_HW_RUNNING bit that is used in conjunction with CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED to automatically ping running watchdogs until userspace takes over. So far, when we ported Linux drivers, we dropped this detection, but it would be useful to have this information in barebox as well: The American Megatrends BIOS I am using allows configuring the hardware watchdog from the BIOS. barebox enables the WDT as well, so in normal operation we would never notice if after a BIOS update, the watchdog is no longer enabled. If we maintain a running parameter on watchdog devices, board code can be written to check whether the watchdog device is indeed running. To achieve this, add the necessary bits to the watchdog API. How we go about it differs from Linux a little: - We use an enum instead of a single bit, so we can differentiate between watchdogs that are not running and watchdogs whose running status is unknown. - Because we can check whether watchdog_hw_running is supported, it now can fail and return a negative value in that case - We do the maintenance of the running parameter after barebox feeds/disables the watchdog in the core, so it doesn't need to be replicated across drivers. Drivers hould only initialize the running parameter once at probe time. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | watchdog: always populate watchdog priority from device tree if possibleAhmad Fatoum2019-11-111-7/+0
| |/ | | | | | | | | | | | | | | | | | | | | So far, only the da9063 and da9053 have made use of the optional barebox watchdog-priority binding. Move it into the core, so other device drivers automatically have their watchdog-priority property parsed as well. This patch doesn't introduce any functional changes for upstream boards. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/usb'Sascha Hauer2019-12-102-7/+4
|\ \
| * | usb: i.MX: Use usb_register_otg_device()Sascha Hauer2019-11-211-7/+1
| | | | | | | | | | | | | | | | | | | | | We now have usb_register_otg_device() to register an "otg" device. Use it and drop the custom code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | usb: Add function to register otg devSascha Hauer2019-11-211-0/+3
| |/ | | | | | | | | | | | | | | We have two drivers in the tree which register an "otg" device to configure the host/peripheral switching. Before introducing a third driver create a common function for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/stm32'Sascha Hauer2019-12-101-1/+0
|\ \
| * | remoteproc: register a device for new remoteproc instancesAhmad Fatoum2019-11-251-1/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct rproc has a device_d dev field, but so far it was unregistered. The implementation had a few downsides: - dev_printf prints NULL, because the unique_name of the device is NULL - The name used by firmwareload is the device tree node's name, which might be unnecessarily verbose, e.g. mlahb:m4@10000000.of - All remoteproc devices are given the same (unused) name and index Fix these by registering a device for the remoteproc and using it where appropriate. While at it, allow the remoteproc name to come from a device tree alias as well. This breaks user behavior in that firmwareload now uses the alias or remoteprocN to reference the remoteproc instance. This is probably acceptable as the driver is a very recent addition. Cc: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/randfixes'Sascha Hauer2019-12-103-0/+15
|\ \
| * | reset_source: add stub for reset_source_set_deviceLucas Stach2019-12-021-0/+5
| | | | | | | | | | | | | | | | | | | | | Fixes: a0748840c104 (reset_source: implement helper to set a device as reset source) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | common: provide stubs for ctrlc_* functionsLucas Stach2019-12-022-0/+10
| |/ | | | | | | | | | | | | | | Currently the stubs are only provided for CONFIG_CONSOLE_SIMPLE, but they are also needed for CONSOLE_NONE. Move them to the header. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pci'Sascha Hauer2019-12-105-21/+72
|\ \
| * | efi: turn set of defines into enumerationsAhmad Fatoum2019-12-091-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | This allows us to use enum types instead of plain integers ttypes to hold the values, which is done in a follow up commit. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: copy over some Linux PCI helpersAhmad Fatoum2019-12-091-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | Linux PCI drivers, like the incoming 8250_pci, make use of these helpers. Port them over from Linux v5.4. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PCI: add driver_data member to struct pci_device_idAhmad Fatoum2019-12-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Linux drivers have a driver data member in the struct to associate variant specific driver data with each device id. Do likewise in barebox. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | driver: add missing parentheses around macro argumentAhmad Fatoum2019-12-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Currently, the macro can't be used for more complex expressions like &pci_dev->dev. Fix this by adding the missing parentheses. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | efi: add and use new efi_device_has_guid helperAhmad Fatoum2019-12-091-0/+12
| |/ | | | | | | | | | | | | | | | | | | We have at least two places where we check if a efidev has a particular guid and a follow-up commit will introduce a third place. So lets factor it out into a helper. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2019-12-101-0/+73
|\ \
| * | bus: efi: add basic ACPI bus infrastructureAhmad Fatoum2019-12-091-0/+73
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes sense to support some ACPI tables like the WDAT (Watchdog Action Table) in barebox. To facilitate this add a ACPI bus and the necessary bits to integrate ACPI tables into the barebox device/driver model as devices. These devices are identified by the four byte signature, which drivers can then match against and the system description table (SDT) of the device is then available as a device memory resource. Even without drivers, with this patch, devinfo and md can now be used to view the ACPI system description tables, which can be useful during UEFI payload development. Support for the ACPI Machine Language and ACPI 5.1 _DSD (Device Specific Data) is not implemented. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/gpio'Sascha Hauer2019-12-102-13/+76
|\ \
| * | gpio: Introduce GPIO namesSascha Hauer2019-11-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces GPIO names. So far we only have labels which are given by the requester. In contrast names are given by the provider and do not change depending on whoever requests a GPIO. The gpio commands now also accept to reference a GPIO by name. The printing of the gpioinfo command is adjusted to nicely print both the label and the name. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: Add of_property_read_string_array()Sascha Hauer2019-11-271-13/+70
| |/ | | | | | | | | | | | | | | | | | | of_property_read_string_array() is used to read a multistring device tree property into an array of strings. This is taken from the kernel. It is implemented around of_property_read_string_helper() which can be used to implement of_property_count_strings() and of_property_read_string_index() as well. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/fsl-fman'Sascha Hauer2019-12-101-0/+3
|\ \
| * | net: fsl-fman: reset device before leavingSascha Hauer2019-11-141-0/+3
| |/ | | | | | | | | | | | | | | | | edev->halt is implemented, but not called by the core during shutdown. We have to call it manually during device remove. With this and also resetting the whole FMan during shutdown the driver now works properly when started second stage from another barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / mtd: spi-nor: fix wrong value for CR_QUAD_EN_SPANClement Leger2019-12-091-1/+1
|/ | | | | | | Durign a previous patch, 0x2 was mistakenly converted to BIT(2) whereas it should be BIT(1). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/watchdog'Sascha Hauer2019-11-071-3/+17
|\
| * watchdog: rename timeout_curr to poller_timeout_curr internallyAhmad Fatoum2019-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | timeout_curr is the timeout programmed into the watchdog hardware every 500 milliseconds. If watchdog poller support is disabled, it serves no purpose, prefix it with poller_ to better communicate this fact. No functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>