]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
powerpc/8xxx: Distinguish between incompatible SEC h/w types
authorKim Phillips <kim.phillips@freescale.com>
Tue, 1 Jun 2010 17:24:27 +0000 (12:24 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Fri, 16 Jul 2010 15:55:07 +0000 (10:55 -0500)
CONFIG_SYS_FSL_SEC_COMPAT is set to 2 for the SEC 2.x and SEC 3.x.
Parts with newer SEC h/w versions will increment the number to
accomodate incompatible code changes.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/cpu/mpc8xxx/fdt.c
arch/powerpc/include/asm/config.h
include/fdt_support.h

index 79d3cdfa64217909e1b424d7df9056fd13fb9f07..d0e06e26e8c2c08660accee900275d229576af60 100644 (file)
@@ -97,11 +97,11 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd)
 }
 #endif /* CONFIG_HAS_FSL_DR_USB */
 
-#if defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx)
 /*
  * update crypto node properties to a specified revision of the SEC
- * called with sec_rev == 0 if not on an mpc8xxxE processor
+ * called with sec_rev == 0 if not on an E processor
  */
+#if CONFIG_SYS_FSL_SEC_COMPAT == 2 /* SEC 2.x/3.x */
 void fdt_fixup_crypto_node(void *blob, int sec_rev)
 {
        const struct sec_rev_prop {
@@ -183,4 +183,4 @@ void fdt_fixup_crypto_node(void *blob, int sec_rev)
                printf("WARNING: could not set crypto property: %s\n",
                       fdt_strerror(err));
 }
-#endif /* defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) */
+#endif
index fc3facb30765498bb1039110605d79420b6bd13a..1c617842e8ce4f9fb8ea4fda342b2d609e443c3f 100644 (file)
 #define CONFIG_TSECV2
 #endif
 
+/*
+ * SEC (crypto unit) major compatible version determination
+ */
+#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC83xx)
+#define CONFIG_SYS_FSL_SEC_COMPAT      2
+#endif
+
 /* Number of TLB CAM entries we have on FSL Book-E chips */
 #if defined(CONFIG_E500MC)
 #define CONFIG_SYS_NUM_TLBCAMS 64
index 9a453af34b548256e0b7064e5bf06abda12e225f..fc16159eb2f73710d178e913101d406533c7b6a5 100644 (file)
@@ -59,7 +59,7 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd);
 static inline void fdt_fixup_dr_usb(void *blob, bd_t *bd) {}
 #endif /* CONFIG_HAS_FSL_DR_USB */
 
-#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC83xx)
+#if defined(CONFIG_SYS_FSL_SEC_COMPAT)
 void fdt_fixup_crypto_node(void *blob, int sec_rev);
 #else
 static inline void fdt_fixup_crypto_node(void *blob, int sec_rev) {}