diff options
Diffstat (limited to 'arch/m68knommu')
-rw-r--r-- | arch/m68knommu/Kconfig | 53 | ||||
-rw-r--r-- | arch/m68knommu/kernel/vmlinux.lds.S | 66 | ||||
-rw-r--r-- | arch/m68knommu/platform/68328/Makefile | 1 | ||||
-rw-r--r-- | arch/m68knommu/platform/68328/ints.c | 20 | ||||
-rw-r--r-- | arch/m68knommu/platform/68328/romvec.S | 37 | ||||
-rw-r--r-- | arch/m68knommu/platform/68360/config.c | 14 | ||||
-rw-r--r-- | arch/m68knommu/platform/68360/ints.c | 1 | ||||
-rw-r--r-- | arch/m68knommu/platform/68EZ328/config.c | 14 | ||||
-rw-r--r-- | arch/m68knommu/platform/68VZ328/config.c | 14 |
9 files changed, 120 insertions, 100 deletions
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig index 8b6e723eb82b..e767f2ddae72 100644 --- a/arch/m68knommu/Kconfig +++ b/arch/m68knommu/Kconfig | |||
@@ -540,6 +540,59 @@ config RAM32BIT | |||
540 | 540 | ||
541 | endchoice | 541 | endchoice |
542 | 542 | ||
543 | comment "ROM configuration" | ||
544 | |||
545 | config ROM | ||
546 | bool "Specify ROM linker regions" | ||
547 | default n | ||
548 | help | ||
549 | Define a ROM region for the linker script. This creates a kernel | ||
550 | that can be stored in flash, with possibly the text, and data | ||
551 | regions being copied out to RAM at startup. | ||
552 | |||
553 | config ROMBASE | ||
554 | hex "Address of the base of ROM device" | ||
555 | default "0" | ||
556 | depends on ROM | ||
557 | help | ||
558 | Define the address that the ROM region starts at. Some platforms | ||
559 | use this to set their chip select region accordingly for the boot | ||
560 | device. | ||
561 | |||
562 | config ROMVEC | ||
563 | hex "Address of the base of the ROM vectors" | ||
564 | default "0" | ||
565 | depends on ROM | ||
566 | help | ||
567 | This is almost always the same as the base of the ROM. Since on all | ||
568 | 68000 type varients the vectors are at the base of the boot device | ||
569 | on system startup. | ||
570 | |||
571 | config ROMVECSIZE | ||
572 | hex "Size of ROM vector region (in bytes)" | ||
573 | default "0x400" | ||
574 | depends on ROM | ||
575 | help | ||
576 | Define the size of the vector region in ROM. For most 68000 | ||
577 | varients this would be 0x400 bytes in size. Set to 0 if you do | ||
578 | not want a vector region at the start of the ROM. | ||
579 | |||
580 | config ROMSTART | ||
581 | hex "Address of the base of system image in ROM" | ||
582 | default "0x400" | ||
583 | depends on ROM | ||
584 | help | ||
585 | Define the start address of the system image in ROM. Commonly this | ||
586 | is strait after the ROM vectors. | ||
587 | |||
588 | config ROMSIZE | ||
589 | hex "Size of the ROM device" | ||
590 | default "0x100000" | ||
591 | depends on ROM | ||
592 | help | ||
593 | Size of the ROM device. On some platforms this is used to setup | ||
594 | the chip select that controls the boot ROM device. | ||
595 | |||
543 | choice | 596 | choice |
544 | prompt "Kernel executes from" | 597 | prompt "Kernel executes from" |
545 | ---help--- | 598 | ---help--- |
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S index 6a2f0c693254..59ced831b792 100644 --- a/arch/m68knommu/kernel/vmlinux.lds.S +++ b/arch/m68knommu/kernel/vmlinux.lds.S | |||
@@ -3,63 +3,13 @@ | |||
3 | * | 3 | * |
4 | * (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com> | 4 | * (C) Copyright 2002-2006, Greg Ungerer <gerg@snapgear.com> |
5 | * | 5 | * |
6 | * This ends up looking compilcated, because of the number of | 6 | * This linker script is equiped to build either ROM loaded or RAM |
7 | * address variations for ram and rom/flash layouts. The real | 7 | * run kernels. |
8 | * work of the linker script is all at the end, and reasonably | ||
9 | * strait forward. | ||
10 | */ | 8 | */ |
11 | 9 | ||
12 | #include <linux/config.h> | 10 | #include <linux/config.h> |
13 | #include <asm-generic/vmlinux.lds.h> | 11 | #include <asm-generic/vmlinux.lds.h> |
14 | 12 | ||
15 | /* | ||
16 | * Original Palm pilot (same for Xcopilot). | ||
17 | * There is really only a rom target for this. | ||
18 | */ | ||
19 | #ifdef CONFIG_PILOT3 | ||
20 | #define ROMVEC_START 0x10c00000 | ||
21 | #define ROMVEC_LENGTH 0x10400 | ||
22 | #define ROM_START 0x10c10400 | ||
23 | #define ROM_LENGTH 0xfec00 | ||
24 | #define ROM_END 0x10d00000 | ||
25 | #define DATA_ADDR CONFIG_KERNELBASE | ||
26 | #endif | ||
27 | |||
28 | /* | ||
29 | * Same setup on both the uCsimm and uCdimm. | ||
30 | */ | ||
31 | #if defined(CONFIG_UCSIMM) || defined(CONFIG_UCDIMM) | ||
32 | #ifdef CONFIG_RAMKERNEL | ||
33 | #define ROMVEC_START 0x10c10000 | ||
34 | #define ROMVEC_LENGTH 0x400 | ||
35 | #define ROM_START 0x10c10400 | ||
36 | #define ROM_LENGTH 0x1efc00 | ||
37 | #define ROM_END 0x10e00000 | ||
38 | #endif | ||
39 | #ifdef CONFIG_ROMKERNEL | ||
40 | #define ROMVEC_START 0x10c10000 | ||
41 | #define ROMVEC_LENGTH 0x400 | ||
42 | #define ROM_START 0x10c10400 | ||
43 | #define ROM_LENGTH 0x1efc00 | ||
44 | #define ROM_END 0x10e00000 | ||
45 | #endif | ||
46 | #ifdef CONFIG_HIMEMKERNEL | ||
47 | #define ROMVEC_START 0x00600000 | ||
48 | #define ROMVEC_LENGTH 0x400 | ||
49 | #define ROM_START 0x00600400 | ||
50 | #define ROM_LENGTH 0x1efc00 | ||
51 | #define ROM_END 0x007f0000 | ||
52 | #endif | ||
53 | #endif | ||
54 | |||
55 | #ifdef CONFIG_UCQUICC | ||
56 | #define ROMVEC_START 0x00000000 | ||
57 | #define ROMVEC_LENGTH 0x404 | ||
58 | #define ROM_START 0x00000404 | ||
59 | #define ROM_LENGTH 0x1ff6fc | ||
60 | #define ROM_END 0x00200000 | ||
61 | #endif | ||
62 | |||
63 | #if defined(CONFIG_RAMKERNEL) | 13 | #if defined(CONFIG_RAMKERNEL) |
64 | #define RAM_START CONFIG_KERNELBASE | 14 | #define RAM_START CONFIG_KERNELBASE |
65 | #define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE) | 15 | #define RAM_LENGTH (CONFIG_RAMBASE + CONFIG_RAMSIZE - CONFIG_KERNELBASE) |
@@ -71,6 +21,10 @@ | |||
71 | #if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL) | 21 | #if defined(CONFIG_ROMKERNEL) || defined(CONFIG_HIMEMKERNEL) |
72 | #define RAM_START CONFIG_RAMBASE | 22 | #define RAM_START CONFIG_RAMBASE |
73 | #define RAM_LENGTH CONFIG_RAMSIZE | 23 | #define RAM_LENGTH CONFIG_RAMSIZE |
24 | #define ROMVEC_START CONFIG_ROMVEC | ||
25 | #define ROMVEC_LENGTH CONFIG_ROMVECSIZE | ||
26 | #define ROM_START CONFIG_ROMSTART | ||
27 | #define ROM_LENGTH CONFIG_ROMSIZE | ||
74 | #define TEXT rom | 28 | #define TEXT rom |
75 | #define DATA ram | 29 | #define DATA ram |
76 | #define INIT ram | 30 | #define INIT ram |
@@ -90,7 +44,6 @@ MEMORY { | |||
90 | #ifdef ROM_START | 44 | #ifdef ROM_START |
91 | romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH | 45 | romvec : ORIGIN = ROMVEC_START, LENGTH = ROMVEC_LENGTH |
92 | rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH | 46 | rom : ORIGIN = ROM_START, LENGTH = ROM_LENGTH |
93 | erom : ORIGIN = ROM_END, LENGTH = 0 | ||
94 | #endif | 47 | #endif |
95 | } | 48 | } |
96 | 49 | ||
@@ -167,13 +120,6 @@ SECTIONS { | |||
167 | _etext = . ; | 120 | _etext = . ; |
168 | } > TEXT | 121 | } > TEXT |
169 | 122 | ||
170 | #ifdef ROM_END | ||
171 | . = ROM_END ; | ||
172 | .erom : { | ||
173 | __rom_end = . ; | ||
174 | } > erom | ||
175 | #endif | ||
176 | |||
177 | .data DATA_ADDR : { | 123 | .data DATA_ADDR : { |
178 | . = ALIGN(4); | 124 | . = ALIGN(4); |
179 | _sdata = . ; | 125 | _sdata = . ; |
diff --git a/arch/m68knommu/platform/68328/Makefile b/arch/m68knommu/platform/68328/Makefile index 1b3b719e4479..5e5435552d56 100644 --- a/arch/m68knommu/platform/68328/Makefile +++ b/arch/m68knommu/platform/68328/Makefile | |||
@@ -8,6 +8,7 @@ head-$(CONFIG_DRAGEN2) = head-de2.o | |||
8 | 8 | ||
9 | obj-y += entry.o ints.o timers.o | 9 | obj-y += entry.o ints.o timers.o |
10 | obj-$(CONFIG_M68328) += config.o | 10 | obj-$(CONFIG_M68328) += config.o |
11 | obj-$(CONFIG_ROM) += romvec.o | ||
11 | 12 | ||
12 | extra-y := head.o | 13 | extra-y := head.o |
13 | extra-$(CONFIG_M68328) += bootlogo.rh head.o | 14 | extra-$(CONFIG_M68328) += bootlogo.rh head.o |
diff --git a/arch/m68knommu/platform/68328/ints.c b/arch/m68knommu/platform/68328/ints.c index 7437217813d2..2dda7339aae5 100644 --- a/arch/m68knommu/platform/68328/ints.c +++ b/arch/m68knommu/platform/68328/ints.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <asm/system.h> | 19 | #include <asm/system.h> |
20 | #include <asm/irq.h> | 20 | #include <asm/irq.h> |
21 | #include <asm/irqnode.h> | ||
21 | #include <asm/traps.h> | 22 | #include <asm/traps.h> |
22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
23 | #include <asm/machdep.h> | 24 | #include <asm/machdep.h> |
@@ -82,25 +83,6 @@ unsigned int local_irq_count[NR_CPUS]; | |||
82 | /* irq node variables for the 32 (potential) on chip sources */ | 83 | /* irq node variables for the 32 (potential) on chip sources */ |
83 | static irq_node_t int_irq_list[NR_IRQS]; | 84 | static irq_node_t int_irq_list[NR_IRQS]; |
84 | 85 | ||
85 | #if !defined(CONFIG_DRAGEN2) | ||
86 | asm (".global _start, __ramend/n/t" | ||
87 | ".section .romvec/n" | ||
88 | "e_vectors:\n\t" | ||
89 | ".long __ramend-4, _start, buserr, trap, trap, trap, trap, trap\n\t" | ||
90 | ".long trap, trap, trap, trap, trap, trap, trap, trap\n\t" | ||
91 | ".long trap, trap, trap, trap, trap, trap, trap, trap\n\t" | ||
92 | ".long trap, trap, trap, trap\n\t" | ||
93 | ".long trap, trap, trap, trap\n\t" | ||
94 | /*.long inthandler, inthandler, inthandler, inthandler | ||
95 | .long inthandler4, inthandler, inthandler, inthandler */ | ||
96 | /* TRAP #0-15 */ | ||
97 | ".long system_call, trap, trap, trap, trap, trap, trap, trap\n\t" | ||
98 | ".long trap, trap, trap, trap, trap, trap, trap, trap\n\t" | ||
99 | ".long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n\t" | ||
100 | ".text\n" | ||
101 | "ignore: rte"); | ||
102 | #endif | ||
103 | |||
104 | /* | 86 | /* |
105 | * This function should be called during kernel startup to initialize | 87 | * This function should be called during kernel startup to initialize |
106 | * the IRQ handling routines. | 88 | * the IRQ handling routines. |
diff --git a/arch/m68knommu/platform/68328/romvec.S b/arch/m68knommu/platform/68328/romvec.S new file mode 100644 index 000000000000..3e7fe1e14913 --- /dev/null +++ b/arch/m68knommu/platform/68328/romvec.S | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * linux/arch/m68knommu/platform/68328/romvec.S | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file COPYING in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright 1996 Roman Zippel | ||
9 | * Copyright 1999 D. Jeff Dionne <jeff@rt-control.com> | ||
10 | * Copyright 2006 Greg Ungerer <gerg@snapgear.com> | ||
11 | */ | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | |||
15 | .global _start | ||
16 | .global _buserr | ||
17 | .global trap | ||
18 | .global system_call | ||
19 | |||
20 | .section .romvec | ||
21 | |||
22 | e_vectors: | ||
23 | .long CONFIG_RAMBASE+CONFIG_RAMSIZE-4, _start, buserr, trap | ||
24 | .long trap, trap, trap, trap | ||
25 | .long trap, trap, trap, trap | ||
26 | .long trap, trap, trap, trap | ||
27 | .long trap, trap, trap, trap | ||
28 | .long trap, trap, trap, trap | ||
29 | .long trap, trap, trap, trap | ||
30 | .long trap, trap, trap, trap | ||
31 | /* TRAP #0-15 */ | ||
32 | .long system_call, trap, trap, trap | ||
33 | .long trap, trap, trap, trap | ||
34 | .long trap, trap, trap, trap | ||
35 | .long trap, trap, trap, trap | ||
36 | .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | ||
37 | |||
diff --git a/arch/m68knommu/platform/68360/config.c b/arch/m68knommu/platform/68360/config.c index 3db244625f0f..69c670dfd62b 100644 --- a/arch/m68knommu/platform/68360/config.c +++ b/arch/m68knommu/platform/68360/config.c | |||
@@ -141,13 +141,13 @@ int BSP_set_clock_mmss (unsigned long nowtime) | |||
141 | void BSP_reset (void) | 141 | void BSP_reset (void) |
142 | { | 142 | { |
143 | local_irq_disable(); | 143 | local_irq_disable(); |
144 | asm volatile (" | 144 | asm volatile ( |
145 | moveal #_start, %a0; | 145 | "moveal #_start, %a0;\n" |
146 | moveb #0, 0xFFFFF300; | 146 | "moveb #0, 0xFFFFF300;\n" |
147 | moveal 0(%a0), %sp; | 147 | "moveal 0(%a0), %sp;\n" |
148 | moveal 4(%a0), %a0; | 148 | "moveal 4(%a0), %a0;\n" |
149 | jmp (%a0); | 149 | "jmp (%a0);\n" |
150 | "); | 150 | ); |
151 | } | 151 | } |
152 | 152 | ||
153 | unsigned char *scc1_hwaddr; | 153 | unsigned char *scc1_hwaddr; |
diff --git a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c index ba184db1651b..0245fc4a4781 100644 --- a/arch/m68knommu/platform/68360/ints.c +++ b/arch/m68knommu/platform/68360/ints.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <asm/system.h> | 21 | #include <asm/system.h> |
22 | #include <asm/irq.h> | 22 | #include <asm/irq.h> |
23 | #include <asm/irqnode.h> | ||
23 | #include <asm/traps.h> | 24 | #include <asm/traps.h> |
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
25 | #include <asm/machdep.h> | 26 | #include <asm/machdep.h> |
diff --git a/arch/m68knommu/platform/68EZ328/config.c b/arch/m68knommu/platform/68EZ328/config.c index d8d56e5de310..15a14a67c2bf 100644 --- a/arch/m68knommu/platform/68EZ328/config.c +++ b/arch/m68knommu/platform/68EZ328/config.c | |||
@@ -42,13 +42,13 @@ void m68328_timer_gettod(int *year, int *mon, int *day, int *hour, int *min, int | |||
42 | void m68ez328_reset(void) | 42 | void m68ez328_reset(void) |
43 | { | 43 | { |
44 | local_irq_disable(); | 44 | local_irq_disable(); |
45 | asm volatile (" | 45 | asm volatile ( |
46 | moveal #0x10c00000, %a0; | 46 | "moveal #0x10c00000, %a0;\n" |
47 | moveb #0, 0xFFFFF300; | 47 | "moveb #0, 0xFFFFF300;\n" |
48 | moveal 0(%a0), %sp; | 48 | "moveal 0(%a0), %sp;\n" |
49 | moveal 4(%a0), %a0; | 49 | "moveal 4(%a0), %a0;\n" |
50 | jmp (%a0); | 50 | "jmp (%a0);\n" |
51 | "); | 51 | ); |
52 | } | 52 | } |
53 | 53 | ||
54 | /***************************************************************************/ | 54 | /***************************************************************************/ |
diff --git a/arch/m68knommu/platform/68VZ328/config.c b/arch/m68knommu/platform/68VZ328/config.c index d926524cdf82..4058de5c8fa2 100644 --- a/arch/m68knommu/platform/68VZ328/config.c +++ b/arch/m68knommu/platform/68VZ328/config.c | |||
@@ -141,13 +141,13 @@ static void init_hardware(char *command, int size) | |||
141 | static void m68vz328_reset(void) | 141 | static void m68vz328_reset(void) |
142 | { | 142 | { |
143 | local_irq_disable(); | 143 | local_irq_disable(); |
144 | asm volatile (" | 144 | asm volatile ( |
145 | moveal #0x10c00000, %a0; | 145 | "moveal #0x10c00000, %a0;\n\t" |
146 | moveb #0, 0xFFFFF300; | 146 | "moveb #0, 0xFFFFF300;\n\t" |
147 | moveal 0(%a0), %sp; | 147 | "moveal 0(%a0), %sp;\n\t" |
148 | moveal 4(%a0), %a0; | 148 | "moveal 4(%a0), %a0;\n\t" |
149 | jmp (%a0); | 149 | "jmp (%a0);\n" |
150 | "); | 150 | ); |
151 | } | 151 | } |
152 | 152 | ||
153 | unsigned char *cs8900a_hwaddr; | 153 | unsigned char *cs8900a_hwaddr; |