cpuinfo.c (0cce284537fb42d9c28b9b31038ffc9b464555f5) cpuinfo.c (a89988a6e00c5a099ee23619cd91dc8dc7ec9328)
1/*
2 * Copyright (C) 2013 Altera Corporation
3 * Copyright (C) 2011 Tobias Klauser <tklauser@distanz.ch>
4 *
5 * Based on cpuinfo.c from microblaze
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 111 unchanged lines hidden (view full) ---

120 * Get CPU information for use by the procfs.
121 */
122static int show_cpuinfo(struct seq_file *m, void *v)
123{
124 const u32 clockfreq = cpuinfo.cpu_clock_freq;
125
126 seq_printf(m,
127 "CPU:\t\tNios II/%s\n"
1/*
2 * Copyright (C) 2013 Altera Corporation
3 * Copyright (C) 2011 Tobias Klauser <tklauser@distanz.ch>
4 *
5 * Based on cpuinfo.c from microblaze
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 111 unchanged lines hidden (view full) ---

120 * Get CPU information for use by the procfs.
121 */
122static int show_cpuinfo(struct seq_file *m, void *v)
123{
124 const u32 clockfreq = cpuinfo.cpu_clock_freq;
125
126 seq_printf(m,
127 "CPU:\t\tNios II/%s\n"
128 "REV:\t\t%i\n"
128 "MMU:\t\t%s\n"
129 "FPU:\t\tnone\n"
130 "Clocking:\t%u.%02u MHz\n"
131 "BogoMips:\t%lu.%02lu\n"
132 "Calibration:\t%lu loops\n",
133 cpuinfo.cpu_impl,
129 "MMU:\t\t%s\n"
130 "FPU:\t\tnone\n"
131 "Clocking:\t%u.%02u MHz\n"
132 "BogoMips:\t%lu.%02lu\n"
133 "Calibration:\t%lu loops\n",
134 cpuinfo.cpu_impl,
135 CONFIG_NIOS2_ARCH_REVISION,
134 cpuinfo.mmu ? "present" : "none",
135 clockfreq / 1000000, (clockfreq / 100000) % 10,
136 (loops_per_jiffy * HZ) / 500000,
137 ((loops_per_jiffy * HZ) / 5000) % 100,
138 (loops_per_jiffy * HZ));
139
140 seq_printf(m,
141 "HW:\n"

--- 51 unchanged lines hidden ---
136 cpuinfo.mmu ? "present" : "none",
137 clockfreq / 1000000, (clockfreq / 100000) % 10,
138 (loops_per_jiffy * HZ) / 500000,
139 ((loops_per_jiffy * HZ) / 5000) % 100,
140 (loops_per_jiffy * HZ));
141
142 seq_printf(m,
143 "HW:\n"

--- 51 unchanged lines hidden ---