summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2007-05-07 19:33:51 +0200
committerMichal Simek <monstr@monstr.eu>2007-05-07 19:33:51 +0200
commit19bf1fbad7f19d5a120be9b1daf136e052fcab39 (patch)
treeff51502fe07ca13cf8d245ed58706c8bbfa4e9b5
parent792032baa7d625e34c981ab6df521911bd8dc861 (diff)
downloadu-boot-imx-19bf1fbad7f19d5a120be9b1daf136e052fcab39.zip
u-boot-imx-19bf1fbad7f19d5a120be9b1daf136e052fcab39.tar.gz
u-boot-imx-19bf1fbad7f19d5a120be9b1daf136e052fcab39.tar.bz2
new: fsl interrupt support
FSL_Has_data is connected to INTC.
-rw-r--r--board/xilinx/ml401/ml401.c22
-rw-r--r--include/configs/ml401.h4
2 files changed, 25 insertions, 1 deletions
diff --git a/board/xilinx/ml401/ml401.c b/board/xilinx/ml401/ml401.c
index b48103f..955936d 100644
--- a/board/xilinx/ml401/ml401.c
+++ b/board/xilinx/ml401/ml401.c
@@ -27,6 +27,8 @@
#include <common.h>
#include <config.h>
+#include <asm/microblaze_intc.h>
+#include <asm/asm.h>
void do_reset (void)
{
@@ -43,7 +45,25 @@ void do_reset (void)
int gpio_init (void)
{
#ifdef CFG_GPIO_0
- *((unsigned long *)(CFG_GPIO_0_ADDR)) = 0x0;
+ *((unsigned long *)(CFG_GPIO_0_ADDR)) = 0xFFFFFFFF;
#endif
return 0;
}
+
+#ifdef CFG_FSL_2
+void fsl_isr2 (void *arg) {
+ volatile int num;
+ *((unsigned int *)(CFG_GPIO_0_ADDR + 0x4)) =
+ ++(*((unsigned int *)(CFG_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
diff --git a/include/configs/ml401.h b/include/configs/ml401.h
index f3ef962..327d31c 100644
--- a/include/configs/ml401.h
+++ b/include/configs/ml401.h
@@ -58,6 +58,10 @@
#define FREQUENCE XILINX_CLOCK_FREQ
#define CFG_TIMER_0_PRELOAD ( FREQUENCE/1000 )
+/* FSL */
+#define CFG_FSL_2
+#define FSL_INTR_2 1
+
/*
* memory layout - Example
* TEXT_BASE = 0x1200_0000;