summaryrefslogtreecommitdiff
path: root/packages/linux/linux-2.6.22+2.6.23-rc5/ts72xx/ep93xx-maverick-uniqid.patch
blob: 0bc8190464d3cab97c5d5250ec084c34b4ddd06d (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.23-rc5/arch/arm/kernel/setup.c
===================================================================
--- linux-2.6.23-rc5.orig/arch/arm/kernel/setup.c	2007-09-04 02:25:36.000000000 +0200
+++ linux-2.6.23-rc5/arch/arm/kernel/setup.c	2007-09-04 02:26:49.000000000 +0200
@@ -964,8 +964,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.23-rc5/include/asm-arm/arch-ep93xx/ep93xx-regs.h
===================================================================
--- linux-2.6.23-rc5.orig/include/asm-arm/arch-ep93xx/ep93xx-regs.h	2007-09-04 02:26:38.000000000 +0200
+++ linux-2.6.23-rc5/include/asm-arm/arch-ep93xx/ep93xx-regs.h	2007-09-04 02:26:49.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))