]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - board/xilinx/ml401/ml401.c
rename CFG_ macros to CONFIG_SYS
[karo-tx-uboot.git] / board / xilinx / ml401 / ml401.c
index b48103fdc028e522eba9f742b3026da2398e0e40..f388b775c2e2d85dd85df4068e67f2709367eed8 100644 (file)
 
 #include <common.h>
 #include <config.h>
+#include <asm/microblaze_intc.h>
+#include <asm/asm.h>
 
 void do_reset (void)
 {
-#ifdef CFG_GPIO_0
-       *((unsigned long *)(CFG_GPIO_0_ADDR)) =
-           ++(*((unsigned long *)(CFG_GPIO_0_ADDR)));
+#ifdef CONFIG_SYS_GPIO_0
+       *((unsigned long *)(CONFIG_SYS_GPIO_0_ADDR)) =
+           ++(*((unsigned long *)(CONFIG_SYS_GPIO_0_ADDR)));
 #endif
-#ifdef CFG_RESET_ADDRESS
+#ifdef CONFIG_SYS_RESET_ADDRESS
        puts ("Reseting board\n");
        asm ("bra r0");
 #endif
@@ -42,8 +44,26 @@ void do_reset (void)
 
 int gpio_init (void)
 {
-#ifdef CFG_GPIO_0
-       *((unsigned long *)(CFG_GPIO_0_ADDR)) = 0x0;
+#ifdef CONFIG_SYS_GPIO_0
+       *((unsigned long *)(CONFIG_SYS_GPIO_0_ADDR)) = 0xFFFFFFFF;
 #endif
        return 0;
 }
+
+#ifdef CONFIG_SYS_FSL_2
+void fsl_isr2 (void *arg) {
+       volatile int num;
+       *((unsigned int *)(CONFIG_SYS_GPIO_0_ADDR + 0x4)) =
+           ++(*((unsigned int *)(CONFIG_SYS_GPIO_0_ADDR + 0x4)));
+       GET (num, 2);
+       NGET (num, 2);
+       puts("*");
+}
+
+void fsl_init2 (void) {
+       puts("fsl_init2\n");
+       install_interrupt_handler (FSL_INTR_2,\
+ fsl_isr2,\
+ NULL);
+}
+#endif