Skip to content

Commit b57cb72

Browse files
committed
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Pull m68knommu arch updates from Greg Ungerer: "Includes a cleanup of the non-MMU linker script (it now almost exclusively uses the well defined linker script support macros and definitions). Some more merging of MMU and non-MMU common files (specifically the arch process.c, ptrace and time.c). And a big cleanup of the massively duplicated ColdFire device definition code. Overall we remove about 2000 lines of code, and end up with a single set of platform device definitions for the serial ports, ethernet ports and QSPI ports common in most ColdFire SoCs. I expect you will get a merge conflict on arch/m68k/kernel/process.c, in cpu_idle(). It should be relatively strait forward to fixup." And cpu_idle() conflict resolution was indeed trivial (merging the nommu/mmu versions of process.c trivially conflicting with the conversion to use the schedule_preempt_disabled() helper function) * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (57 commits) m68knommu: factor more common ColdFire cpu reset code m68knommu: make 528x CPU reset register addressing consistent m68knommu: make 527x CPU reset register addressing consistent m68knommu: make 523x CPU reset register addressing consistent m68knommu: factor some common ColdFire cpu reset code m68knommu: move old ColdFire timers init from CPU init to timers code m68knommu: clean up init code in ColdFire 532x startup m68knommu: clean up init code in ColdFire 528x startup m68knommu: clean up init code in ColdFire 523x startup m68knommu: merge common ColdFire QSPI platform setup code m68knommu: make 532x QSPI platform addressing consistent m68knommu: make 528x QSPI platform addressing consistent m68knommu: make 527x QSPI platform addressing consistent m68knommu: make 5249 QSPI platform addressing consistent m68knommu: make 523x QSPI platform addressing consistent m68knommu: make 520x QSPI platform addressing consistent m68knommu: merge common ColdFire FEC platform setup code m68knommu: make 532x FEC platform addressing consistent m68knommu: make 528x FEC platform addressing consistent m68knommu: make 527x FEC platform addressing consistent ...
2 parents ad12ab2 + ae909ea commit b57cb72

52 files changed

Lines changed: 1591 additions & 3637 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/m68k/Kconfig‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ config M68K
77
select GENERIC_IRQ_SHOW
88
select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
99
select GENERIC_CPU_DEVICES
10+
select FPU if MMU
1011

1112
config RWSEM_GENERIC_SPINLOCK
1213
bool
@@ -24,9 +25,6 @@ config ARCH_HAS_ILOG2_U64
2425
config GENERIC_CLOCKEVENTS
2526
bool
2627

27-
config GENERIC_CMOS_UPDATE
28-
def_bool !MMU
29-
3028
config GENERIC_GPIO
3129
bool
3230

@@ -67,6 +65,9 @@ config CPU_HAS_NO_MULDIV64
6765
config CPU_HAS_ADDRESS_SPACES
6866
bool
6967

68+
config FPU
69+
bool
70+
7071
config HZ
7172
int
7273
default 1000 if CLEOPATRA

‎arch/m68k/include/asm/m5206sim.h‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,20 @@
100100
#define MCFDMA_BASE1 (MCF_MBAR + 0x240) /* Base address DMA 1 */
101101

102102
#if defined(CONFIG_NETtel)
103-
#define MCFUART_BASE1 0x180 /* Base address of UART1 */
104-
#define MCFUART_BASE2 0x140 /* Base address of UART2 */
103+
#define MCFUART_BASE0 (MCF_MBAR + 0x180) /* Base address UART0 */
104+
#define MCFUART_BASE1 (MCF_MBAR + 0x140) /* Base address UART1 */
105105
#else
106-
#define MCFUART_BASE1 0x140 /* Base address of UART1 */
107-
#define MCFUART_BASE2 0x180 /* Base address of UART2 */
106+
#define MCFUART_BASE0 (MCF_MBAR + 0x140) /* Base address UART0 */
107+
#define MCFUART_BASE1 (MCF_MBAR + 0x180) /* Base address UART1 */
108108
#endif
109109

