diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-11-02 15:31:01 -1000 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-11-02 15:31:01 -1000 |
commit | 8c04bddc27d60df8ca5cb5bea40374c3ca1d75fc (patch) | |
tree | 7b85754c87e08c2b88960e6ef2bd743664e89cb6 /arch | |
parent | 43468456c95b9e13c0592de51a9a530caa525c1f (diff) | |
parent | 2508b608f4028c6fe0d63698f64a9bfc3eb6b780 (diff) |
Merge tag 'm68knommu-for-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Pull m68knommu updates from Greg Ungerer:
"A few changes, most of them related to fixing warnings when compiling
with "W=1". These follow up Geert's recent changes for M68K for this
too. These ones complete the fixes for the nommu and ColdFire specific
code.
Also a couple of other fixes to improve ROM default addressing and
compiling for the Cleopatra boards.
Summary:
- improve default Kconfig ROM section settings
- fix compilation for some Cleopatra boards
- fixes and cleanups for warnings compiling with 'W=1'"
* tag 'm68knommu-for-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
m68k: 68000: fix warning in timer code
m68k: 68000: fix warnings in 68000 interrupt handling
m68k: coldfire: remove unused variable in MMU code
m68k: coldfire: fix warnings in uboot argument processing
m68k: coldfire: make mcf_maskimr() static
m68k: coldfire: ensure gpio prototypes visible
m68k: coldfire: add and use "vectors.h"
m68knommu: fix compilation for ColdFire/Cleopatra boards
m68knommu: improve config ROM setting defaults
Diffstat (limited to 'arch')
-rw-r--r-- | arch/m68k/68000/ints.c | 5 | ||||
-rw-r--r-- | arch/m68k/68000/ints.h | 7 | ||||
-rw-r--r-- | arch/m68k/68000/timers.c | 2 | ||||
-rw-r--r-- | arch/m68k/Kconfig.machine | 4 | ||||
-rw-r--r-- | arch/m68k/coldfire/intc.c | 4 | ||||
-rw-r--r-- | arch/m68k/coldfire/vectors.c | 2 | ||||
-rw-r--r-- | arch/m68k/coldfire/vectors.h | 3 | ||||
-rw-r--r-- | arch/m68k/include/asm/mcfgpio.h | 8 | ||||
-rw-r--r-- | arch/m68k/include/asm/nettel.h | 5 | ||||
-rw-r--r-- | arch/m68k/kernel/uboot.c | 13 | ||||
-rw-r--r-- | arch/m68k/mm/mcfmmu.c | 3 |
11 files changed, 37 insertions, 19 deletions
diff --git a/arch/m68k/68000/ints.c b/arch/m68k/68000/ints.c index f9a5ec781408..2ba9926e91ae 100644 --- a/arch/m68k/68000/ints.c +++ b/arch/m68k/68000/ints.c @@ -14,6 +14,7 @@ #include <linux/init.h> #include <linux/interrupt.h> #include <linux/irq.h> +#include <linux/cpu.h> #include <asm/traps.h> #include <asm/io.h> #include <asm/machdep.h> @@ -26,6 +27,8 @@ #include <asm/MC68328.h> #endif +#include "ints.h" + /* assembler routines */ asmlinkage void system_call(void); asmlinkage void buserr(void); @@ -74,7 +77,7 @@ asmlinkage irqreturn_t inthandler7(void); * into one vector and look in the blasted mask register... * This code is designed to be fast, almost constant time, not clean! */ -void process_int(int vec, struct pt_regs *fp) +asmlinkage void process_int(int vec, struct pt_regs *fp) { int irq; int mask; diff --git a/arch/m68k/68000/ints.h b/arch/m68k/68000/ints.h new file mode 100644 index 000000000000..d9cfd0eb9ffe --- /dev/null +++ b/arch/m68k/68000/ints.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <linux/linkage.h> + +struct pt_regs; + +asmlinkage void process_int(int vec, struct pt_regs *fp); diff --git a/arch/m68k/68000/timers.c b/arch/m68k/68000/timers.c index 0d0417cebc7f..00fb0dd12faa 100644 --- a/arch/m68k/68000/timers.c +++ b/arch/m68k/68000/timers.c @@ -25,6 +25,8 @@ #include <asm/machdep.h> #include <asm/MC68VZ328.h> +#include "m68328.h" + /***************************************************************************/ #if defined(CONFIG_DRAGEN2) diff --git a/arch/m68k/Kconfig.machine b/arch/m68k/Kconfig.machine index 1f3574aef638..d06b1c5d9b0c 100644 --- a/arch/m68k/Kconfig.machine +++ b/arch/m68k/Kconfig.machine @@ -441,7 +441,7 @@ config ROM config ROMVEC hex "Address of the base of the ROM vectors" - default "0" + default "0x10c10000" depends on ROM help This is almost always the same as the base of the ROM. Since on all @@ -450,7 +450,7 @@ config ROMVEC config ROMSTART hex "Address of the base of system image in ROM" - default "0x400" + default "0x10c10400" depends on ROM help Define the start address of the system image in ROM. Commonly this diff --git a/arch/m68k/coldfire/intc.c b/arch/m68k/coldfire/intc.c index 20c084e932c8..b434371e2b99 100644 --- a/arch/m68k/coldfire/intc.c +++ b/arch/m68k/coldfire/intc.c @@ -56,7 +56,7 @@ void mcf_clrimr(int index) __raw_writew(imr & ~(0x1 << index), MCFSIM_IMR); } -void mcf_maskimr(unsigned int mask) +static void mcf_maskimr(unsigned int mask) { u16 imr; imr = __raw_readw(MCFSIM_IMR); @@ -80,7 +80,7 @@ void mcf_clrimr(int index) __raw_writel(imr & ~(0x1 << index), MCFSIM_IMR); } -void mcf_maskimr(unsigned int mask) +static void mcf_maskimr(unsigned int mask) { u32 imr; imr = __raw_readl(MCFSIM_IMR); diff --git a/arch/m68k/coldfire/vectors.c b/arch/m68k/coldfire/vectors.c index 3bf0d69eec9e..c26c255b530d 100644 --- a/arch/m68k/coldfire/vectors.c +++ b/arch/m68k/coldfire/vectors.c @@ -18,6 +18,8 @@ #include <asm/mcfsim.h> #include <asm/mcfwdebug.h> +#include "vectors.h" + /***************************************************************************/ #ifdef TRAP_DBG_INTERRUPT diff --git a/arch/m68k/coldfire/vectors.h b/arch/m68k/coldfire/vectors.h new file mode 100644 index 000000000000..0b01450a4353 --- /dev/null +++ b/arch/m68k/coldfire/vectors.h @@ -0,0 +1,3 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +void trap_init(void); diff --git a/arch/m68k/include/asm/mcfgpio.h b/arch/m68k/include/asm/mcfgpio.h index 7abd322c019f..019f24439546 100644 --- a/arch/m68k/include/asm/mcfgpio.h +++ b/arch/m68k/include/asm/mcfgpio.h @@ -8,10 +8,6 @@ #ifndef mcfgpio_h #define mcfgpio_h -#ifdef CONFIG_GPIOLIB -#include <linux/gpio.h> -#else - int __mcfgpio_get_value(unsigned gpio); void __mcfgpio_set_value(unsigned gpio, int value); int __mcfgpio_direction_input(unsigned gpio); @@ -19,6 +15,10 @@ int __mcfgpio_direction_output(unsigned gpio, int value); int __mcfgpio_request(unsigned gpio); void __mcfgpio_free(unsigned gpio); +#ifdef CONFIG_GPIOLIB +#include <linux/gpio.h> +#else + /* our alternate 'gpiolib' functions */ static inline int __gpio_get_value(unsigned gpio) { diff --git a/arch/m68k/include/asm/nettel.h b/arch/m68k/include/asm/nettel.h index 45716ead7b9d..3bd4b7a4613f 100644 --- a/arch/m68k/include/asm/nettel.h +++ b/arch/m68k/include/asm/nettel.h @@ -14,9 +14,8 @@ #define nettel_h /****************************************************************************/ - /****************************************************************************/ -#ifdef CONFIG_NETtel +#if defined(CONFIG_NETtel) || defined(CONFIG_CLEOPATRA) /****************************************************************************/ #ifdef CONFIG_COLDFIRE @@ -26,7 +25,7 @@ #endif /*---------------------------------------------------------------------------*/ -#if defined(CONFIG_M5307) +#if defined(CONFIG_M5307) || defined(CONFIG_M5407) /* * NETtel/5307 based hardware first. DTR/DCD lines are wired to * GPIO lines. Most of the LED's are driver through a latch diff --git a/arch/m68k/kernel/uboot.c b/arch/m68k/kernel/uboot.c index 928dbd33fc4a..8bb1cb3a7490 100644 --- a/arch/m68k/kernel/uboot.c +++ b/arch/m68k/kernel/uboot.c @@ -27,6 +27,7 @@ #include <asm/irq.h> #include <asm/machdep.h> #include <asm/sections.h> +#include <asm/bootinfo.h> /* * parse_uboot_commandline @@ -63,20 +64,22 @@ static void __init parse_uboot_commandline(char *commandp, int size) { extern unsigned long _init_sp; unsigned long *sp; - unsigned long uboot_kbd; - unsigned long uboot_initrd_start, uboot_initrd_end; unsigned long uboot_cmd_start, uboot_cmd_end; +#if defined(CONFIG_BLK_DEV_INITRD) + unsigned long uboot_initrd_start, uboot_initrd_end; +#endif /* if defined(CONFIG_BLK_DEV_INITRD) */ sp = (unsigned long *)_init_sp; - uboot_kbd = sp[1]; - uboot_initrd_start = sp[2]; - uboot_initrd_end = sp[3]; uboot_cmd_start = sp[4]; uboot_cmd_end = sp[5]; if (uboot_cmd_start && uboot_cmd_end) strncpy(commandp, (const char *)uboot_cmd_start, size); + #if defined(CONFIG_BLK_DEV_INITRD) + uboot_initrd_start = sp[2]; + uboot_initrd_end = sp[3]; + if (uboot_initrd_start && uboot_initrd_end && (uboot_initrd_end > uboot_initrd_start)) { initrd_start = uboot_initrd_start; diff --git a/arch/m68k/mm/mcfmmu.c b/arch/m68k/mm/mcfmmu.c index a6efaa7cacde..9a6fa342e872 100644 --- a/arch/m68k/mm/mcfmmu.c +++ b/arch/m68k/mm/mcfmmu.c @@ -38,7 +38,7 @@ void __init paging_init(void) pgd_t *pg_dir; pte_t *pg_table; unsigned long address, size; - unsigned long next_pgtable, bootmem_end; + unsigned long next_pgtable; unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 }; int i; @@ -57,7 +57,6 @@ void __init paging_init(void) panic("%s: Failed to allocate %lu bytes align=0x%lx\n", __func__, size, PAGE_SIZE); - bootmem_end = (next_pgtable + size + PAGE_SIZE) & PAGE_MASK; pg_dir += PAGE_OFFSET >> PGDIR_SHIFT; address = PAGE_OFFSET; |