]> git.ipfire.org Git - thirdparty/kernel/linux.git/blame - arch/cris/arch-v10/kernel/setup.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[thirdparty/kernel/linux.git] / arch / cris / arch-v10 / kernel / setup.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
1da177e4
LT
2/*
3 *
4 * linux/arch/cris/arch-v10/kernel/setup.c
5 *
6 * Copyright (C) 1995 Linus Torvalds
7 * Copyright (c) 2001-2002 Axis Communications AB
8 */
9
10/*
11 * This file handles the architecture-dependent parts of initialization
12 */
13
1da177e4
LT
14#include <linux/seq_file.h>
15#include <linux/proc_fs.h>
16#include <linux/delay.h>
a8e2a8b2 17#include <linux/param.h>
b1a154db 18#include <arch/system.h>
1da177e4
LT
19
20#ifdef CONFIG_PROC_FS
21#define HAS_FPU 0x0001
22#define HAS_MMU 0x0002
23#define HAS_ETHERNET100 0x0004
24#define HAS_TOKENRING 0x0008
25#define HAS_SCSI 0x0010
26#define HAS_ATA 0x0020
27#define HAS_USB 0x0040
28#define HAS_IRQ_BUG 0x0080
29#define HAS_MMU_BUG 0x0100
30
31static struct cpu_info {
32 char *model;
33 unsigned short cache;
34 unsigned short flags;
35} cpu_info[] = {
36 /* The first four models will never ever run this code and are
37 only here for display. */
38 { "ETRAX 1", 0, 0 },
39 { "ETRAX 2", 0, 0 },
40 { "ETRAX 3", 0, HAS_TOKENRING },
41 { "ETRAX 4", 0, HAS_TOKENRING | HAS_SCSI },
42 { "Unknown", 0, 0 },
43 { "Unknown", 0, 0 },
44 { "Unknown", 0, 0 },
45 { "Simulator", 8, HAS_ETHERNET100 | HAS_SCSI | HAS_ATA },
46 { "ETRAX 100", 8, HAS_ETHERNET100 | HAS_SCSI | HAS_ATA | HAS_IRQ_BUG },
47 { "ETRAX 100", 8, HAS_ETHERNET100 | HAS_SCSI | HAS_ATA },
48 { "ETRAX 100LX", 8, HAS_ETHERNET100 | HAS_SCSI | HAS_ATA | HAS_USB | HAS_MMU | HAS_MMU_BUG },
49 { "ETRAX 100LX v2", 8, HAS_ETHERNET100 | HAS_SCSI | HAS_ATA | HAS_USB | HAS_MMU },
50 { "Unknown", 0, 0 } /* This entry MUST be the last */
51};
52
53int show_cpuinfo(struct seq_file *m, void *v)
54{
55 unsigned long revision;
56 struct cpu_info *info;
57
58 /* read the version register in the CPU and print some stuff */
59
60 revision = rdvr();
61
16ad1b49
AU
62 if (revision >= ARRAY_SIZE(cpu_info))
63 info = &cpu_info[ARRAY_SIZE(cpu_info) - 1];
1da177e4
LT
64 else
65 info = &cpu_info[revision];
66
1336d422
JP
67 seq_printf(m,
68 "processor\t: 0\n"
69 "cpu\t\t: CRIS\n"
70 "cpu revision\t: %lu\n"
71 "cpu model\t: %s\n"
72 "cache size\t: %d kB\n"
73 "fpu\t\t: %s\n"
74 "mmu\t\t: %s\n"
75 "mmu DMA bug\t: %s\n"
76 "ethernet\t: %s Mbps\n"
77 "token ring\t: %s\n"
78 "scsi\t\t: %s\n"
79 "ata\t\t: %s\n"
80 "usb\t\t: %s\n"
81 "bogomips\t: %lu.%02lu\n",
1da177e4 82
1336d422
JP
83 revision,
84 info->model,
85 info->cache,
86 info->flags & HAS_FPU ? "yes" : "no",
87 info->flags & HAS_MMU ? "yes" : "no",
88 info->flags & HAS_MMU_BUG ? "yes" : "no",
89 info->flags & HAS_ETHERNET100 ? "10/100" : "10",
90 info->flags & HAS_TOKENRING ? "4/16 Mbps" : "no",
91 info->flags & HAS_SCSI ? "yes" : "no",
92 info->flags & HAS_ATA ? "yes" : "no",
93 info->flags & HAS_USB ? "yes" : "no",
94 (loops_per_jiffy * HZ + 500) / 500000,
95 ((loops_per_jiffy * HZ + 500) / 5000) % 100);
96
97 return 0;
1da177e4
LT
98}
99
100#endif /* CONFIG_PROC_FS */
101
102void
103show_etrax_copyright(void)
104{
105 printk(KERN_INFO
106 "Linux/CRIS port on ETRAX 100LX (c) 2001 Axis Communications AB\n");
107}