Skip to content

Commit 8552d28

Browse files
committed
Merge tag 'm68knommu-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Pull m68knommu updates from Greg Ungerer: - cleanup of 68328 code - align BSS section to 32bit * tag 'm68knommu-for-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: m68328: remove duplicate code m68k: m68328: move platform code to separate files m68knommu: align BSS section to 4-byte boundaries
2 parents 70990af + 8b22820 commit 8552d28

File tree

11 files changed

+192
-293
lines changed

11 files changed

+192
-293
lines changed

arch/m68k/68000/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010

1111
# 68328, 68EZ328, 68VZ328
1212

13-
obj-y += entry.o ints.o timers.o
14-
obj-$(CONFIG_M68328) += m68328.o
15-
obj-$(CONFIG_M68EZ328) += m68EZ328.o
16-
obj-$(CONFIG_M68VZ328) += m68VZ328.o
13+
obj-y += entry.o ints.o timers.o m68328.o
1714
obj-$(CONFIG_ROM) += romvec.o
1815

16+
obj-$(CONFIG_DRAGEN2) += dragen2.o
17+
obj-$(CONFIG_UCSIMM) += ucsimm.o
18+
obj-$(CONFIG_UCDIMM) += ucsimm.o
19+
1920
extra-y := head.o

arch/m68k/68000/dragen2.c

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Copyright (C) 1993 Hamish Macdonald
4+
* Copyright (C) 1999 D. Jeff Dionne
5+
* Copyright (C) 2001 Georges Menie, Ken Desmet
6+
*
7+
* This file is subject to the terms and conditions of the GNU General Public
8+
* License. See the file COPYING in the main directory of this archive
9+
* for more details.
10+
*/
11+
#include <linux/init.h>
12+
#include <asm/machdep.h>
13+
#include <asm/MC68VZ328.h>
14+
15+
/***************************************************************************/
16+
/* Init Drangon Engine hardware */
17+
/***************************************************************************/
18+
19+
static void dragen2_reset(void)
20+
{
21+
local_irq_disable();
22+
23+
#ifdef CONFIG_INIT_LCD
24+
PBDATA |= 0x20; /* disable CCFL light */
25+
PKDATA |= 0x4; /* disable LCD controller */
26+
LCKCON = 0;
27+
#endif
28+
29+
__asm__ __volatile__(
30+
"reset\n\t"
31+
"moveal #0x04000000, %a0\n\t"
32+
"moveal 0(%a0), %sp\n\t"
33+
"moveal 4(%a0), %a0\n\t"
34+
"jmp (%a0)"
35+
);
36+
}
37+
38+
void __init init_dragen2(char *command, int size)
39+
{
40+
mach_reset = dragen2_reset;
41+
42+
#ifdef CONFIG_DIRECT_IO_ACCESS
43+
SCR = 0x10; /* allow user access to internal registers */
44+
#endif
45+
46+
/* CSGB Init */
47+
CSGBB = 0x4000;
48+
CSB = 0x1a1;
49+
50+
/* CS8900 init */
51+
/* PK3: hardware sleep function pin, active low */
52+
PKSEL |= PK(3); /* select pin as I/O */
53+
PKDIR |= PK(3); /* select pin as output */
54+
PKDATA |= PK(3); /* set pin high */
55+
56+
/* PF5: hardware reset function pin, active high */
57+
PFSEL |= PF(5); /* select pin as I/O */
58+
PFDIR |= PF(5); /* select pin as output */
59+
PFDATA &= ~PF(5); /* set pin low */
60+
61+
/* cs8900 hardware reset */
62+
PFDATA |= PF(5);
63+
{ int i; for (i = 0; i < 32000; ++i); }
64+
PFDATA &= ~PF(5);
65+
66+
/* INT1 enable (cs8900 IRQ) */
67+
PDPOL &= ~PD(1); /* active high signal */
68+
PDIQEG &= ~PD(1);
69+
PDIRQEN |= PD(1); /* IRQ enabled */
70+
71+
#ifdef CONFIG_INIT_LCD
72+
/* initialize LCD controller */
73+
LSSA = (long) screen_bits;
74+
LVPW = 0x14;
75+
LXMAX = 0x140;
76+
LYMAX = 0xef;
77+
LRRA = 0;
78+
LPXCD = 3;
79+
LPICF = 0x08;
80+
LPOLCF = 0;
81+
LCKCON = 0x80;
82+
PCPDEN = 0xff;
83+
PCSEL = 0;
84+
85+
/* Enable LCD controller */
86+
PKDIR |= 0x4;
87+
PKSEL |= 0x4;
88+
PKDATA &= ~0x4;
89+
90+
/* Enable CCFL backlighting circuit */
91+
PBDIR |= 0x20;
92+
PBSEL |= 0x20;
93+
PBDATA &= ~0x20;
94+
95+
/* contrast control register */
96+
PFDIR |= 0x1;
97+
PFSEL &= ~0x1;
98+
PWMR = 0x037F;
99+
#endif
100+
}