110110
/*
111111
* Define system peripheral IRQ usage.
112112
*/
113113
#define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */
114114
#define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */
115+
#define MCF_IRQ_UART0 73 /* UART0 */
116+
#define MCF_IRQ_UART1 74 /* UART1 */
115117

116118
/*
117119
* Generic GPIO

‎arch/m68k/include/asm/m520xsim.h‎

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,21 @@
4848
#define MCFINT_UART1 27 /* Interrupt number for UART1 */
4949
#define MCFINT_UART2 28 /* Interrupt number for UART2 */
5050
#define MCFINT_QSPI 31 /* Interrupt number for QSPI */
51+
#define MCFINT_FECRX0 36 /* Interrupt number for FEC RX */
52+
#define MCFINT_FECTX0 40 /* Interrupt number for FEC RX */
53+
#define MCFINT_FECENTC0 42 /* Interrupt number for FEC RX */
5154
#define MCFINT_PIT1 4 /* Interrupt number for PIT1 (PIT0 in processor) */
5255

56+
#define MCF_IRQ_UART0 (MCFINT_VECBASE + MCFINT_UART0)
57+
#define MCF_IRQ_UART1 (MCFINT_VECBASE + MCFINT_UART1)
58+
#define MCF_IRQ_UART2 (MCFINT_VECBASE + MCFINT_UART2)
59+
60+
#define MCF_IRQ_FECRX0 (MCFINT_VECBASE + MCFINT_FECRX0)
61+
#define MCF_IRQ_FECTX0 (MCFINT_VECBASE + MCFINT_FECTX0)
62+
#define MCF_IRQ_FECENTC0 (MCFINT_VECBASE + MCFINT_FECENTC0)
63+
64+
#define MCF_IRQ_QSPI (MCFINT_VECBASE + MCFINT_QSPI)
65+
5366
/*
5467
* SDRAM configuration registers.
5568
*/
@@ -144,15 +157,25 @@
144157
/*
145158
* UART module.
146159
*/
147-
#define MCFUART_BASE1 0xFC060000 /* Base address of UART1 */
148-
#define MCFUART_BASE2 0xFC064000 /* Base address of UART2 */
149-
#define MCFUART_BASE3 0xFC068000 /* Base address of UART2 */
160+
#define MCFUART_BASE0 0xFC060000 /* Base address of UART0 */
161+
#define MCFUART_BASE1 0xFC064000 /* Base address of UART1 */
162+
#define MCFUART_BASE2 0xFC068000 /* Base address of UART2 */
150163

151164
/*
152165
* FEC module.
153166
*/
154-
#define MCFFEC_BASE 0xFC030000 /* Base of FEC ethernet */
155-
#define MCFFEC_SIZE 0x800 /* Register set size */
167+
#define MCFFEC_BASE0 0xFC030000 /* Base of FEC ethernet */
168+
#define MCFFEC_SIZE0 0x800 /* Register set size */
169+
170+
/*
171+
* QSPI module.
172+
*/
173+
#define MCFQSPI_BASE 0xFC05C000 /* Base of QSPI module */
174+
#define MCFQSPI_SIZE 0x40 /* Register set size */
175+
176+
#define MCFQSPI_CS0 46
177+
#define MCFQSPI_CS1 47
178+
#define MCFQSPI_CS2 27
156179

