From: Angelo Dureghello <angelo@kernel-space.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Greg Ungerer <gerg@linux-m68k.org>,
Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Angelo Dureghello <angelo@sysam.it>, Frank Li <Frank.Li@nxp.com>
Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org,
dmaengine@vger.kernel.org, imx@lists.linux.dev,
Angelo Dureghello <angelo@kernel-space.org>
Subject: [PATCH 04/10] m68k: mcf54415: add DMA global pool initialization
Date: Tue, 01 Dec 2026 23:40:15 +0100 [thread overview]
Message-ID: <20261201-wip-ks-stmark2-dma-fix-v1-4-99748ff19937@kernel-space.org> (raw)
In-Reply-To: <20261201-wip-ks-stmark2-dma-fix-v1-0-99748ff19937@kernel-space.org>
Add DMA global pool initialization at boot stage for mcf54415, when
configured as MMU enabled.
Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
---
arch/m68k/coldfire/head.S | 5 +++++
arch/m68k/coldfire/m5441x.c | 7 +++++++
arch/m68k/mm/kmap.c | 5 +++++
3 files changed, 17 insertions(+)
diff --git a/arch/m68k/coldfire/head.S b/arch/m68k/coldfire/head.S
index c6d7fd28c602..415b50ea7b64 100644
--- a/arch/m68k/coldfire/head.S
+++ b/arch/m68k/coldfire/head.S
@@ -197,12 +197,17 @@ _start:
movec %d0,%ACR0
movel #ACR1_MODE,%d0 /* anything else to cache? */
movec %d0,%ACR1
+#ifdef ACR4_MODE
+ movel #ACR4_MODE,%d0
+ movec %d0,#0x00c /* ACR4 */
+#endif
#ifdef ACR2_MODE
movel #ACR2_MODE,%d0
movec %d0,%ACR2
movel #ACR3_MODE,%d0
movec %d0,%ACR3
#endif
+
movel #CACHE_MODE,%d0 /* enable cache */
movec %d0,%CACR
nop
diff --git a/arch/m68k/coldfire/m5441x.c b/arch/m68k/coldfire/m5441x.c
index dd39ecbf8422..214c634cf057 100644
--- a/arch/m68k/coldfire/m5441x.c
+++ b/arch/m68k/coldfire/m5441x.c
@@ -7,6 +7,7 @@
#include <linux/clkdev.h>
#include <linux/kernel.h>
+#include <linux/memblock.h>
#include <linux/param.h>
#include <linux/init.h>
#include <linux/io.h>
@@ -269,6 +270,12 @@ arch_initcall(m5441x_rcm_init);
void __init config_BSP(char *commandp, int size)
{
+#if defined(CONFIG_DMA_GLOBAL_POOL)
+ memblock_reserve(CONFIG_RAMBASE + CONFIG_RAMSIZE -
+ CONFIG_DMA_GLOBAL_POOL_SIZE,
+ CONFIG_DMA_GLOBAL_POOL_SIZE);
+#endif
+
m5441x_clk_init();
mach_sched_init = hw_timer_init;
m5441x_uarts_init();
diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c
index 6167999402b1..b11c25e3d31b 100644
--- a/arch/m68k/mm/kmap.c
+++ b/arch/m68k/mm/kmap.c
@@ -188,6 +188,11 @@ void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cachefla
#ifdef CONFIG_COLDFIRE
if (__cf_internalio(physaddr))
return (void __iomem *) physaddr;
+#ifdef CONFIG_DMA_GLOBAL_POOL
+ if (physaddr >= (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_DMA_GLOBAL_POOL_SIZE) &&
+ physaddr < (CONFIG_RAMBASE + CONFIG_RAMSIZE))
+ return (void __iomem *) physaddr;
+#endif
#endif
#ifdef DEBUG
--
2.56.1
next prev parent reply other threads:[~2026-12-01 22:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 22:40 [PATCH 00/10] m68k: mcf54415: fix ColdFire edma-related issues Angelo Dureghello
2026-12-01 22:40 ` [PATCH 01/10] m68k: add DMA global pool config Angelo Dureghello
2026-12-01 22:40 ` [PATCH 02/10] m68k: add DMA global pool setup Angelo Dureghello
2026-12-01 22:40 ` [PATCH 03/10] m68k: mcf54415: add defines for DMA global pool Angelo Dureghello
2026-12-01 22:40 ` Angelo Dureghello [this message]
2026-12-01 22:40 ` [PATCH 05/10] m68K: mcf54415: rename mcf edma clock name Angelo Dureghello
2026-12-01 22:40 ` [PATCH 06/10] m68k: mcf54415: align device name with " Angelo Dureghello
2026-12-01 22:40 ` [PATCH 07/10] dmaengine: mcf-edma: enable edma clock Angelo Dureghello
2026-12-01 22:40 ` [PATCH 08/10] dmaengine: mcf-edma: fix wrong BIT() usage on u64 Angelo Dureghello
2026-12-01 22:40 ` [PATCH 09/10] dmaengine: mcf-edma: fix wrong error handling Angelo Dureghello
2026-12-01 22:40 ` [PATCH 10/10] dmaengine: fsl-edma: fix missing big-endian swap Angelo Dureghello
2026-12-02 9:26 ` [PATCH 00/10] m68k: mcf54415: fix ColdFire edma-related issues Jean-Michel Hautbois
2026-12-02 12:12 ` Angelo Dureghello
2026-12-02 12:53 ` Jean-Michel Hautbois
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261201-wip-ks-stmark2-dma-fix-v1-4-99748ff19937@kernel-space.org \
--to=angelo@kernel-space.org \
--cc=Frank.Li@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=angelo@sysam.it \
--cc=dmaengine@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=gerg@linux-m68k.org \
--cc=imx@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®