powerpc/bootcount: Add bootcount support for MPC512x
authorMichael Weiss <michael.weiss@ifm.com>
Thu, 20 May 2010 14:09:34 +0000 (16:09 +0200)
committerWolfgang Denk <wd@denx.de>
Tue, 29 Jun 2010 21:13:35 +0000 (23:13 +0200)
This also uses the breadcrumb register as on MPC5200.

Signed-off-by: Michael Weiss <michael.weiss@ifm.com>
Signed-off-by: Detlev Zundel <dzu@denx.de>
arch/powerpc/lib/bootcount.c

index 338c848..07ef28d 100644 (file)
 #define CONFIG_SYS_BOOTCOUNT_SINGLEWORD
 #endif /* defined(CONFIG_MPC5xxx) */
 
+#if defined(CONFIG_MPC512X)
+#define CONFIG_SYS_BOOTCOUNT_ADDR      (&((immap_t *)CONFIG_SYS_IMMR)->clk.bcr)
+#define CONFIG_SYS_BOOTCOUNT_SINGLEWORD
+#endif /* defined(CONFIG_MPC512X) */
+
 #if defined(CONFIG_8xx)
 #define CONFIG_SYS_BOOTCOUNT_ADDR (((immap_t *)CONFIG_SYS_IMMR)->im_cpm.cp_dpmem + \
                                CPM_BOOTCOUNT_ADDR)