157180
/*
158181
* Reset Control Unit.

‎arch/m68k/include/asm/m523xsim.h‎

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,23 @@
3535

3636
#define MCFINT_VECBASE 64 /* Vector base number */
3737
#define MCFINT_UART0 13 /* Interrupt number for UART0 */
38-
#define MCFINT_PIT1 36 /* Interrupt number for PIT1 */
38+
#define MCFINT_UART1 14 /* Interrupt number for UART1 */
39+
#define MCFINT_UART2 15 /* Interrupt number for UART2 */
3940
#define MCFINT_QSPI 18 /* Interrupt number for QSPI */
41+
#define MCFINT_FECRX0 23 /* Interrupt number for FEC */
42+
#define MCFINT_FECTX0 27 /* Interrupt number for FEC */
43+
#define MCFINT_FECENTC0 29 /* Interrupt number for FEC */
44+
#define MCFINT_PIT1 36 /* Interrupt number for PIT1 */
45+
46+
#define MCF_IRQ_UART0 (MCFINT_VECBASE + MCFINT_UART0)
47+
#define MCF_IRQ_UART1 (MCFINT_VECBASE + MCFINT_UART1)
48+
#define MCF_IRQ_UART2 (MCFINT_VECBASE + MCFINT_UART2)
49+
50+
#define MCF_IRQ_FECRX0 (MCFINT_VECBASE + MCFINT_FECRX0)
51+
#define MCF_IRQ_FECTX0 (MCFINT_VECBASE + MCFINT_FECTX0)
52+
#define MCF_IRQ_FECENTC0 (MCFINT_VECBASE + MCFINT_FECENTC0)
53+
54+
#define MCF_IRQ_QSPI (MCFINT_VECBASE + MCFINT_QSPI)
4055

4156
/*
4257
* SDRAM configuration registers.
@@ -50,24 +65,35 @@
5065
/*
5166
* Reset Control Unit (relative to IPSBAR).
5267
*/
53-
#define MCF_RCR 0x110000
54-
#define MCF_RSR 0x110001
68+
#define MCF_RCR (MCF_IPSBAR + 0x110000)
69+
#define MCF_RSR (MCF_IPSBAR + 0x110001)
5570

5671
#define MCF_RCR_SWRESET 0x80 /* Software reset bit */
5772
#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */
5873

5974
/*
6075
* UART module.
6176
*/
62-
#define MCFUART_BASE1 (MCF_IPSBAR + 0x200)
63-
#define MCFUART_BASE2 (MCF_IPSBAR + 0x240)
64-
#define MCFUART_BASE3 (MCF_IPSBAR + 0x280)
77+
#define MCFUART_BASE0 (MCF_IPSBAR + 0x200)
78+
#define MCFUART_BASE1 (MCF_IPSBAR + 0x240)
79+
#define MCFUART_BASE2 (MCF_IPSBAR + 0x280)
6580

6681
/*
6782
* FEC ethernet module.
6883
*/
69-
#define MCFFEC_BASE (MCF_IPSBAR + 0x1000)
70-
#define MCFFEC_SIZE 0x800
84+
#define MCFFEC_BASE0 (MCF_IPSBAR + 0x1000)
85+
#define MCFFEC_SIZE0 0x800
86+
87+
/*
88+
* QSPI module.
89+
*/
90+
#define MCFQSPI_BASE (MCF_IPSBAR + 0x340)
91+
#define MCFQSPI_SIZE 0x40
92+
93+
#define MCFQSPI_CS0 91
94+
#define MCFQSPI_CS1 92
95+
#define MCFQSPI_CS2 103
96+
#define MCFQSPI_CS3 99
7197

7298
/*
7399
* GPIO module.

‎arch/m68k/include/asm/m5249sim.h‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,19 @@
7676
/*
7777
* UART module.
7878
*/
79-
#define MCFUART_BASE1 0x1c0 /* Base address of UART1 */
80-
#define MCFUART_BASE2 0x200 /* Base address of UART2 */
79+
#define MCFUART_BASE0 (MCF_MBAR + 0x1c0) /* Base address UART0 */
80+
#define MCFUART_BASE1 (MCF_MBAR + 0x200) /* Base address UART1 */
81+
82+
/*
83+
* QSPI module.
84+
*/
85+
#define MCFQSPI_BASE (MCF_MBAR + 0x300) /* Base address QSPI */
86+
#define MCFQSPI_SIZE 0x40 /* Register set size */
87+
88+
#define MCFQSPI_CS0 29
89+
#define MCFQSPI_CS1 24
90+
#define MCFQSPI_CS2 21
91+
#define MCFQSPI_CS3 22
8192

8293
/*
8394
* DMA unit base addresses.
@@ -108,6 +119,9 @@
108119
#define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */
109120
#define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */
110121

