]> rtime.felk.cvut.cz Git - arc.git/blobdiff - arch/ppc/mpc55xx/drivers/Mcu.c
Merged with dem-dev
[arc.git] / arch / ppc / mpc55xx / drivers / Mcu.c
index 38682f64e78597c11400da82d753467a37fd22f8..77a654ba675a4adc8acef0a08ae9b7ea6f7c3319 100644 (file)
@@ -128,9 +128,10 @@ static void Mcu_LossOfCLock( void  ) {
 #define SPR_PIR 286\r
 #define SPR_PVR 287\r
 \r
-#define CORE_PVR_E200Z1   0x81440000UL\r
-#define CORE_PVR_E200Z0   0x81710000UL\r
-#define CORE_PVR_E200Z6   0x81170000UL\r
+#define CORE_PVR_E200Z1        0x81440000UL\r
+#define CORE_PVR_E200Z0        0x81710000UL
+#define CORE_PVR_E200Z3        0x81120000UL\r
+#define CORE_PVR_E200Z6        0x81170000UL\r
 \r
 \r
 typedef struct {\r
@@ -153,12 +154,17 @@ cpu_info_t cpu_info_list[] =
     {\r
     .name = "MPC5516",\r
     .pvr = CORE_PVR_E200Z0,\r
-    },\r
+    },
 #elif defined(CFG_MPC5567)\r
     {\r
        .name = "MPC5567",\r
        .pvr = CORE_PVR_E200Z6,\r
-    }\r
+    }
+#elif defined(CFG_MPC5633)
+    {
+    .name = "MPC563X",
+    .pvr = CORE_PVR_E200Z3,
+    },
 #endif\r
 };\r
 \r
@@ -176,7 +182,12 @@ core_info_t core_info_list[] = {
     {\r
        .name = "CORE_E200Z6",\r
        .pvr = CORE_PVR_E200Z6,\r
-    }\r
+    }
+#elif defined(CFG_MPC5633)
+    {
+    .name = "CORE_E200Z3",
+    .pvr = CORE_PVR_E200Z3,
+    },\r
 #endif\r
 };\r
 \r
@@ -488,13 +499,14 @@ uint32_t McuE_GetSystemClock(void)
    * System clock calculation\r
    *\r
    * 5516 -  f_sys = extal * (emfd+16) / ( (eprediv+1) * ( erfd+1 ));\r
-   * 5567 -  f_sys = extal * (emfd+4) / ( (eprediv+1) * ( 2^erfd ));\r
+   * 5567 -  f_sys = extal * (emfd+4) / ( (eprediv+1) * ( 2^erfd ));
+   * 563x -  We run in legacy mode = 5567
    */\r
 #if defined(CFG_MPC5516)\r
   uint32_t eprediv = FMPLL.ESYNCR1.B.EPREDIV;\r
   uint32_t emfd = FMPLL.ESYNCR1.B.EMFD;\r
   uint32_t erfd = FMPLL.ESYNCR2.B.ERFD;\r
-#elif defined(CFG_MPC5554) || defined(CFG_MPC5567)\r
+#elif defined(CFG_MPC5554) || defined(CFG_MPC5567) || defined(CFG_MPC5633)\r
   uint32_t eprediv = FMPLL.SYNCR.B.PREDIV;\r
   uint32_t emfd = FMPLL.SYNCR.B.MFD;\r
   uint32_t erfd = FMPLL.SYNCR.B.RFD;\r
@@ -502,7 +514,7 @@ uint32_t McuE_GetSystemClock(void)
   uint32_t f_sys;\r
   uint32  extal = Mcu_Global.config->McuClockSettingConfig[Mcu_Global.clockSetting].McuClockReferencePoint;\r
 \r
-  f_sys =  CALC_SYSTEM_CLOCK(extal,emfd,eprediv,erfd);\r
+  f_sys =  CALC_SYSTEM_CLOCK(extal,emfd,eprediv,erfd);
 \r
   return f_sys;\r
 }\r