blob: fb6c8cfe18f488348cafd3b8ac4f31fbf7081498 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
Adds support for SoC's unique ID (Maverick Key) in /proc/cpuinfo
Signed-off-by: Petr Stetiar <ynezz@true.cz>
Index: linux-2.6.22/arch/arm/kernel/setup.c
===================================================================
--- linux-2.6.22.orig/arch/arm/kernel/setup.c 2007-09-02 23:08:51.000000000 +0200
+++ linux-2.6.22/arch/arm/kernel/setup.c 2007-09-02 23:10:24.000000000 +0200
@@ -959,8 +959,15 @@
seq_printf(m, "Hardware\t: %s\n", machine_name);
seq_printf(m, "Revision\t: %04x\n", system_rev);
+
+#if defined(CONFIG_ARCH_EP93XX)
+#include <asm/arch/ep93xx-regs.h>
+ seq_printf(m, "Serial\t\t: %016x\n",
+ *((unsigned int *)EP93XX_SECURITY_UNIQID));
+#else
seq_printf(m, "Serial\t\t: %08x%08x\n",
system_serial_high, system_serial_low);
+#endif
return 0;
}
Index: linux-2.6.22/include/asm-arm/arch-ep93xx/ep93xx-regs.h
===================================================================
--- linux-2.6.22.orig/include/asm-arm/arch-ep93xx/ep93xx-regs.h 2007-09-02 23:06:45.000000000 +0200
+++ linux-2.6.22/include/asm-arm/arch-ep93xx/ep93xx-regs.h 2007-09-02 23:08:34.000000000 +0200
@@ -70,6 +70,8 @@
#define EP93XX_I2S_BASE (EP93XX_APB_VIRT_BASE + 0x00020000)
#define EP93XX_SECURITY_BASE (EP93XX_APB_VIRT_BASE + 0x00030000)
+#define EP93XX_SECURITY_REG(x) (EP93XX_SECURITY_BASE + (x))
+#define EP93XX_SECURITY_UNIQID EP93XX_SECURITY_REG(0x2440)
#define EP93XX_GPIO_BASE (EP93XX_APB_VIRT_BASE + 0x00040000)
#define EP93XX_GPIO_REG(x) (EP93XX_GPIO_BASE + (x))
|