Hello Lior,
On 27.11.23 08:02, Lior Weintraub wrote:
> Hi guys,
>
> Is there a formal way to pass user compilation flags into Barebox build?
There isn't. Both barebox and Linux have been broken in the past by distros
setting CFLAGS that force hardening options that require kernel/libc
On 2023-11-28 at 17:56 +01, Lucas Stach wrote:
Am Dienstag, dem 28.11.2023 um 17:29 +0100 schrieb Steffen Trumtrar:
rx_buffer gets dma_alloc'ed but is never dma_map'ed and therefor not
flushed before it is initially used.
Map the rx_buffer when the macb is initialized and unmap it on
Hello Steffen,
On 28.11.23 17:29, Steffen Trumtrar wrote:
> + writel(ctrl, >tx_ring[tx_head].ctrl);
> + writel((ulong)packet, >tx_ring[tx_head].addr);
> dma_sync_single_for_device(macb->dev, (unsigned long)packet, length,
> DMA_TO_DEVICE);
For this buffer dma_map_single is
Hello Steffen,
On 28.11.23 17:29, Steffen Trumtrar wrote:
> rx_buffer gets dma_alloc'ed but is never dma_map'ed and therefor not
> flushed before it is initially used.
>
> Map the rx_buffer when the macb is initialized and unmap it on ether_halt.
>
> While at it, cleanup the dma_alloc_coherent
For DMA_FROM_DEVICE, calling dma_sync_single_for_cpu
before arch_sync_dma_for_device has been called is wrong:
- Memory region is dirty in CPU cache
- Device writes packet into region
- CPU cache lines are written back
- Buffer memory is corrupted
In order to spot such issues, let's add
The new CONFIG_DMA_API_DEBUG option correctly detects that
dma_sync_single_for_device is called without dma_map_single.
In the particular case of the STM32 SDMMC2 driver, this shouldn't lead
to errors as dma_sync_single_for_cpu is only called after successful
DMA, not before. In other cases
In preparation for adding optional debugging code for the DMA mapping
API, move the definition out of the header file into a source file.
Signed-off-by: Ahmad Fatoum
---
drivers/dma/Makefile | 1 +
drivers/dma/map.c| 32 +++
include/dma.h| 61
mci_block_write uses a 512-byte long bounce buffer if the src argument
is not 4-byte aligned. This can never happen as src is the address of a
block cache chunk, which is always aligned for DMA, which is always a
multiple of 4 bytes. Furthermore, the bounce buffer is just a single
sector and the
://lore.barebox.org/barebox/20231128-v2023-08-0-topic-macb-v1-0-9faff73bc...@pengutronix.de/T/#t
Ahmad Fatoum (4):
dma: factor out dma map generic implementations into file
dma: add DMA API debugging support
mci: core: remove broken, unneeded write bounce buffer
mci: stm32_sdmmc2: correct usage of DMA API
There's a suitable fallback dma_alloc implementation already in dma.h,
which we can use as soon as we define DMA_ALIGNMENT.
Reviewed-by: Marco Felsch
Signed-off-by: Ahmad Fatoum
---
arch/arm/include/asm/dma.h | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git
Am Dienstag, dem 28.11.2023 um 17:29 +0100 schrieb Steffen Trumtrar:
> rx_buffer gets dma_alloc'ed but is never dma_map'ed and therefor not
> flushed before it is initially used.
>
> Map the rx_buffer when the macb is initialized and unmap it on ether_halt.
>
> While at it, cleanup the
rx_buffer gets dma_alloc'ed but is never dma_map'ed and therefor not
flushed before it is initially used.
Map the rx_buffer when the macb is initialized and unmap it on ether_halt.
While at it, cleanup the dma_alloc_coherent rx_ring/tx_ring, too.
Signed-off-by: Steffen Trumtrar
---
drivers/net/macb.c | 90 ++
1 file changed, 50 insertions(+), 40 deletions(-)
---
base-commit: 5f200dd534c848dfa5d948334b6373f0310b8f73
change-id: 20231128-v2023-08-0-topic-macb-0c13ed91179d
Best regards,
--
Steffen Trumtrar
Instead of directly reading from memory addresses and inserting
sw barriers to be sure that the compiler will not move loads/stores
behind this point, just use proper volatile writel/readl accesses.
Signed-off-by: Steffen Trumtrar
---
drivers/net/macb.c | 53
Especially on SCMI boards, it isn't immediately clear if e.g. reg11 is
supplied by a directly accessed regulator or by the secure world.
Give the regulator command a -D option to list devices that the
regulator is associated with as well.
Signed-off-by: Ahmad Fatoum
---
commands/regulator.c
15 matches
Mail list logo