| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
To be able to add the Atmel mci driver to COMPILE_TEST move the
definition of struct atmel_mci_platform_data to include/ where it
can be reached from foreign SoCs as well.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Port of_find_i2c_device_by_node() from Linux in order to allow looking
i2c_client up by corresponding DT node. Useful for interacting with
identical raw/driverless I2C devices that are not found on the same
bus between board variants.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds the xhci driver from U-Boot-2020.04-rc2. The usual things
like adjusting to the barebox driver model and using dev_* instead of
printf/puts/debug messages are made.
The previously existing PCI support is not present in this driver
currently. XHCI PCI support was not enabled in any defconfig, so we
boldly assume it was unused. It shouldn't be much effort though to
add it again.
The memory handling has been changed for barebox. The various
descriptor rings and descriptors are allocated with dma_alloc_coherent()
which makes the cache flushing/invalidating unnecessary. They are left
in the driver in case we want to change that.
The XHCI has a nasty limitation in that the TRBs may not cross a 64KiB
boundary. This limitation has been handled in the U-Boot driver, but the
handling seems to be broken. We help ourselves with using a bounce
buffer which is sufficiently aligned, but this limits the maximum bulk
transfer size to 64KiB.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds the missing bits and pieces to add super speed support to the
USB stack. It is based on the corresponding U-Boot code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adoption of U-Boot commit:
| 1commit 74ffc7cbb1d2d1f218b1bd67d1bd3cc1cba8aa79
| Author: Bin Meng <bmeng.cn@gmail.com>
| Date: Wed Jul 19 21:51:12 2017 +0800
|
| usb: hub: Translate USB 3.0 hub port status into old version
|
| USB 3.0 hub port status field has different bit positions from 2.0
| hubs. Since U-Boot only understands the old version, translate the
| new one into the old one.
|
| Since we are going to add USB 3.0 hub support, this feature is only
| available with driver model USB.
|
| Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
| Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | | |
It's cleaner to have a tx buffer per device and not one for all.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Allocate an individual rx buffer per device in the size we need it
instead of using one global buffer for all devices.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is an adoption of U-Boot commit bbc6f06c0031249bf1983b875e54cb7549bafe60:
| commit bbc6f06c0031249bf1983b875e54cb7549bafe60
| Author: Bin Meng <bmeng.cn@gmail.com>
| Date: Wed Jul 19 21:51:13 2017 +0800
|
| usb: hub: Support 'set hub depth' request for USB 3.0 hubs
|
| USB 3.0 hub uses a hub depth value multiplied by four as an offset
| into the 'route string' to locate the bits it uses to determine the
| downstream port number. We shall set the hub depth value of a USB
| 3.0 hub after it is configured.
|
| Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
| Reviewed-by: Simon Glass <sjg@chromium.org>
In this patch we also support recording the depth of a hub in
struct usb_device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adoption of U-Boot commit 5624dfd5aa91c244519ec60b40b4a42b4d9a43ca:
| commit 5624dfd5aa91c244519ec60b40b4a42b4d9a43ca
| Author: Bin Meng <bmeng.cn@gmail.com>
| Date: Wed Jul 19 21:51:16 2017 +0800
|
| usb: hub: Parse and save TT details from device descriptor
|
| A high speed hub has a special responsibility to handle full speed/
| low speed devices connected on downstream ports. In this case, the
| hub must isolate the high speed signaling environment from the full
| speed/low speed signaling environment with the help of Transaction
| Translator (TT). TT details are provided by hub descriptors and we
| parse and save it to hub uclass_priv for later use.
|
| Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
| Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | | |
driver_info shouldn't be changed, make it const.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This adds __spi_validate() to validate spi messages. This function is a
stripped down version from the Kernel. The motivation for adding this
was to fill in xfer->bits_per_word from spi->bits_per_word so that a
spi bus driver can use the former.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
Add support for parsing the big-endian device tree property.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This driver adds support for PWM driver on STM32 platform
based on the Linux v5.4 support.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Import the Linux helper, so code using it may be more easily ported.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Some PWM chips support outputting an inverted PWM signal.
Add API support for this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This functions prepares a state that can later be tweaked and applied
to the PWM device with pwm_apply_state(). This is a convenient function
that first retrieves the current PWM state and the replaces the period
with the reference values defined in pwm->args.
Once the function returns, you can adjust the ->enabled and ->duty_cycle
fields according to your needs before calling pwm_apply_state().
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Client code can use pwm_apply_state or pwm_config to set period as well
as duty cycle. Having a pwm_set_period thus doesn't add any value.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Linux has the new atomic PWM API in addition to the old one for backward
compatibility. We only have three PWM drivers in here, so port them over
to the new ->apply API.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
As a prerequisite for moving to the new apply API, we need to group all
state into one struct that we can apply at once. Prepare for this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The setter sets a value unused anywhere, but in the getter.
As the functions are unused, just drop them.
There's pwm_config that can be used for this instead.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In preparation for moving to a struct pwm_state like Linux does, turn
the flag into a variable.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
ifdown is the counterpart to ifup and disables one or all ethernet
interfaces.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Open ethernet devices explicitly rather than implicitly when sending
packets. This allows us to not only enable, but in the next step to
also disable ethernet devices.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fix the relative include path in <linux/libfdt.h>
Including <linux/kernel.h> is too much. <linux/limits.h> is enough
for INT_MAX.
Define INT32_MAX and UINT32_MAX in the same way as Linux does.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
During a bug hunt that ultimately turned out unrelated to the state
of the barebox at91 clk driver, I synchronized its state with Linux v5.6.
Bug fixes and clean up to minimize the diff were split out in separate
prior commits. This last commit imports the rest, which is basically
support for Microchip's new ARM926EJ-S SoC, the SAM9x60.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Commit 7310b976 ("clk: at91: fix compilation errors in sama5d2.c") and
follow-up commit ca3077068c ("clk: at91: delete dead i2s/audio code")
had deleted the i2s/audio clock related parts of the upstream driver.
This was mostly due to unwillingness on my part to understand the code
enough for porting them and because I deemed them unnecessary to support
in barebox. The former has changed and the latter is not totally true as
audio PLL derived clocks may be muxed as inputs for programmable and
generated clocks.
Port them over and mimize the diff to upstream.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Some of these are a product of source sync with Linux, the other were
done with macro assistance by searching for /later/, deleting license text,
adding appropriate SPDX-License-Identifier and manual post-review.
Devices without a license indicated where assumed GPL-2.0-only according
with the project's license.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We already have DIV_ROUND_CLOSEST, but no DIV_ROUND_CLOSEST_ULL.
Import the latter for use by later commits.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Make kernel clk driver import a tiny bit more convenient by allowing
clk_unregister calls and control flow to remain as is.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We lack a way to instantiate a fixed clock while specifying a parent.
This is used in the at91 clock code sync with upstream in a later
commit, so prepare by porting clk_register_fixed_rate.
It's based on the Linux commit of the same name with the difference that
it doesn't use (and thus doesn't require) a struct device_d * as first
parameter.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Incoming Linux code port makes use of the helper. Add it now instead of
having to open-code it later.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
File has been in source tree for 17 years and is unused.
Drop it. The only definition we might want out of the file is
cpu_relax(), which we already open code as barrier() with a comment in a
couple of places. Move the definition to <linux/barebox-wrapper.h>
and drop the file altogether.
No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
device_node_to_regmap is the current upstream API for this and is more
general, because it allocates a regmap on demand if none exists.
As of_node_to_regmap is unused anywhere, remove it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |_|_|/
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Extend our syscon API with a device_node_to_regmap function that has the
same semantics as upstream:
__________________________________________________________________________
| Linux commit 39233b7c611248c0d05209b4854bc63e26485655
| CommitDate: Thu Aug 8 15:30:07 2019 -0700
|
| mfd/syscon: Add device_node_to_regmap()
|
| device_node_to_regmap() is exactly like syscon_node_to_regmap(), but it
| does not check that the node is compatible with "syscon", and won't
| attach the first clock it finds to the regmap.
|
| The rationale behind this, is that one device node with a standard
| compatible string "foo,bar" can be covered by multiple drivers sharing a
| regmap, or by a single driver doing all the job without a regmap, but
| these are implementation details which shouldn't reflect on the
| devicetree.
|
| Signed-off-by: Paul Cercueil <paul@crapouillou.net>
| Acked-by: Arnd Bergmann <arnd@arndb.de>
| Signed-off-by: Paul Burton <paul.burton@mips.com>
|__________________________________________________________________________
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add missing inline to static inline no-op wrapper function.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/ /
|/| |
| | |
| | |
| | |
| | | |
Do not return a value from a function returning void.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The defines in the Barebox copy of imx8mq-reset.h had a typo, which has been fixed
in the upstream Linux version of this file. So depending on include ordering the
reset driver using those defines would fail to compile. Use the typo fixed versions
of the define in the driver and remove the duplicate include file, as we also have
the proper upstream version now.
Reported-by: Giorgio Dal Molin <giorgio.nicole@arcor.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The upstream (v5.6-rc1) device tree node of the stm32mp157c-dk2's OHCI
has a phys property, but not phy-names. We have no API to reference
such a phy easily (passing NULL isn't allowed). Add one.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Linux has since migrated to a new lookup API that lacks the init_data
parameter. As it's unused in barebox, follow suit.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Linux v5.6-rc1 contains 168 references to regultor_bulk_get, which
allows getting multiple regulators to set at once. Instead of open
coding them when porting code, port over the helpers to barebox.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have a few places where driver code prints reset_source_name() to
console after setting the reset source.
This working is probe order dependent, because reset_source_name()
prints the highest priority reset_source so far, which doesn't
necessarily have to be the one that was just computed.
Implement reset_source_to_string, so drivers can be migrated to use it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Users of an optional device_reset that have CONFIG_RESET_CONTROLLER=n
will trigger compilation errors. Add a static inline stub to fix it.
[ Note: device_reset is unused and unusable because we have no reset
controller implementing .reset. It's available in Linux though and
apparently useful for shared resets, so it's left in ]
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|