summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-lpc32xx/common.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-07-21 00:15:59 +0200
committerArnd Bergmann <arnd@arndb.de>2012-07-21 00:15:59 +0200
commit233de298cb44e7dd300cd68f5abd7f1a75561fd5 (patch)
tree2193094046036bec1a05883e63b1af5d9c067397 /arch/arm/mach-lpc32xx/common.c
parent5e7c2c2f9785be62431270d48e2753e580d6a11c (diff)
parentc49a18308669a7c1bd61ddd4f575a88d49b0b852 (diff)
Merge branch 'lpc32xx/core2' of git://git.antcom.de/linux-2.6 into next/soc
From Roland Stigge <stigge@antcom.de>: this LPC32xx core update (branch lpc32xx/core2) builds upon the previously provided lpc32xx/core-fixes. Basically including PWM support (for the PWM driver from Alexandre already in the pwm tree), and CPU ID. * 'lpc32xx/core2' of git://git.antcom.de/linux-2.6: ARM: LPC32xx: Add PWM support ARM: LPC32xx: Add PWM clock ARM: LPC32xx: Set system serial based on cpu unique id Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-lpc32xx/common.c')
-rw-r--r--arch/arm/mach-lpc32xx/common.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mach-lpc32xx/common.c b/arch/arm/mach-lpc32xx/common.c
index 5c96057b6d7..a48dc2dec48 100644
--- a/arch/arm/mach-lpc32xx/common.c
+++ b/arch/arm/mach-lpc32xx/common.c
@@ -26,6 +26,7 @@
#include <linux/io.h>
#include <asm/mach/map.h>
+#include <asm/system_info.h>
#include <mach/hardware.h>
#include <mach/platform.h>
@@ -224,7 +225,7 @@ void lpc23xx_restart(char mode, const char *cmd)
;
}
-static int __init lpc32xx_display_uid(void)
+static int __init lpc32xx_check_uid(void)
{
u32 uid[4];
@@ -233,6 +234,11 @@ static int __init lpc32xx_display_uid(void)
printk(KERN_INFO "LPC32XX unique ID: %08x%08x%08x%08x\n",
uid[3], uid[2], uid[1], uid[0]);
+ if (!system_serial_low && !system_serial_high) {
+ system_serial_low = uid[0];
+ system_serial_high = uid[1];
+ }
+
return 1;
}
-arch_initcall(lpc32xx_display_uid);
+arch_initcall(lpc32xx_check_uid);