mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-07 18:53:45 +09:00
new: fsl interrupt support
FSL_Has_data is connected to INTC.
This commit is contained in:
parent
792032baa7
commit
19bf1fbad7
@ -27,6 +27,8 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
#include <asm/microblaze_intc.h>
|
||||||
|
#include <asm/asm.h>
|
||||||
|
|
||||||
void do_reset (void)
|
void do_reset (void)
|
||||||
{
|
{
|
||||||
@ -43,7 +45,25 @@ void do_reset (void)
|
|||||||
int gpio_init (void)
|
int gpio_init (void)
|
||||||
{
|
{
|
||||||
#ifdef CFG_GPIO_0
|
#ifdef CFG_GPIO_0
|
||||||
*((unsigned long *)(CFG_GPIO_0_ADDR)) = 0x0;
|
*((unsigned long *)(CFG_GPIO_0_ADDR)) = 0xFFFFFFFF;
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
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
|
||||||
|
@ -58,6 +58,10 @@
|
|||||||
#define FREQUENCE XILINX_CLOCK_FREQ
|
#define FREQUENCE XILINX_CLOCK_FREQ
|
||||||
#define CFG_TIMER_0_PRELOAD ( FREQUENCE/1000 )
|
#define CFG_TIMER_0_PRELOAD ( FREQUENCE/1000 )
|
||||||
|
|
||||||
|
/* FSL */
|
||||||
|
#define CFG_FSL_2
|
||||||
|
#define FSL_INTR_2 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* memory layout - Example
|
* memory layout - Example
|
||||||
* TEXT_BASE = 0x1200_0000;
|
* TEXT_BASE = 0x1200_0000;
|
||||||
|
Loading…
Reference in New Issue
Block a user