]> git.sur5r.net Git - u-boot/blobdiff - cpu/mpc86xx/cpu_init.c
Merge ../custodians
[u-boot] / cpu / mpc86xx / cpu_init.c
index 4673d05e7193031f22ac54ef47f5826de8ecdc15..ab5906dbc0a230b60cc9ef60323c1b1086fa465e 100644 (file)
@@ -29,6 +29,8 @@
 #include <common.h>
 #include <mpc86xx.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /*
  * Breathe some life into the CPU...
  *
@@ -38,7 +40,6 @@
 
 void cpu_init_f(void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
        volatile immap_t    *immap = (immap_t *)CFG_IMMR;
        volatile ccsr_lbc_t *memctl = &immap->im_lbc;
 
@@ -48,6 +49,10 @@ void cpu_init_f(void)
        /* Clear initial global data */
        memset ((void *) gd, 0, sizeof (gd_t));
 
+#ifdef CONFIG_FSL_LAW
+       init_laws();
+#endif
+
        /* Map banks 0 and 1 to the FLASH banks 0 and 1 at preliminary
         * addresses - these have to be modified later when FLASH size
         * has been determined
@@ -104,8 +109,8 @@ void cpu_init_f(void)
        /* enable the timebase bit in HID0 */
        set_hid0(get_hid0() | 0x4000000);
 
-       /* enable SYNCBE | ABE bits in  HID1 */
-       set_hid1(get_hid1() | 0x00000C00);
+       /* enable EMCP, SYNCBE | ABE bits in HID1 */
+       set_hid1(get_hid1() | 0x80000C00);
 }
 
 /*
@@ -113,5 +118,8 @@ void cpu_init_f(void)
  */
 int cpu_init_r(void)
 {
+#ifdef CONFIG_FSL_LAW
+       disable_law(0);
+#endif
        return 0;
 }