]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/cpu/mpc86xx/interrupts.c
GCC4.6: Squash warnings in denali_spd_ddr2.c
[u-boot] / arch / powerpc / cpu / mpc86xx / interrupts.c
index c78fc72254b104e5bbcc50bb6f9981b481d2fb99..14821f42430cf24ce791e476592131e1145853d1 100644 (file)
 #include <mpc86xx.h>
 #include <command.h>
 #include <asm/processor.h>
+#ifdef CONFIG_POST
+#include <post.h>
+#endif
 
 int interrupt_init_cpu(unsigned long *decrementer_count)
 {
        volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
        volatile ccsr_pic_t *pic = &immr->im_pic;
 
+#ifdef CONFIG_POST
+       /*
+        * The POST word is stored in the PIC's TFRR register which gets
+        * cleared when the PIC is reset.  Save it off so we can restore it
+        * later.
+        */
+       ulong post_word = post_word_load();
+#endif
+
        pic->gcr = MPC86xx_PICGCR_RST;
        while (pic->gcr & MPC86xx_PICGCR_RST)
                ;
@@ -74,6 +86,10 @@ int interrupt_init_cpu(unsigned long *decrementer_count)
        pic->ctpr = 0;  /* 40080 clear current task priority register */
 #endif
 
+#ifdef CONFIG_POST
+       post_word_store(post_word);
+#endif
+
        return 0;
 }
 
@@ -101,7 +117,7 @@ void irq_free_handler(int vec)
 /*
  * irqinfo - print information about PCI devices,not implemented.
  */
-int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        return 0;
 }