Skip to content

Commit 8c04bdd

Browse files
committed
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
2 parents 4346845 + 2508b60 commit 8c04bdd

File tree

11 files changed

+37
-19
lines changed

11 files changed

+37
-19
lines changed

arch/m68k/68000/ints.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/init.h>
1515
#include <linux/interrupt.h>
1616
#include <linux/irq.h>
17+
#include <linux/cpu.h>
1718
#include <asm/traps.h>
1819
#include <asm/io.h>
1920
#include <asm/machdep.h>
@@ -26,6 +27,8 @@
2627
#include <asm/MC68328.h>
2728
#endif
2829

30+
#include "ints.h"
31+
2932
/* assembler routines */
3033
asmlinkage void system_call(void);
3134
asmlinkage void buserr(void);
@@ -74,7 +77,7 @@ asmlinkage irqreturn_t inthandler7(void);
7477
* into one vector and look in the blasted mask register...
7578
* This code is designed to be fast, almost constant time, not clean!
7679
*/
77-
void process_int(int vec, struct pt_regs *fp)
80+
asmlinkage void process_int(int vec, struct pt_regs *fp)
7881
{
7982
int irq;
8083
int mask;

arch/m68k/68000/ints.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
3+
#include <linux/linkage.h>
4+
5+
struct pt_regs;
6+
7+
asmlinkage void process_int(int vec, struct pt_regs *fp);

arch/m68k/68000/timers.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#include <asm/machdep.h>
2626
#include <asm/MC68VZ328.h>
2727

28+
#include "m68328.h"
29+
2830
/***************************************************************************/
2931

3032
#if defined(CONFIG_DRAGEN2)

arch/m68k/Kconfig.machine

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ config ROM
441441

442442
config ROMVEC
443443
hex "Address of the base of the ROM vectors"
444-
default "0"
444+
default "0x10c10000"
445445
depends on ROM
446446
help
447447
This is almost always the same as the base of the ROM. Since on all
@@ -450,7 +450,7 @@ config ROMVEC
450450

451451
config ROMSTART
452452
hex "Address of the base of system image in ROM"
453-
default "0x400"
453+
default "0x10c10400"
454454
depends on ROM
455455
help
456456
Define the start address of the system image in ROM. Commonly this

arch/m68k/coldfire/intc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void mcf_clrimr(int index)
5656
__raw_writew(imr & ~(0x1 << index), MCFSIM_IMR);
5757
}
5858

59-
void mcf_maskimr(unsigned int mask)
59+
static void mcf_maskimr(unsigned int mask)
6060
{
6161
u16 imr;
6262
imr = __raw_readw(MCFSIM_IMR);
@@ -80,7 +80,7 @@ void mcf_clrimr(int index)
8080
__raw_writel(imr & ~(0x1 << index), MCFSIM_IMR);
8181
}
8282

83-
void mcf_maskimr(unsigned int mask)
83+
static void mcf_maskimr(unsigned int mask)
8484
{
8585
u32 imr;
8686
imr = __raw_readl(MCFSIM_IMR);

arch/m68k/coldfire/vectors.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
#include <asm/mcfsim.h>
1919
#include <asm/mcfwdebug.h>
2020

21+
#include "vectors.h"
22+
2123
/***************************************************************************/
2224

2325
#ifdef TRAP_DBG_INTERRUPT

arch/m68k/coldfire/vectors.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
3+
void trap_init(void);

arch/m68k/include/asm/mcfgpio.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
#ifndef mcfgpio_h
99
#define mcfgpio_h
1010

11-
#ifdef CONFIG_GPIOLIB
12-
#include <linux/gpio.h>
13-
#else
14-
1511
int __mcfgpio_get_value(unsigned gpio);
1612
void __mcfgpio_set_value(unsigned gpio, int value);
1713
int __mcfgpio_direction_input(unsigned gpio);
1814
int __mcfgpio_direction_output(unsigned gpio, int value);
1915
int __mcfgpio_request(unsigned gpio);
2016
void __mcfgpio_free(unsigned gpio);
2117

18+
#ifdef CONFIG_GPIOLIB
19+
#include <linux/gpio.h>
20+
#else
21+
2222
/* our alternate 'gpiolib' functions */
2323
static inline int __gpio_get_value(unsigned gpio)
2424
{

arch/m68k/include/asm/nettel.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
#define nettel_h
1515
/****************************************************************************/
1616

17-
1817
/****************************************************************************/
19-
#ifdef CONFIG_NETtel
18+
#if defined(CONFIG_NETtel) || defined(CONFIG_CLEOPATRA)
2019
/****************************************************************************/
2120

2221
#ifdef CONFIG_COLDFIRE
@@ -26,7 +25,7 @@
2625
#endif
2726

2827
/*---------------------------------------------------------------------------*/
29-
#if defined(CONFIG_M5307)
28+
#if defined(CONFIG_M5307) || defined(CONFIG_M5407)
3029
/*
3130
* NETtel/5307 based hardware first. DTR/DCD lines are wired to
3231
* GPIO lines. Most of the LED's are driver through a latch

arch/m68k/kernel/uboot.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <asm/irq.h>
2828
#include <asm/machdep.h>
2929
#include <asm/sections.h>
30+
#include <asm/bootinfo.h>
3031

3132
/*
3233
* parse_uboot_commandline
@@ -63,20 +64,22 @@ static void __init parse_uboot_commandline(char *commandp, int size)
6364
{
6465
extern unsigned long _init_sp;
6566
unsigned long *sp;
66-
unsigned long uboot_kbd;
67-
unsigned long uboot_initrd_start, uboot_initrd_end;
6867
unsigned long uboot_cmd_start, uboot_cmd_end;
68+
#if defined(CONFIG_BLK_DEV_INITRD)
69+
unsigned long uboot_initrd_start, uboot_initrd_end;
70+
#endif /* if defined(CONFIG_BLK_DEV_INITRD) */
6971

7072
sp = (unsigned long *)_init_sp;
71-
uboot_kbd = sp[1];
72-
uboot_initrd_start = sp[2];
73-
uboot_initrd_end = sp[3];
7473
uboot_cmd_start = sp[4];
7574
uboot_cmd_end = sp[5];
7675

7776
if (uboot_cmd_start && uboot_cmd_end)
7877
strncpy(commandp, (const char *)uboot_cmd_start, size);
78+
7979
#if defined(CONFIG_BLK_DEV_INITRD)
80+
uboot_initrd_start = sp[2];
81+
uboot_initrd_end = sp[3];
82+
8083
if (uboot_initrd_start && uboot_initrd_end &&
8184
(uboot_initrd_end > uboot_initrd_start)) {
8285
initrd_start = uboot_initrd_start;

0 commit comments

Comments
 (0)