diff options
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/cpu.c | 5 | ||||
-rw-r--r-- | arch/sparc/kernel/head_32.S | 5 | ||||
-rw-r--r-- | arch/sparc/kernel/idprom.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/irq_32.c | 5 | ||||
-rw-r--r-- | arch/sparc/kernel/setup_32.c | 5 |
6 files changed, 24 insertions, 0 deletions
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index 475ce4696ac..b0041756c9f 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile | |||
@@ -41,6 +41,8 @@ obj-y += of_device_common.o | |||
41 | obj-y += of_device_$(BITS).o | 41 | obj-y += of_device_$(BITS).o |
42 | obj-$(CONFIG_SPARC64) += prom_irqtrans.o | 42 | obj-$(CONFIG_SPARC64) += prom_irqtrans.o |
43 | 43 | ||
44 | obj-$(CONFIG_SPARC_LEON)+= leon_kernel.o | ||
45 | |||
44 | obj-$(CONFIG_SPARC64) += reboot.o | 46 | obj-$(CONFIG_SPARC64) += reboot.o |
45 | obj-$(CONFIG_SPARC64) += sysfs.o | 47 | obj-$(CONFIG_SPARC64) += sysfs.o |
46 | obj-$(CONFIG_SPARC64) += iommu.o | 48 | obj-$(CONFIG_SPARC64) += iommu.o |
diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c index d85c3dc4953..1446df90ef8 100644 --- a/arch/sparc/kernel/cpu.c +++ b/arch/sparc/kernel/cpu.c | |||
@@ -312,7 +312,12 @@ void __cpuinit cpu_probe(void) | |||
312 | 312 | ||
313 | psr = get_psr(); | 313 | psr = get_psr(); |
314 | put_psr(psr | PSR_EF); | 314 | put_psr(psr | PSR_EF); |
315 | #ifdef CONFIG_SPARC_LEON | ||
316 | fpu_vers = 7; | ||
317 | #else | ||
315 | fpu_vers = ((get_fsr() >> 17) & 0x7); | 318 | fpu_vers = ((get_fsr() >> 17) & 0x7); |
319 | #endif | ||
320 | |||
316 | put_psr(psr); | 321 | put_psr(psr); |
317 | 322 | ||
318 | set_cpu_and_fpu(psr_impl, psr_vers, fpu_vers); | 323 | set_cpu_and_fpu(psr_impl, psr_vers, fpu_vers); |
diff --git a/arch/sparc/kernel/head_32.S b/arch/sparc/kernel/head_32.S index 6b4d8acc4c8..439d82a95ac 100644 --- a/arch/sparc/kernel/head_32.S +++ b/arch/sparc/kernel/head_32.S | |||
@@ -809,6 +809,11 @@ found_version: | |||
809 | nop | 809 | nop |
810 | 810 | ||
811 | got_prop: | 811 | got_prop: |
812 | #ifdef CONFIG_SPARC_LEON | ||
813 | /* no cpu-type check is needed, it is a SPARC-LEON */ | ||
814 | ba sun4c_continue_boot | ||
815 | nop | ||
816 | #endif | ||
812 | set cputypval, %o2 | 817 | set cputypval, %o2 |
813 | ldub [%o2 + 0x4], %l1 | 818 | ldub [%o2 + 0x4], %l1 |
814 | 819 | ||
diff --git a/arch/sparc/kernel/idprom.c b/arch/sparc/kernel/idprom.c index 57922f69c3f..52a15fe2db1 100644 --- a/arch/sparc/kernel/idprom.c +++ b/arch/sparc/kernel/idprom.c | |||
@@ -31,6 +31,8 @@ static struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = { | |||
31 | { .name = "Sun 4/200 Series", .id_machtype = (SM_SUN4 | SM_4_260) }, | 31 | { .name = "Sun 4/200 Series", .id_machtype = (SM_SUN4 | SM_4_260) }, |
32 | { .name = "Sun 4/300 Series", .id_machtype = (SM_SUN4 | SM_4_330) }, | 32 | { .name = "Sun 4/300 Series", .id_machtype = (SM_SUN4 | SM_4_330) }, |
33 | { .name = "Sun 4/400 Series", .id_machtype = (SM_SUN4 | SM_4_470) }, | 33 | { .name = "Sun 4/400 Series", .id_machtype = (SM_SUN4 | SM_4_470) }, |
34 | /* Now Leon */ | ||
35 | { .name = "Leon3 System-on-a-Chip", .id_machtype = (M_LEON | M_LEON3_SOC) }, | ||
34 | /* Now, Sun4c's */ | 36 | /* Now, Sun4c's */ |
35 | { .name = "Sun4c SparcStation 1", .id_machtype = (SM_SUN4C | SM_4C_SS1) }, | 37 | { .name = "Sun4c SparcStation 1", .id_machtype = (SM_SUN4C | SM_4C_SS1) }, |
36 | { .name = "Sun4c SparcStation IPC", .id_machtype = (SM_SUN4C | SM_4C_IPC) }, | 38 | { .name = "Sun4c SparcStation IPC", .id_machtype = (SM_SUN4C | SM_4C_IPC) }, |
diff --git a/arch/sparc/kernel/irq_32.c b/arch/sparc/kernel/irq_32.c index ad800b80c71..e1af4372832 100644 --- a/arch/sparc/kernel/irq_32.c +++ b/arch/sparc/kernel/irq_32.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <asm/pcic.h> | 45 | #include <asm/pcic.h> |
46 | #include <asm/cacheflush.h> | 46 | #include <asm/cacheflush.h> |
47 | #include <asm/irq_regs.h> | 47 | #include <asm/irq_regs.h> |
48 | #include <asm/leon.h> | ||
48 | 49 | ||
49 | #include "kernel.h" | 50 | #include "kernel.h" |
50 | #include "irq.h" | 51 | #include "irq.h" |
@@ -661,6 +662,10 @@ void __init init_IRQ(void) | |||
661 | sun4d_init_IRQ(); | 662 | sun4d_init_IRQ(); |
662 | break; | 663 | break; |
663 | 664 | ||
665 | case sparc_leon: | ||
666 | leon_init_IRQ(); | ||
667 | break; | ||
668 | |||
664 | default: | 669 | default: |
665 | prom_printf("Cannot initialize IRQs on this Sun machine..."); | 670 | prom_printf("Cannot initialize IRQs on this Sun machine..."); |
666 | break; | 671 | break; |
diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c index 998cadb4e7f..16a47ffe03c 100644 --- a/arch/sparc/kernel/setup_32.c +++ b/arch/sparc/kernel/setup_32.c | |||
@@ -235,6 +235,8 @@ void __init setup_arch(char **cmdline_p) | |||
235 | sparc_cpu_model = sun4e; | 235 | sparc_cpu_model = sun4e; |
236 | if (!strcmp(&cputypval,"sun4u")) | 236 | if (!strcmp(&cputypval,"sun4u")) |
237 | sparc_cpu_model = sun4u; | 237 | sparc_cpu_model = sun4u; |
238 | if (!strncmp(&cputypval, "leon" , 4)) | ||
239 | sparc_cpu_model = sparc_leon; | ||
238 | 240 | ||
239 | printk("ARCH: "); | 241 | printk("ARCH: "); |
240 | switch(sparc_cpu_model) { | 242 | switch(sparc_cpu_model) { |
@@ -256,6 +258,9 @@ void __init setup_arch(char **cmdline_p) | |||
256 | case sun4u: | 258 | case sun4u: |
257 | printk("SUN4U\n"); | 259 | printk("SUN4U\n"); |
258 | break; | 260 | break; |
261 | case sparc_leon: | ||
262 | printk("LEON\n"); | ||
263 | break; | ||
259 | default: | 264 | default: |
260 | printk("UNKNOWN!\n"); | 265 | printk("UNKNOWN!\n"); |
261 | break; | 266 | break; |