m68knommu: updates and fixes for v6.7

Fixes include.
 . improve default Kconfig ROM section settings
 . fix compilation for some Cleopatra boards
 . fixes and cleanups for warnings compiling with "W=1"
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEmsfM6tQwfNjBOxr3TiQVqaG9L4AFAmVDIXUACgkQTiQVqaG9
 L4A6Bg//Q5WX+UHhmTBqtq+d/nKm0idmuTVHf9wgx5VKzQnkdLURFRdE7y6iTKEP
 gfdOH3YBIbwID3WgvhOy1ak9HDN0RceSSWkooytwqxV+5OTSpprrJfr512UsOCgi
 Lc+rk10LnYAwtX7apWRyygeA7KR33feYW4D7TRgQhuulyEG1x/L4IEsCN9wbpbjt
 LhwPddl6J+T3gbawQZm2QnziKojq6BvPySjvSI9gNOfFSJQiuBWxzT1Hp3hrgIe9
 Tb5TuwT9hK7C/29zCMTGgGR+NgXTNXU8ED5QLVNCEvmPvVMuzg+Y0PWL0eFS1AFJ
 n6182F4iWVLtXGZhQL+FcJwHjJVX8S9UzK5QpKrITmeH+yz+c3JCXm+xP3b1e1u5
 dFwyvRl1IdTN6wuXa45GFiPWdk/06rqBExWnoKQuAv0ThLa+Pv2Rh1ITWFJSXErK
 roe+zeohD0e7v1o4B8DPQlUyRomv+CWqexRWpDieREmjaNZ90JSde1pcthCppIni
 QP8sTFdimYHxVFOcickomA0i1vef0mO4OsNmx4UT5CvSCV5HzvLbh7geUJTTbmQx
 MCBp1W9Udi6eVTJsvmd1Qx9YvvhYb2csuhS1/jColAEWCqiysf9Ios+GPIbxRti3
 p1whln8JVb9J0Qg89auu00MHeFh96sZYGwEI4NZeRSefz4uTW6A=
 =rBQb
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2023-11-02 15:31:01 -10:00
commit 8c04bddc27
11 changed files with 37 additions and 19 deletions

View File

@ -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;

7
arch/m68k/68000/ints.h Normal file
View File

@ -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);

View File

@ -25,6 +25,8 @@
#include <asm/machdep.h>
#include <asm/MC68VZ328.h>
#include "m68328.h"
/***************************************************************************/
#if defined(CONFIG_DRAGEN2)

View File

@ -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

View File

@ -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);

View File

@ -18,6 +18,8 @@
#include <asm/mcfsim.h>
#include <asm/mcfwdebug.h>
#include "vectors.h"
/***************************************************************************/
#ifdef TRAP_DBG_INTERRUPT

View File

@ -0,0 +1,3 @@
/* SPDX-License-Identifier: GPL-2.0-only */
void trap_init(void);

View File

@ -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)
{

View File

@ -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

View File

@ -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;

View File

@ -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;