arch/m68k/68000/m68328.c

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/***************************************************************************/
22

33
/*
4-
* m68328.c - 68328 specific config
4+
* m68328.c - 68328/68EZ328/68VZ328 specific config
55
*
66
* Copyright (C) 1993 Hamish Macdonald
77
* Copyright (C) 1999 D. Jeff Dionne
8+
* Copyright (C) 2001 Georges Menie, Ken Desmet
89
*
910
* This file is subject to the terms and conditions of the GNU General Public
1011
* License. See the file COPYING in the main directory of this archive
@@ -20,18 +21,18 @@
2021
#include <linux/kernel.h>
2122
#include <linux/rtc.h>
2223
#include <asm/machdep.h>
23-
#include <asm/MC68328.h>
24-
#if defined(CONFIG_PILOT) || defined(CONFIG_INIT_LCD)
24+
25+
#if defined(CONFIG_INIT_LCD) && defined(CONFIG_M68VZ328)
26+
#include "bootlogo-vz.h"
27+
#elif defined(CONFIG_PILOT) || defined(CONFIG_INIT_LCD)
2528
#include "bootlogo.h"
2629
#endif
2730

28-
/***************************************************************************/
29-
30-
int m68328_hwclk(int set, struct rtc_time *t);
31+
#include "m68328.h"
3132

3233
/***************************************************************************/
3334

34-
void m68328_reset (void)
35+
static void m68328_reset(void)
3536
{
3637
local_irq_disable();
3738
asm volatile ("moveal #0x10c00000, %a0;\n\t"
@@ -45,12 +46,19 @@ void m68328_reset (void)
4546

4647
void __init config_BSP(char *command, int len)
4748
{
48-
pr_info("68328 support D. Jeff Dionne <jeff@uclinux.org>\n");
49-
pr_info("68328 support Kenneth Albanowski <kjahds@kjshds.com>\n");
50-
pr_info("68328/Pilot support Bernhard Kuhn <kuhn@lpr.e-technik.tu-muenchen.de>\n");
49+
mach_sched_init = hw_timer_init;
50+
mach_hwclk = m68328_hwclk;
51+
mach_reset = m68328_reset;
5152

52-
mach_hwclk = m68328_hwclk;
53-
mach_reset = m68328_reset;
53+
#if defined(CONFIG_PILOT) && defined(CONFIG_M68328)
54+
mach_sched_init = NULL;
55+
#elif defined(CONFIG_UCSIMM)
56+
init_ucsimm(command, len);
57+
#elif defined(CONFIG_UCDIMM)
58+
init_ucsimm(command, len);
59+
#elif defined(CONFIG_DRAGEN2)
60+
init_dragen2(command, len);
61+
#endif
5462
}
5563

5664
/***************************************************************************/

arch/m68k/68000/m68328.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
void init_dragen2(char *command, int size);
3+
void init_ucsimm(char *command, int size);
4+
struct rtc_time;
5+
int m68328_hwclk(int set, struct rtc_time *t);

arch/m68k/68000/m68EZ328.c

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)