diff options
| author | Mark Brown <broonie@kernel.org> | 2026-10-16 12:34:01 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-10-16 12:34:01 +0100 |
| commit | a40997779506e355d3eb8a1edca20eb2441bbe27 (patch) | |
| tree | 3c7b29e5380362a0bddd6f99eb3c2dcfd706d7ec | |
| parent | 4652dae3a61a23ec109a6abf8e316d4718efd89f (diff) | |
| parent | cffad6e71539bc00d5a76c0c1057dc067d42715c (diff) | |
| download | linux-next-a40997779506e355d3eb8a1edca20eb2441bbe27.tar.gz linux-next-a40997779506e355d3eb8a1edca20eb2441bbe27.zip | |
Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu.git
| -rw-r--r-- | arch/m68k/68000/entry.S | 3 | ||||
| -rw-r--r-- | arch/m68k/coldfire/device.c | 28 | ||||
| -rw-r--r-- | arch/m68k/coldfire/entry.S | 3 | ||||
| -rw-r--r-- | arch/m68k/coldfire/m5407.c | 5 | ||||
| -rw-r--r-- | arch/m68k/coldfire/m5441x.c | 2 | ||||
| -rw-r--r-- | arch/m68k/coldfire/reset.c | 2 | ||||
| -rw-r--r-- | arch/m68k/configs/stmark2_defconfig | 2 | ||||
| -rw-r--r-- | arch/m68k/include/asm/m53xxacr.h | 2 | ||||
| -rw-r--r-- | arch/m68k/include/asm/m5441xsim.h | 16 | ||||
| -rw-r--r-- | arch/m68k/include/asm/quicc_simple.h | 53 | ||||
| -rw-r--r-- | drivers/char/hw_random/Kconfig | 3 | ||||
| -rw-r--r-- | drivers/char/hw_random/imx-rngc.c | 7 |
12 files changed, 67 insertions, 59 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/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/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 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); 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/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 <asm/mcfsim.h> /* - * 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. 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 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. diff --git a/arch/m68k/include/asm/m5441xsim.h b/arch/m68k/include/asm/m5441xsim.h index ea01c7753b7b..8cd17452486f 100644 --- a/arch/m68k/include/asm/m5441xsim.h +++ b/arch/m68k/include/asm/m5441xsim.h @@ -241,6 +241,15 @@ #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. */ #define MCFGPIO_PODR_A 0xec094000 @@ -375,4 +384,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 */ 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 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); |
