| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
In Kconfig files, the symbols don't have a CONFIG_ prefix.
Fix an unknown Kconfig symbol introduced in d3b8a88d34
("treewide: rename CONFIG_HAS_ARCH_SJLJ to CONFIG_ARCH_HAS_SJLJ").
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Link: https://lore.barebox.org/20230512023838.1255762-1-antonynpavlov@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the PCI version of the driver, we end up calling IOMEM() twice on
both the fb_map and mmio pointers. This happens because we first use
pci_iomap() on PCI resources in the bochs_pci_probe() and then
explicitly call IOMEM() in the bochs_hw_probe(). However, judging from
the parameters of the latter function having __iomem attributes, we
should not be remapping them. So, remove those IOMEM calls and instead
do explicit remapping in bochs_isa_detect(), which was missing it.
Also fix bochs_hw_probe() declaration missing one __iomem.
Signed-off-by: Denis Orlov <denorl2009@gmail.com>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230511124743.2878952-1-denorl2009@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Nobody uses the exported helper syscon_base_lookup_by_pdevname,
to lookup a syscon by device name. Let us remove it.
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
Link: https://lore.barebox.org/20230505061245.463528-1-eagle.alexander923@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
Unlike Linux, barebox has no CONFIG_FIXED_PHY or CONFIG_IRQ_DOMAIN.
The former is implied by CONFIG_PHYLIB and the latter is unneeded, so
revise the Kconfig option accordingly.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230503100609.1522959-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With some TF-A versions the IRAM where the boot information is stored
cannot be accessed in normal mode. We therefore copy the information
to another place before starting the TF-A. This copy is used for the
boot source detection logic, but not yet for the barebox update code
which still uses the original information from IRAM.
Use the already existing rockchip_bootsource_get_active_slot() to
avoid data aborts when trying to detect the active boot slot.
Link: https://lore.barebox.org/20230509045055.601772-1-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Block layer caching can't work if a block is bigger than BUFSIZE which
is used for the caching chunks. Instead of ending up with a rdbufsize
of 0, which leads to strange errors on device access, just refuse this
outright.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230508074612.3313870-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
get_fsdevice_by_path will return NULL if no file system was mounted at
location. Returned pointer was dereferenced unconditionally, potentially
leading to null pointer dereference. Fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230508074612.3313870-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
dev_get_resource_by_name() returns an error pointer, fix the check
accordingly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
The new barebox must be 4k aligned which is not always the case when
we skip over the SDRAM initialisation binary. memmove to a suitable
place.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
IMD tags are now automatically referenced when the DT itself is
referenced. IMD_USED_OF is no longer needed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
SHA256_Init() and SHA512_Init() are deprecated since OpensSSL 3.0. Use
EVP functions instead to calculate hashes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The barebox mmio-sram driver just makes SRAMs available as /dev/sramX
devices. The genalloc stub depended on it without selecting CONFIG_SRAM.
Instead of making this dependency explicit, just call of_address_to_resource
and have no dependency on CONFIG_SRAM at all.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230417125158.882170-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix
include/mach/imx/bbu.h:208:1: error: expected identifier or ‘(’ before ‘{’ token
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Fixes: 6e0cb133be ("ARM: i.MX: bbu: add FlexSPI update handler")
Link: https://lore.barebox.org/20230420195255.1153119-1-andreas@kemnade.info
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The defconfig needs to be updated to get a usable barebox:
We need bigger malloc because of the increasing kernel size, soft ECC so
NAND will work, ifup and relocatable for easier development. Fix the
prompt while here. Sadly, because of size restrictions, FAT, NFS, menus,
netconsole, and SHA1 have to go.
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Link: https://lore.barebox.org/20230427184718.105393-3-wsa@kernel.org
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We define partitions as well in the board file. Leading to:
New partition nand0.at91bootstrap (0x00000000-0x0001ffff) on nand0 overlaps with partition at91bootstrap_raw (0x00000000-0x0001ffff), not creating it
cannot create nand0.at91bootstrap: Invalid argument
addpart: Invalid argument
So, remove it from the config file.
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Link: https://lore.barebox.org/20230427184718.105393-2-wsa@kernel.org
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are building the non-sandbox platforms with -z noexecstack, because
the ELF section attributes don't matter. This is different for sandbox,
where we compile assembly files directly only for embedding blobs.
This currently yields a build warning:
binutils-2.39/bin/ld: warning: defaultenv/defaultenv-2-reboot-mode.bbenv.gz.o:
missing .note.GNU-stack section implies executable stack
binutils-2.39/bin/ld: NOTE: This behaviour is deprecated and will be removed
in a future version of the linker
Let's add the non-executable stack annotations, so sandbox may run with
non-executable stack. This way we are left with a single linker
warning that needs to be resolved:
binutils-2.39/bin/ld: warning: barebox has a LOAD segment with RWX permissions
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Link: https://lore.barebox.org/20230424115548.114858-2-ahmad@a3f.at
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For testing purposes, the test code uses a variable for the format
string at places, which -Wformat-security doesn't like.
The printf test was copied over from the kernel, which sets
-Wno-format-security globally. This may not be needed for barebox yet,
but let's set at least for this one file.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Link: https://lore.barebox.org/20230424115548.114858-1-ahmad@a3f.at
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
multi_v7_defconfig has everything necessary to build for Rasperry Pi,
but the BCM283X Pinctrl/GPIO driver is missing. Enable it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The uSDHC available with the i.MX6/7/8 SoCs has support for DDR
clock operation. This is enabled by flipping a bit in
IMX_SDHCI_MIXCTRL and adjusting the clock divider calculation to
account for the automatic internal halving of the clock.
Let's do that to speed up boot from eMMC. How much effect this has
in practice is not constant. Comparing two Kingston eMMCs: DDR on the
older v4.5 connected to an i.MX6 did not yield any difference. On the
newer v5.1 one connected to an i.MX8MM, I observe a 70% improvement in
sequential read throughput: from 40MiB/s to 69.5 MiB/s.
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230418093040.1865982-5-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The maximum card frequency that can be configured by barebox currently
is 50MHz for SD and 52MHz for eMMC. Higher speed modes require runtime
voltage switching or tuning sequences, which are not yet implemented.
Only exception is eMMC's DDR52: This mode was first introduced with
MMC 4.4 and can be used even at 3.3V.
This commit adds DDR52 support to the core. This introduces no functional
change, because host controllers must opt-in by setting the appropriate
host capabilities. In cases where it's enabled, bus width determination
happens as usual and then if possible, the resulting bus width will be
attempted with DDR. If that fails, we revert back to SDR.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230418093040.1865982-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Higher speed modes like DDR52 and HS200 can operate at both 8-bit and
4-bit bus widths. To make it easier to support these, split up
mci_startup_mmc, so the refactored parts can be called with different
timings later on.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230418093040.1865982-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
To make it clearer that a bus width of 8 is not equal to integer 8,
let's give it a dedicated type. No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230418093040.1865982-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
These macros are unused and will be replaced by their Linux counterparts
in a follow up patch, so drop them.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230418093040.1865982-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In fastboot_disable() all endpoints are disabled which will complete
all outstanding requests with -ESHUTDOWN. fastboot_unbind() is called
after that, so we do not need to deqeueue any requests there.
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20230324082748.987672-1-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| | |
Enable some useful commands, like 'wd', 'usbgadget and 'led'
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On a RK3568 SoC with DWC3 controller it takes about 17us for the
controller to halt. Increase the timeout accordingly to avoid
warning messages. While at it, remove the duplicate definition of
XHCI_MAX_HALT_USEC.
Link: https://lore.barebox.org/20230322135055.4093677-1-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
Now that all function drivers support super speed, propagate super
speed support in the multi function gadget as well..
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
We have to put the requests back to the read pool, even if they
are shut down, otherwise they are lost.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
Add super speed descriptors to the USB fastboot gadget. The
necessary bits and pieces are taken from Linux-6.3-rc2.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
Add super speed descriptors to the fastboot gadget. These are taken from
U-Boot v2023.04-rc4.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
DFU uses the same descriptors for full speed and high speed already,
just use them for super speed (plus) as well.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Our DWC3 driver is based on a relatively old Kernel driver. Although
it is updated from Linux-5.2 once, it still shows traces of an U-Boot
driver taken from Linux-3.19. The driver misbehaves in gadget mode,
like for example it gets stuck when the USB cable is unplugged and
plugged again.
Do a fresh port from Linux-6.3-rc2.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
dev_WARN_ONCE() is like WARN_ONCE(), but with a struct device *argument
to print device context.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| | |
Sync composite.c with Linux-6.3-rc2.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
Linux upstream usb_assign_descriptors() now takes four sets of
descriptors. Add the missing super speed plus descriptors.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
We'll need some things from recent upstream Linux for the upcoming
usb update. Just sync with Linux-6.3-rc2.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| | |
Our usbgadget stack is quite outdated. Sync core.c with Linux-6.3-rc2.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
Registering drivers is one thing, getting rid of them another. Add
unregister_driver() which is used in the coming USB gadget update.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| | |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Update ch9.h from Linux-6.3-rc2. Linux has split up the file into a
kernel and a uapi portion. We do the same for barebox for easier
updating in the future.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For easier patch merging and comparison with Linux move the usb
gadget files to where Linux has them. For now do a plain git mv
include/usb include/linux/usb, eventhough there might be some
files which are purely barebox specific.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
For easier patch merging and comparison with Linux move the usb gadget
files to where Linux has them.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
gadget_chips.h is mostly unused and no longer present in upstream Linux,
so drop it from barebox as well. The only thing we still need is
gadget_is_pxa() which is added to epautoconf.c directly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
fastboot_download_finished() calls fastboot_tx_print() two times in a
row and waits for completion in between. Additionally this is called
from the completion function from another request. This seems to work
for example on the fsl_udc driver, but leads to problems on the DWC3
controller. Instead of re-using the same request over and over again,
just allocate a new request when needed. This way we no longer have
to poll for its completion before starting a new request.
While fixing fastboot on the DWC3 controller this also makes the
lifetime of a request clearer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Working:
- RKBIN DDR training (rk3566_ddr_1056MHz_v1.13.bin)
- RKBIN TF-A (v1.34) from RKBIN
- Environment storage
- DHCP, ping and link detection
Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
Link: https://lore.barebox.org/20230330161101.58529-1-r.czerwinski@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The downstream TF-A doesn't cope with our device tree when
CONFIG_OF_OVERLAY_LIVE is enabled, supposedly because it is
too big for some reason. Otherwise it doesn't have any visible
effect if we pass a device tree or not, except that the TF-A
fills in the ethernet MAC address into the device tree.
The upstream TF-A doesn't use the device tree at all.
Pass NULL for now until we have a good reason to pass a real
device tree.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Decoding of the bootsource from the register value can be shared across
multiple Rockchip SoCs. Move the code to a common place to allow for
that.
At least with some TF-A versions the IRAM where the bootsource is stored
cannot not be accessed in normal mode, so read it out before we start
the TF-A. For this the scratch space is used.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There is a rk3568 specific entry function for barebox now, switch
the existing boards over to use it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|