Path: blob/master/arch/cris/arch-v10/kernel/setup.c
15125 views
/*1*2* linux/arch/cris/arch-v10/kernel/setup.c3*4* Copyright (C) 1995 Linus Torvalds5* Copyright (c) 2001-2002 Axis Communications AB6*/78/*9* This file handles the architecture-dependent parts of initialization10*/1112#include <linux/seq_file.h>13#include <linux/proc_fs.h>14#include <linux/delay.h>15#include <linux/param.h>1617#ifdef CONFIG_PROC_FS18#define HAS_FPU 0x000119#define HAS_MMU 0x000220#define HAS_ETHERNET100 0x000421#define HAS_TOKENRING 0x000822#define HAS_SCSI 0x001023#define HAS_ATA 0x002024#define HAS_USB 0x004025#define HAS_IRQ_BUG 0x008026#define HAS_MMU_BUG 0x01002728static struct cpu_info {29char *model;30unsigned short cache;31unsigned short flags;32} cpu_info[] = {33/* The first four models will never ever run this code and are34only here for display. */35{ "ETRAX 1", 0, 0 },36{ "ETRAX 2", 0, 0 },37{ "ETRAX 3", 0, HAS_TOKENRING },38{ "ETRAX 4", 0, HAS_TOKENRING | HAS_SCSI },39{ "Unknown", 0, 0 },40{ "Unknown", 0, 0 },41{ "Unknown", 0, 0 },42{ "Simulator", 8, HAS_ETHERNET100 | HAS_SCSI | HAS_ATA },43{ "ETRAX 100", 8, HAS_ETHERNET100 | HAS_SCSI | HAS_ATA | HAS_IRQ_BUG },44{ "ETRAX 100", 8, HAS_ETHERNET100 | HAS_SCSI | HAS_ATA },45{ "ETRAX 100LX", 8, HAS_ETHERNET100 | HAS_SCSI | HAS_ATA | HAS_USB | HAS_MMU | HAS_MMU_BUG },46{ "ETRAX 100LX v2", 8, HAS_ETHERNET100 | HAS_SCSI | HAS_ATA | HAS_USB | HAS_MMU },47{ "Unknown", 0, 0 } /* This entry MUST be the last */48};4950int show_cpuinfo(struct seq_file *m, void *v)51{52unsigned long revision;53struct cpu_info *info;5455/* read the version register in the CPU and print some stuff */5657revision = rdvr();5859if (revision >= ARRAY_SIZE(cpu_info))60info = &cpu_info[ARRAY_SIZE(cpu_info) - 1];61else62info = &cpu_info[revision];6364return seq_printf(m,65"processor\t: 0\n"66"cpu\t\t: CRIS\n"67"cpu revision\t: %lu\n"68"cpu model\t: %s\n"69"cache size\t: %d kB\n"70"fpu\t\t: %s\n"71"mmu\t\t: %s\n"72"mmu DMA bug\t: %s\n"73"ethernet\t: %s Mbps\n"74"token ring\t: %s\n"75"scsi\t\t: %s\n"76"ata\t\t: %s\n"77"usb\t\t: %s\n"78"bogomips\t: %lu.%02lu\n",7980revision,81info->model,82info->cache,83info->flags & HAS_FPU ? "yes" : "no",84info->flags & HAS_MMU ? "yes" : "no",85info->flags & HAS_MMU_BUG ? "yes" : "no",86info->flags & HAS_ETHERNET100 ? "10/100" : "10",87info->flags & HAS_TOKENRING ? "4/16 Mbps" : "no",88info->flags & HAS_SCSI ? "yes" : "no",89info->flags & HAS_ATA ? "yes" : "no",90info->flags & HAS_USB ? "yes" : "no",91(loops_per_jiffy * HZ + 500) / 500000,92((loops_per_jiffy * HZ + 500) / 5000) % 100);93}9495#endif /* CONFIG_PROC_FS */9697void98show_etrax_copyright(void)99{100printk(KERN_INFO101"Linux/CRIS port on ETRAX 100LX (c) 2001 Axis Communications AB\n");102}103104105