122+
#define MCF_IRQ_UART0 73 /* UART0 */
123+
#define MCF_IRQ_UART1 74 /* UART1 */
124+
111125
/*
112126
* General purpose IO registers (in MBAR2).
113127
*/

‎arch/m68k/include/asm/m5272sim.h‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
#define MCFSIM_DCMR1 0x5c /* DRAM 1 Mask reg (r/w) */
6969
#define MCFSIM_DCCR1 0x63 /* DRAM 1 Control reg (r/w) */
7070

71-
#define MCFUART_BASE1 0x100 /* Base address of UART1 */
72-
#define MCFUART_BASE2 0x140 /* Base address of UART2 */
71+
#define MCFUART_BASE0 (MCF_MBAR + 0x100) /* Base address UART0 */
72+
#define MCFUART_BASE1 (MCF_MBAR + 0x140) /* Base address UART1 */
7373

7474
#define MCFSIM_PACNT (MCF_MBAR + 0x80) /* Port A Control (r/w) */
7575
#define MCFSIM_PADDR (MCF_MBAR + 0x84) /* Port A Direction (r/w) */
@@ -88,6 +88,9 @@
8888
#define MCFTIMER_BASE3 (MCF_MBAR + 0x240) /* Base address TIMER4 */
8989
#define MCFTIMER_BASE4 (MCF_MBAR + 0x260) /* Base address TIMER3 */
9090

91+
#define MCFFEC_BASE0 (MCF_MBAR + 0x840) /* Base FEC ethernet */
92+
#define MCFFEC_SIZE0 0x1d0
93+
9194
/*
9295
* Define system peripheral IRQ usage.
9396
*/
@@ -101,8 +104,8 @@
101104
#define MCF_IRQ_TIMER2 70 /* Timer 2 */
102105
#define MCF_IRQ_TIMER3 71 /* Timer 3 */
103106
#define MCF_IRQ_TIMER4 72 /* Timer 4 */
104-
#define MCF_IRQ_UART1 73 /* UART 1 */
105-
#define MCF_IRQ_UART2 74 /* UART 2 */
107+
#define MCF_IRQ_UART0 73 /* UART 0 */
108+
#define MCF_IRQ_UART1 74 /* UART 1 */
106109
#define MCF_IRQ_PLIP 75 /* PLIC 2Khz Periodic */
107110
#define MCF_IRQ_PLIA 76 /* PLIC Asynchronous */
108111
#define MCF_IRQ_USB0 77 /* USB Endpoint 0 */
@@ -114,9 +117,9 @@
114117
#define MCF_IRQ_USB6 83 /* USB Endpoint 6 */
115118
#define MCF_IRQ_USB7 84 /* USB Endpoint 7 */
116119
#define MCF_IRQ_DMA 85 /* DMA Controller */
117-
#define MCF_IRQ_ERX 86 /* Ethernet Receiver */
118-
#define MCF_IRQ_ETX 87 /* Ethernet Transmitter */
119-
#define MCF_IRQ_ENTC 88 /* Ethernet Non-Time Critical */
120+
#define MCF_IRQ_FECRX0 86 /* Ethernet Receiver */
121+
#define MCF_IRQ_FECTX0 87 /* Ethernet Transmitter */
122+
#define MCF_IRQ_FECENTC0 88 /* Ethernet Non-Time Critical */
120123
#define MCF_IRQ_QSPI 89 /* Queued Serial Interface */
121124
#define MCF_IRQ_EINT5 90 /* External Interrupt 5 */
122125
#define MCF_IRQ_EINT6 91 /* External Interrupt 6 */

‎arch/m68k/include/asm/m527xsim.h‎

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,29 @@
3838
#define MCFINT_UART1 14 /* Interrupt number for UART1 */
3939
#define MCFINT_UART2 15 /* Interrupt number for UART2 */
4040
#define MCFINT_QSPI 18 /* Interrupt number for QSPI */
41+
#define MCFINT_FECRX0 23 /* Interrupt number for FEC0 */
42+
#define MCFINT_FECTX0 27 /* Interrupt number for FEC0 */
43+
#define MCFINT_FECENTC0 29 /* Interrupt number for FEC0 */
4144
#define MCFINT_PIT1 36 /* Interrupt number for PIT1 */
4245

