From 33685138abd52bc395ab1a2e5b31f286c0b259ef Mon Sep 17 00:00:00 2001 From: Hemanth Selam Date: Mon, 7 Sep 2026 10:15:45 +0530 Subject: m68k: coldfire: fix typos in reset.c comment Correct "reseting" to "resetting" and "ColdFure" to "ColdFire". v1 fixed only "reseting", which checkpatch had flagged, and left "ColdFure" two words earlier untouched. Josh Juran spotted it. Only touches a comment, no code changes. Assisted-by: Cursor:claude-opus-5 Signed-off-by: Hemanth Selam Signed-off-by: Greg Ungerer --- arch/m68k/coldfire/reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m68k/coldfire/reset.c b/arch/m68k/coldfire/reset.c index 6e5f8ab39f32..079c92593eff 100644 --- a/arch/m68k/coldfire/reset.c +++ b/arch/m68k/coldfire/reset.c @@ -16,7 +16,7 @@ #include /* - * There are 2 common methods amongst the ColdFure parts for reseting + * There are 2 common methods amongst the ColdFire parts for resetting * the CPU. But there are couple of exceptions, the 5272 and the 547x * have something completely special to them, and we let their specific * subarch code handle them. -- cgit v1.2.3 From 1d3b87291269fb4a6e9bc15e7f9d7f880cc5e93a Mon Sep 17 00:00:00 2001 From: Hemanth Selam Date: Fri, 4 Sep 2026 16:52:44 +0530 Subject: m68k: fix typo "eanble" in comment Correct "eanble" to "Enable", reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches comments, no code changes. Assisted-by: Cursor:claude-opus-5 Signed-off-by: Hemanth Selam Signed-off-by: Greg Ungerer --- arch/m68k/include/asm/m53xxacr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m68k/include/asm/m53xxacr.h b/arch/m68k/include/asm/m53xxacr.h index 692f90e7fecc..a29ad33aaf05 100644 --- a/arch/m68k/include/asm/m53xxacr.h +++ b/arch/m68k/include/asm/m53xxacr.h @@ -32,7 +32,7 @@ #define CACR_DCM_PRE 0x00000200 /* Cache inhibited, precise */ #define CACR_DCM_IMPRE 0x00000300 /* Cache inhibited, imprecise */ #define CACR_WPROTECT 0x00000020 /* Write protect*/ -#define CACR_EUSP 0x00000010 /* Eanble separate user a7 */ +#define CACR_EUSP 0x00000010 /* Enable separate user a7 */ /* * Define the Access Control register flags. -- cgit v1.2.3 From 39e5ca862bd71ddbc0aae2cc3dbc7732c94a9cf6 Mon Sep 17 00:00:00 2001 From: Ethan Nelson-Moore Date: Thu, 17 Sep 2026 20:42:13 -0700 Subject: m68k: remove unused header arch/m68k/include/asm/quicc_simple.h has been unused since commit a3595962d824 ("m68knommu: remove obsolete 68360 support"). Remove it. Signed-off-by: Ethan Nelson-Moore Signed-off-by: Greg Ungerer --- arch/m68k/include/asm/quicc_simple.h | 53 ------------------------------------ 1 file changed, 53 deletions(-) delete mode 100644 arch/m68k/include/asm/quicc_simple.h diff --git a/arch/m68k/include/asm/quicc_simple.h b/arch/m68k/include/asm/quicc_simple.h deleted file mode 100644 index b9e2808b44ac..000000000000 --- a/arch/m68k/include/asm/quicc_simple.h +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/*********************************** - * $Id: quicc_simple.h,v 1.1 2002/03/02 15:01:10 gerg Exp $ - *********************************** - * - *************************************** - * Simple drivers common header - *************************************** - */ - -#ifndef __SIMPLE_H -#define __SIMPLE_H - -/* #include "quicc.h" */ - -#define GLB_SCC_0 0 -#define GLB_SCC_1 1 -#define GLB_SCC_2 2 -#define GLB_SCC_3 3 - -typedef void (int_routine)(unsigned short interrupt_event); -typedef int_routine *int_routine_ptr; -typedef void *(alloc_routine)(int length); -typedef void (free_routine)(int scc_num, int channel_num, void *buf); -typedef void (store_rx_buffer_routine)(int scc_num, int channel_num, void *buff, int length); -typedef int (handle_tx_error_routine)(int scc_num, int channel_num, QUICC_BD *tbd); -typedef void (handle_rx_error_routine)(int scc_num, int channel_num, QUICC_BD *rbd); -typedef void (handle_lost_error_routine)(int scc_num, int channel_num); - -/* user defined functions for global errors */ -typedef void (handle_glob_overrun_routine)(int scc_number); -typedef void (handle_glob_underrun_routine)(int scc_number); -typedef void (glob_intr_q_overflow_routine)(int scc_number); - -/* - * General initialization and command routines - */ -void quicc_issue_cmd (unsigned short cmd, int scc_num); -void quicc_init(void); -void quicc_scc_init(int scc_number, int number_of_rx_buf, int number_of_tx_buf); -void quicc_smc_init(int smc_number, int number_of_rx_buf, int number_of_tx_buf); -void quicc_scc_start(int scc_num); -void quicc_scc_loopback(int scc_num); - -/* Interrupt enable/disable routines for critical pieces of code*/ -unsigned short IntrDis(void); -void IntrEna(unsigned short old_sr); - -/* For debugging */ -void print_rbd(int scc_num); -void print_tbd(int scc_num); - -#endif -- cgit v1.2.3 From 48859f8018d93bd93ef35f7430fdf5b97f2f9715 Mon Sep 17 00:00:00 2001 From: Christopher Lusk Date: Sun, 13 Sep 2026 09:17:53 -0400 Subject: m68k: Fix seccomp filtering on ColdFire and 68000 m68k selects HAVE_ARCH_SECCOMP_FILTER for all configurations, but the ColdFire and 68000 syscall entry paths only branch to syscall_trace_enter() for TIF_SYSCALL_TRACE. TIF_SECCOMP alone falls through to syscall dispatch, leaving installed filters ineffective. Test the combined TIF_SYSCALL_TRACE and TIF_SECCOMP mask in both paths and route either flag through the existing slow path. Leave the classic MMU syscall entry implementation unchanged. Validated the combined test under QEMU mcf5208evb (ColdFire): filters denying getpid, openat, unlinkat, and reboot each returned -EPERM. A classic-MMU control (q800) denied the filtered getpid syscall both before and after this change. The 68000 path shares the same source-level omission and receives the identical masked test but was not separately emulated. Compile-tested W=1 with CONFIG_SECCOMP_FILTER=y on both m5208evb_defconfig and a custom no-MMU UCSIMM configuration; the latter built arch/m68k/68000/entry.o and vmlinux. Fixes: 6baaade15594 ("m68k: Add kernel seccomp support") Cc: stable@vger.kernel.org # v6.3+ Suggested-by: Andreas Schwab Assisted-by: Claude:claude-opus-4-8 Assisted-by: Codex:gpt-5.6-sol Signed-off-by: Christopher Lusk Signed-off-by: Greg Ungerer --- arch/m68k/68000/entry.S | 3 ++- arch/m68k/coldfire/entry.S | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/m68k/68000/entry.S b/arch/m68k/68000/entry.S index c257cc415c47..0d3cbededc43 100644 --- a/arch/m68k/68000/entry.S +++ b/arch/m68k/68000/entry.S @@ -79,7 +79,8 @@ ENTRY(system_call) /* Doing a trace ? */ getthreadinfo - btst #(TIF_SYSCALL_TRACE%8),%a2@(TINFO_FLAGS+(31-TIF_SYSCALL_TRACE)/8) + moveb %a2@(TINFO_FLAGS+2),%d1 + andl #((_TIF_SYSCALL_TRACE + _TIF_SECCOMP) >> 8),%d1 jne do_trace cmpl #NR_syscalls,%d0 jcc badsys diff --git a/arch/m68k/coldfire/entry.S b/arch/m68k/coldfire/entry.S index 4ea08336e2fb..d658abdc5207 100644 --- a/arch/m68k/coldfire/entry.S +++ b/arch/m68k/coldfire/entry.S @@ -72,7 +72,8 @@ ENTRY(system_call) movel %d2,%a0 movel %a0@,%a1 /* save top of frame */ movel %sp,%a1@(TASK_THREAD+THREAD_ESP0) - btst #(TIF_SYSCALL_TRACE%8),%a0@(TINFO_FLAGS+(31-TIF_SYSCALL_TRACE)/8) + moveb %a0@(TINFO_FLAGS+2),%d2 + andl #((_TIF_SYSCALL_TRACE + _TIF_SECCOMP) >> 8),%d2 bnes 1f movel %d3,%a0 -- cgit v1.2.3 From 04ba77824fcb172146b53ea60b37f1d42e75818a Mon Sep 17 00:00:00 2001 From: Angelo Dureghello Date: Wed, 1 Jul 2026 16:17:24 +0200 Subject: m68k: defconfig: update stmark2 defconfig Update stmark2 defconfig enabling MCF5441X DACs. Signed-off-by: Angelo Dureghello Signed-off-by: Greg Ungerer --- arch/m68k/configs/stmark2_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/m68k/configs/stmark2_defconfig b/arch/m68k/configs/stmark2_defconfig index cd454369bfe8..d303b21949a7 100644 --- a/arch/m68k/configs/stmark2_defconfig +++ b/arch/m68k/configs/stmark2_defconfig @@ -76,6 +76,8 @@ CONFIG_DMADEVICES=y CONFIG_MCF_EDMA=y # CONFIG_VIRTIO_MENU is not set # CONFIG_VHOST_MENU is not set +CONFIG_IIO=y +CONFIG_MCF54415_DAC=y CONFIG_EXT2_FS=y CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y -- cgit v1.2.3 From 8b08200528431dbe4fce3ff2351ee2bc7830a357 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Thu, 24 Sep 2026 00:23:33 +1000 Subject: m68knommu: fix compile breakage for 5407 cleopatra board Compiling for the Cleopatra target and specifying the ColdFire 5407 SoC will fail with the following errors: m68k-linux-ld: arch/m68k/coldfire/nettel.o: in function `init_nettel': nettel.c:(.init.text+0x74): undefined reference to `ppdata' m68k-linux-ld: nettel.c:(.init.text+0x9c): undefined reference to `ppdata' m68k-linux-ld: nettel.c:(.init.text+0x6a): undefined reference to `ppdata' m68k-linux-ld: nettel.c:(.init.text+0x7a): undefined reference to `ppdata' m68k-linux-ld: nettel.c:(.init.text+0x92): undefined reference to `ppdata' The fix is to define "ppdata" in the same way as is done for the 5307 and 5272 - it is the same register setup in the 5407 as those other SoC parts. Signed-off-by: Greg Ungerer --- arch/m68k/coldfire/m5407.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/m68k/coldfire/m5407.c b/arch/m68k/coldfire/m5407.c index 23a14416241c..1f3e30b33398 100644 --- a/arch/m68k/coldfire/m5407.c +++ b/arch/m68k/coldfire/m5407.c @@ -22,6 +22,11 @@ /***************************************************************************/ +/* + * Some platforms need software versions of the GPIO data registers. + */ +unsigned short ppdata; + DEFINE_CLK(pll, "pll.0", MCF_CLK); DEFINE_CLK(sys, "sys.0", MCF_BUSCLK); -- cgit v1.2.3 From 6cc53342f830ef9f2f67838478d9e7e0e70c0d28 Mon Sep 17 00:00:00 2001 From: Angelo Dureghello Date: Mon, 5 Oct 2026 12:06:23 +0200 Subject: m68k: mcf5441x: add PWM defines Add PWM defines for the mcf5441x family. Signed-off-by: Angelo Dureghello Signed-off-by: Greg Ungerer --- arch/m68k/include/asm/m5441xsim.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/m68k/include/asm/m5441xsim.h b/arch/m68k/include/asm/m5441xsim.h index ea01c7753b7b..aa925fac87f4 100644 --- a/arch/m68k/include/asm/m5441xsim.h +++ b/arch/m68k/include/asm/m5441xsim.h @@ -375,4 +375,11 @@ #define MCF_IRQ_BOFF1 (MCFINT1_VECBASE + MCFINT1_FLEXCAN1_BOFF) #define MCF_IRQ_ERR1 (MCFINT1_VECBASE + MCFINT1_FLEXCAN1_ERR) +/* + * PWM module + */ +#define MCFPWM_BASE 0xec088000 +#define MCFPWM_SIZE 0x150 +#define MCFPWM_SUB_SIZE 0x50 + #endif /* m5441xsim_h */ -- cgit v1.2.3 From cffad6e71539bc00d5a76c0c1057dc067d42715c Mon Sep 17 00:00:00 2001 From: Jean-Michel Hautbois Date: Mon, 12 Oct 2026 00:47:00 +1000 Subject: m68k: coldfire: Add RNG support for MCF54418 Add support for the hardware Random Number Generator (RNGB) found on MCF54418 ColdFire processors with clock enabled at platform initialization. The RNGB block is compatible with the imx-rngc driver. Reviewed-by: Frank Li Acked-by: Herbert Xu Signed-off-by: Jean-Michel Hautbois Signed-off-by: Greg Ungerer --- arch/m68k/coldfire/device.c | 28 ++++++++++++++++++++++++++++ arch/m68k/coldfire/m5441x.c | 2 +- arch/m68k/include/asm/m5441xsim.h | 9 +++++++++ drivers/char/hw_random/Kconfig | 3 ++- drivers/char/hw_random/imx-rngc.c | 7 +++++++ 5 files changed, 47 insertions(+), 2 deletions(-) diff --git a/arch/m68k/coldfire/device.c b/arch/m68k/coldfire/device.c index 9a0258acd998..f0963d53976c 100644 --- a/arch/m68k/coldfire/device.c +++ b/arch/m68k/coldfire/device.c @@ -622,6 +622,31 @@ static struct platform_device mcf_flexcan0 = { }; #endif /* MCFFLEXCAN_SIZE */ +#ifdef MCF_RNG_BASE +/* + * Random Number Generator (RNG) - only on MCF54418 + */ +static struct resource mcf_rng_resource[] = { + { + .start = MCF_RNG_BASE, + .end = MCF_RNG_BASE + MCF_RNG_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = MCF_IRQ_RNG, + .end = MCF_IRQ_RNG, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device mcf_rng = { + .name = "imx-rngc", + .id = -1, + .num_resources = ARRAY_SIZE(mcf_rng_resource), + .resource = mcf_rng_resource, +}; +#endif /* MCF_RNG_BASE */ + static struct platform_device *mcf_devices[] __initdata = { &mcf_uart, #ifdef MCFFEC_BASE0 @@ -660,6 +685,9 @@ static struct platform_device *mcf_devices[] __initdata = { #ifdef MCFFLEXCAN_SIZE &mcf_flexcan0, #endif +#ifdef MCF_RNG_BASE + &mcf_rng, +#endif }; /* diff --git a/arch/m68k/coldfire/m5441x.c b/arch/m68k/coldfire/m5441x.c index ad3d0021578f..dd39ecbf8422 100644 --- a/arch/m68k/coldfire/m5441x.c +++ b/arch/m68k/coldfire/m5441x.c @@ -161,6 +161,7 @@ static struct clk * const enable_clks[] __initconst = { &__clk_0_33, /* pit.1 */ &__clk_0_36, /* eport */ &__clk_0_48, /* pll */ + &__clk_0_49, /* rng */ &__clk_0_51, /* esdhc */ &__clk_1_36, /* CCM/reset module/Power management */ @@ -183,7 +184,6 @@ static struct clk * const disable_clks[] __initconst = { &__clk_0_44, /* usb otg */ &__clk_0_45, /* usb host */ &__clk_0_47, /* ssi.0 */ - &__clk_0_49, /* rng */ &__clk_0_50, /* ssi.1 */ &__clk_0_53, /* enet-fec */ &__clk_0_54, /* enet-fec */ diff --git a/arch/m68k/include/asm/m5441xsim.h b/arch/m68k/include/asm/m5441xsim.h index aa925fac87f4..8cd17452486f 100644 --- a/arch/m68k/include/asm/m5441xsim.h +++ b/arch/m68k/include/asm/m5441xsim.h @@ -240,6 +240,15 @@ #define MCFRTC_SIZE (0xfc0a8840 - 0xfc0a8000) #define MCF_IRQ_RTC (MCFINT2_VECBASE + MCFINT2_RTC) +/* + * Random Number Generator (RNG) Module. + * Note: Only present in MCF54418, not in MCF54410/54415/54417 + */ +#define MCF_RNG_BASE 0xfc0c4000 +#define MCF_RNG_SIZE 0x1c +#define MCFINT2_RNG 28 +#define MCF_IRQ_RNG (MCFINT2_VECBASE + MCFINT2_RNG) + /* * GPIO Module. */ diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index 1bf5e3f8a557..d3108991c251 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig @@ -270,12 +270,13 @@ config HW_RANDOM_MXC_RNGA config HW_RANDOM_IMX_RNGC tristate "Freescale i.MX RNGC Random Number Generator" depends on HAS_IOMEM - depends on SOC_IMX25 || SOC_IMX6SL || SOC_IMX6SLL || SOC_IMX6UL || COMPILE_TEST + depends on SOC_IMX25 || SOC_IMX6SL || SOC_IMX6SLL || SOC_IMX6UL || COLDFIRE || COMPILE_TEST default HW_RANDOM help This driver provides kernel-side support for the Random Number Generator Version C hardware found on some Freescale i.MX processors. Version B is also supported by this driver. + Also supports RNGB on Freescale MCF54418 (Coldfire V4e). To compile this driver as a module, choose M here: the module will be called imx-rngc. diff --git a/drivers/char/hw_random/imx-rngc.c b/drivers/char/hw_random/imx-rngc.c index 7693328f1056..0114064713b2 100644 --- a/drivers/char/hw_random/imx-rngc.c +++ b/drivers/char/hw_random/imx-rngc.c @@ -354,12 +354,19 @@ static const struct of_device_id imx_rngc_dt_ids[] = { }; MODULE_DEVICE_TABLE(of, imx_rngc_dt_ids); +static const struct platform_device_id imx_rngc_devtype[] = { + { .name = "imx-rngc" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(platform, imx_rngc_devtype); + static struct platform_driver imx_rngc_driver = { .driver = { .name = KBUILD_MODNAME, .pm = pm_ptr(&imx_rngc_pm_ops), .of_match_table = imx_rngc_dt_ids, }, + .id_table = imx_rngc_devtype, }; module_platform_driver_probe(imx_rngc_driver, imx_rngc_probe); -- cgit v1.2.3