summaryrefslogtreecommitdiffstats
path: root/include/asm-avr32
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2007-12-07 10:21:02 +0100
committerHaavard Skinnemoen <hskinnemoen@atmel.com>2008-01-25 08:31:40 +0100
commit281ef58ccf62eaa6c4e4b7e4c0a3ee6b52e84e5b (patch)
treea3a26fddcf6ffa0ffc8bda6d7e28ed9bd04aeb48 /include/asm-avr32
parent2853ce5ecefe9d9ca119f33db0c23a3f075e35d9 (diff)
downloadkernel-crypto-281ef58ccf62eaa6c4e4b7e4c0a3ee6b52e84e5b.tar.gz
kernel-crypto-281ef58ccf62eaa6c4e4b7e4c0a3ee6b52e84e5b.tar.xz
kernel-crypto-281ef58ccf62eaa6c4e4b7e4c0a3ee6b52e84e5b.zip
[AVR32] Provide more CPU information in /proc/cpuinfo and dmesg
Add the following fields to /proc/cpuinfo: * chip type and revision (from the JTAG chip id) * cpu MHz (from clk_get_rate()) * features (from the CONFIG0 register) Also rename "cpu family" to "cpu arch" and "cpu type" to "cpu core" to remove some ambiguity. Show chip type and revision at bootup, and clarify that the other kinds of IDs that we're already printing are for the cpu core and architecture. Rename "AP7000" to "AP7" since that's the name of the core. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'include/asm-avr32')
-rw-r--r--include/asm-avr32/processor.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-avr32/processor.h b/include/asm-avr32/processor.h
index a52576b25af..4212551c1cd 100644
--- a/include/asm-avr32/processor.h
+++ b/include/asm-avr32/processor.h
@@ -57,11 +57,25 @@ struct avr32_cpuinfo {
unsigned short cpu_revision;
enum tlb_config tlb_config;
unsigned long features;
+ u32 device_id;
struct cache_info icache;
struct cache_info dcache;
};
+static inline unsigned int avr32_get_manufacturer_id(struct avr32_cpuinfo *cpu)
+{
+ return (cpu->device_id >> 1) & 0x7f;
+}
+static inline unsigned int avr32_get_product_number(struct avr32_cpuinfo *cpu)
+{
+ return (cpu->device_id >> 12) & 0xffff;
+}
+static inline unsigned int avr32_get_chip_revision(struct avr32_cpuinfo *cpu)
+{
+ return (cpu->device_id >> 28) & 0x0f;
+}
+
extern struct avr32_cpuinfo boot_cpu_data;
#ifdef CONFIG_SMP