46+
#define MCFINT2_VECBASE 128 /* Vector base number 2 */
47+
#define MCFINT2_FECRX1 23 /* Interrupt number for FEC1 */
48+
#define MCFINT2_FECTX1 27 /* Interrupt number for FEC1 */
49+
#define MCFINT2_FECENTC1 29 /* Interrupt number for FEC1 */
50+
51+
#define MCF_IRQ_UART0 (MCFINT_VECBASE + MCFINT_UART0)
52+
#define MCF_IRQ_UART1 (MCFINT_VECBASE + MCFINT_UART1)
53+
#define MCF_IRQ_UART2 (MCFINT_VECBASE + MCFINT_UART2)
54+
55+
#define MCF_IRQ_FECRX0 (MCFINT_VECBASE + MCFINT_FECRX0)
56+
#define MCF_IRQ_FECTX0 (MCFINT_VECBASE + MCFINT_FECTX0)
57+
#define MCF_IRQ_FECENTC0 (MCFINT_VECBASE + MCFINT_FECENTC0)
58+
#define MCF_IRQ_FECRX1 (MCFINT2_VECBASE + MCFINT2_FECRX1)
59+
#define MCF_IRQ_FECTX1 (MCFINT2_VECBASE + MCFINT2_FECTX1)
60+
#define MCF_IRQ_FECENTC1 (MCFINT2_VECBASE + MCFINT2_FECENTC1)
61+
62+
#define MCF_IRQ_QSPI (MCFINT_VECBASE + MCFINT_QSPI)
63+
4364
/*
4465
* SDRAM configuration registers.
4566
*/
@@ -72,9 +93,9 @@
7293
/*
7394
* UART module.
7495
*/
75-
#define MCFUART_BASE1 (MCF_IPSBAR + 0x200)
76-
#define MCFUART_BASE2 (MCF_IPSBAR + 0x240)
77-
#define MCFUART_BASE3 (MCF_IPSBAR + 0x280)
96+
#define MCFUART_BASE0 (MCF_IPSBAR + 0x200)
97+
#define MCFUART_BASE1 (MCF_IPSBAR + 0x240)
98+
#define MCFUART_BASE2 (MCF_IPSBAR + 0x280)
7899

79100
/*
80101
* FEC ethernet module.
@@ -84,6 +105,28 @@
84105
#define MCFFEC_BASE1 (MCF_IPSBAR + 0x1800)
85106
#define MCFFEC_SIZE1 0x800
86107

108+
/*
109+
* QSPI module.
110+
*/
111+
#define MCFQSPI_BASE (MCF_IPSBAR + 0x340)
112+
#define MCFQSPI_SIZE 0x40
113+
114+
#ifdef CONFIG_M5271
115+
#define MCFQSPI_CS0 91
116+
#define MCFQSPI_CS1 92
117+
#define MCFQSPI_CS2 99
118+
#define MCFQSPI_CS3 103
119+
#endif
120+
#ifdef CONFIG_M5275
121+
#define MCFQSPI_CS0 59
122+
#define MCFQSPI_CS1 60
123+
#define MCFQSPI_CS2 61
124+
#define MCFQSPI_CS3 62
125+
#endif
126+
127+
/*
128+
* GPIO module.
129+
*/
87130
#ifdef CONFIG_M5271
88131
#define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000)
89132
#define MCFGPIO_PODR_DATAH (MCF_IPSBAR + 0x100001)
@@ -285,8 +328,8 @@
285328
/*
286329
* Reset Control Unit (relative to IPSBAR).
287330
*/
288-
#define MCF_RCR 0x110000
289-
#define MCF_RSR 0x110001
331+
#define MCF_RCR (MCF_IPSBAR + 0x110000)
332+
#define MCF_RSR (MCF_IPSBAR + 0x110001)
290333

291334
#define MCF_RCR_SWRESET 0x80 /* Software reset bit */
292335
#define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */

0 commit comments

Comments
 (0)