CR ENGR00049086: fix scc fail fuse not blown
authorQuinn Jensen <quinn.jensen@freescale.com>
Thu, 25 Oct 2007 03:22:11 +0000 (21:22 -0600)
committerQuinn Jensen <quinn.jensen@freescale.com>
Thu, 25 Oct 2007 03:22:11 +0000 (21:22 -0600)
Patch for CR ENGR00049086: fix scc fail fuse not blown.
Deregistering the driver properly to prevent boot crash if SCC fuse are
not blown.  Applies to linux 2.6.22 kernel for MX platforms.

http://www.bitshrine.org/gpp/linux-2.6.22-mx-CR-ENGR00049086-fix-scc-fail-fuse-not-blow.patch

arch/arm/mach-mx27/devices.c
arch/arm/mach-mx3/devices.c
drivers/mxc/security/mxc_scc.c

index 0df427998b7ca4c7c14bc366935dc73526b7e9a3..e0381f082d0dfda1a1303a5a48d6a48abd86750d 100644 (file)
@@ -127,13 +127,13 @@ static inline void mxc_init_wdt(void)
  */
 #if defined(CONFIG_MXC_SECURITY_SCC) || defined(CONFIG_MXC_SECURITY_SCC_MODULE)
 static struct platform_device mxc_scc_device = {
-        .name = "mxc_scc",
-        .id = 0,
+       .name = "mxc_scc",
+       .id = 0,
 };
 
 static void mxc_init_scc(void)
 {
-        platform_device_register(&mxc_scc_device);
+       platform_device_register(&mxc_scc_device);
 }
 #else
 static inline void mxc_init_scc(void)
index 51ff2253cef5159fe45c8ae333e22fff594a838e..eef2f4ceb6ba6a43808a9211813c66c89fca169f 100644 (file)
@@ -340,13 +340,13 @@ static inline void mxc_init_ir(void)
  */
 #if defined(CONFIG_MXC_SECURITY_SCC) || defined(CONFIG_MXC_SECURITY_SCC_MODULE)
 static struct platform_device mxc_scc_device = {
-        .name = "mxc_scc",
-        .id = 0,
+       .name = "mxc_scc",
+       .id = 0,
 };
 
 static void mxc_init_scc(void)
 {
-        platform_device_register(&mxc_scc_device);
+       platform_device_register(&mxc_scc_device);
 }
 #else
 static inline void mxc_init_scc(void)
index 1d9a782bbe3f5371d60e805429a58cf0b546efcc..c8257b53263966f8d65c1f1d4621c354b742a2db 100644 (file)
@@ -273,11 +273,12 @@ static int mxc_scc_probe(struct platform_device *pdev)
 
                /* See whether there is an SCC available */
                if (0 && !SCC_ENABLED()) {
-                       pr_debug
+                       printk
                            ("SCC: Fuse for SCC is set to disabled.  Exiting.\n");
                } else {
                        /* Map the SCC (SCM and SMN) memory on the internal bus into
                           kernel address space */
+                       
                        scc_base = ioremap_nocache(SCC_BASE, SCC_ADDRESS_RANGE);
 
                        /* If that worked, we can try to use the SCC */
@@ -351,7 +352,7 @@ static int mxc_scc_probe(struct platform_device *pdev)
                 */
                if (scc_availability == SCC_STATUS_CHECKING ||
                    scc_availability == SCC_STATUS_UNIMPLEMENTED) {
-                       scc_cleanup();
+                       mxc_scc_remove(pdev);
                } else {
                        return_value = 0;       /* All is well */
                }
@@ -371,7 +372,7 @@ static int mxc_scc_probe(struct platform_device *pdev)
 }                              /* mxc_scc_probe */
 
 /*****************************************************************************/
-/* fn scc_cleanup()                                                          */
+/* fn mxc_scc_remove()                                                          */
 /*****************************************************************************/
 /*!
  * Perform cleanup before driver/module is unloaded by setting the machine