]> rtime.felk.cvut.cz Git - arc.git/commitdiff
Fixed bugs for MPC551x caused by MPC5606 code.
authormaek <devnull@localhost>
Thu, 19 May 2011 13:28:09 +0000 (15:28 +0200)
committermaek <devnull@localhost>
Thu, 19 May 2011 13:28:09 +0000 (15:28 +0200)
arch/ppc/mpc55xx/drivers/Can.c
arch/ppc/mpc55xx/drivers/sys_tick.c

index f260b2b3c91b8cb3ff587b9e914613e2ed42397a..744c7e3faa0afa3c0473b000cc7a71f68331ec3c 100644 (file)
@@ -917,8 +917,10 @@ void Can_InitController( uint8 controller, const Can_ControllerConfigType *confi
   canHw->CR.B.LPB =    config->Can_Arc_Loopback;\r
   canHw->CR.B.BOFFREC = 1;  // Disable bus off recovery\r
 \r
+#if defined(CFG_MPC5606S)\r
   SIU.PSMI[0].R = 0x00;\r
   SIU.PSMI[1].R = 0x00;\r
+#endif\r
 \r
 #if defined(CFG_MPC5516) || defined(CFG_MPC5517) || defined(CFG_MPC5606S)\r
   // Check if we use individual masks. If so accept anything(=0) for now\r
index 8027488b9ddda39df8bbdf625d3bd2b5123af118..00d89b16c97d226925806aecefef6b2ce57946af 100644 (file)
@@ -28,7 +28,11 @@ extern OsTickType OsTickFreq;
 void Os_SysTickInit( void ) {\r
        TaskType tid;\r
        tid = Os_Arc_CreateIsr(OsTick, 6 /*prio*/, "OsTick");\r
+#if defined(CFG_MPC5606S)\r
        Irq_AttachIsr2(tid, NULL, RTC_INT);  /* Attach ISR2 to RTC interrupt */\r
+#else\r
+       Irq_AttachIsr2(tid, NULL, 7);  /* Attach ISR2 to RTC interrupt */\r
+#endif\r
 }\r
 \r
 /**\r
@@ -57,6 +61,7 @@ void Os_SysTickStart(uint32_t period_ticks) {
 #else\r
 \r
        // Enable the TB\r
+               uint32_t tmp;\r
        tmp = get_spr(SPR_HID0);\r
        tmp |= HID0_TBEN;\r
        set_spr(SPR_HID0, tmp);\r