Merge branch 'master' of git://git.denx.de/u-boot-microblaze
This commit is contained in:
commit
500fbae204
|
@ -50,6 +50,8 @@ void icache_enable (void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void icache_disable(void) {
|
void icache_disable(void) {
|
||||||
|
/* we are not generate ICACHE size -> flush whole cache */
|
||||||
|
flush_cache(0, 32768);
|
||||||
MSRCLR(0x20);
|
MSRCLR(0x20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,5 +60,31 @@ void dcache_enable (void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void dcache_disable(void) {
|
void dcache_disable(void) {
|
||||||
|
#ifdef XILINX_USE_DCACHE
|
||||||
|
#ifdef XILINX_DCACHE_BYTE_SIZE
|
||||||
|
flush_cache(0, XILINX_DCACHE_BYTE_SIZE);
|
||||||
|
#else
|
||||||
|
#warning please rebuild BSPs and update configuration
|
||||||
|
flush_cache(0, 32768);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
MSRCLR(0x80);
|
MSRCLR(0x80);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void flush_cache (ulong addr, ulong size)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < size; i += 4)
|
||||||
|
asm volatile (
|
||||||
|
#ifdef CONFIG_ICACHE
|
||||||
|
"wic %0, r0;"
|
||||||
|
#endif
|
||||||
|
"nop;"
|
||||||
|
#ifdef CONFIG_DCACHE
|
||||||
|
"wdc.flush %0, r0;"
|
||||||
|
#endif
|
||||||
|
"nop;"
|
||||||
|
:
|
||||||
|
: "r" (addr + i)
|
||||||
|
: "memory");
|
||||||
|
}
|
||||||
|
|
|
@ -46,13 +46,6 @@ int disable_interrupts (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SYS_INTC_0
|
#ifdef CONFIG_SYS_INTC_0
|
||||||
#ifdef CONFIG_SYS_TIMER_0
|
|
||||||
extern void timer_init (void);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_SYS_FSL_2
|
|
||||||
extern void fsl_init2 (void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
static struct irq_action vecs[CONFIG_SYS_INTC_0_NUM];
|
static struct irq_action vecs[CONFIG_SYS_INTC_0_NUM];
|
||||||
|
|
||||||
|
@ -142,20 +135,14 @@ int interrupts_init (void)
|
||||||
}
|
}
|
||||||
/* initialize intc controller */
|
/* initialize intc controller */
|
||||||
intc_init ();
|
intc_init ();
|
||||||
#ifdef CONFIG_SYS_TIMER_0
|
|
||||||
timer_init ();
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_SYS_FSL_2
|
|
||||||
fsl_init2 ();
|
|
||||||
#endif
|
|
||||||
enable_interrupts ();
|
enable_interrupts ();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void interrupt_handler (void)
|
void interrupt_handler (void)
|
||||||
{
|
{
|
||||||
int irqs = (intc->isr & intc->ier); /* find active interrupt */
|
int irqs = intc->ivr; /* find active interrupt */
|
||||||
int i = 1;
|
int mask = 1;
|
||||||
#ifdef DEBUG_INT
|
#ifdef DEBUG_INT
|
||||||
int value;
|
int value;
|
||||||
printf ("INTC isr %x, ier %x, iar %x, mer %x\n", intc->isr, intc->ier,
|
printf ("INTC isr %x, ier %x, iar %x, mer %x\n", intc->isr, intc->ier,
|
||||||
|
@ -163,23 +150,17 @@ void interrupt_handler (void)
|
||||||
R14(value);
|
R14(value);
|
||||||
printf ("Interrupt handler on %x line, r14 %x\n", irqs, value);
|
printf ("Interrupt handler on %x line, r14 %x\n", irqs, value);
|
||||||
#endif
|
#endif
|
||||||
struct irq_action *act = vecs;
|
struct irq_action *act = vecs + irqs;
|
||||||
while (irqs) {
|
|
||||||
if (irqs & 1) {
|
intc->iar = mask << irqs;
|
||||||
|
|
||||||
#ifdef DEBUG_INT
|
#ifdef DEBUG_INT
|
||||||
printf
|
printf
|
||||||
("Jumping to interrupt handler rutine addr %x,count %x,arg %x\n",
|
("Jumping to interrupt handler rutine addr %x,count %x,arg %x\n",
|
||||||
act->handler, act->count, act->arg);
|
act->handler, act->count, act->arg);
|
||||||
#endif
|
#endif
|
||||||
act->handler (act->arg);
|
act->handler (act->arg);
|
||||||
act->count++;
|
act->count++;
|
||||||
intc->iar = i;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
irqs >>= 1;
|
|
||||||
act++;
|
|
||||||
i <<= 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DEBUG_INT
|
#ifdef DEBUG_INT
|
||||||
printf ("Dump INTC reg, isr %x, ier %x, iar %x, mer %x\n", intc->isr,
|
printf ("Dump INTC reg, isr %x, ier %x, iar %x, mer %x\n", intc->isr,
|
||||||
|
|
|
@ -27,129 +27,71 @@
|
||||||
.text
|
.text
|
||||||
.global _interrupt_handler
|
.global _interrupt_handler
|
||||||
_interrupt_handler:
|
_interrupt_handler:
|
||||||
addi r1, r1, -4
|
swi r2, r1, -4
|
||||||
swi r2, r1, 0
|
swi r3, r1, -8
|
||||||
addi r1, r1, -4
|
swi r4, r1, -12
|
||||||
swi r3, r1, 0
|
swi r5, r1, -16
|
||||||
addi r1, r1, -4
|
swi r6, r1, -20
|
||||||
swi r4, r1, 0
|
swi r7, r1, -24
|
||||||
addi r1, r1, -4
|
swi r8, r1, -28
|
||||||
swi r5, r1, 0
|
swi r9, r1, -32
|
||||||
addi r1, r1, -4
|
swi r10, r1, -36
|
||||||
swi r6, r1, 0
|
swi r11, r1, -40
|
||||||
addi r1, r1, -4
|
swi r12, r1, -44
|
||||||
swi r7, r1, 0
|
swi r13, r1, -48
|
||||||
addi r1, r1, -4
|
swi r14, r1, -52
|
||||||
swi r8, r1, 0
|
swi r15, r1, -56
|
||||||
addi r1, r1, -4
|
swi r16, r1, -60
|
||||||
swi r9, r1, 0
|
swi r17, r1, -64
|
||||||
addi r1, r1, -4
|
swi r18, r1, -68
|
||||||
swi r10, r1, 0
|
swi r19, r1, -72
|
||||||
addi r1, r1, -4
|
swi r20, r1, -76
|
||||||
swi r11, r1, 0
|
swi r21, r1, -80
|
||||||
addi r1, r1, -4
|
swi r22, r1, -84
|
||||||
swi r12, r1, 0
|
swi r23, r1, -88
|
||||||
addi r1, r1, -4
|
swi r24, r1, -92
|
||||||
swi r13, r1, 0
|
swi r25, r1, -96
|
||||||
addi r1, r1, -4
|
swi r26, r1, -100
|
||||||
swi r14, r1, 0
|
swi r27, r1, -104
|
||||||
addi r1, r1, -4
|
swi r28, r1, -108
|
||||||
swi r15, r1, 0
|
swi r29, r1, -112
|
||||||
addi r1, r1, -4
|
swi r30, r1, -116
|
||||||
swi r16, r1, 0
|
swi r31, r1, -120
|
||||||
addi r1, r1, -4
|
addik r1, r1, -124
|
||||||
swi r17, r1, 0
|
|
||||||
addi r1, r1, -4
|
|
||||||
swi r18, r1, 0
|
|
||||||
addi r1, r1, -4
|
|
||||||
swi r19, r1, 0
|
|
||||||
addi r1, r1, -4
|
|
||||||
swi r20, r1, 0
|
|
||||||
addi r1, r1, -4
|
|
||||||
swi r21, r1, 0
|
|
||||||
addi r1, r1, -4
|
|
||||||
swi r22, r1, 0
|
|
||||||
addi r1, r1, -4
|
|
||||||
swi r23, r1, 0
|
|
||||||
addi r1, r1, -4
|
|
||||||
swi r24, r1, 0
|
|
||||||
addi r1, r1, -4
|
|
||||||
swi r25, r1, 0
|
|
||||||
addi r1, r1, -4
|
|
||||||
swi r26, r1, 0
|
|
||||||
addi r1, r1, -4
|
|
||||||
swi r27, r1, 0
|
|
||||||
addi r1, r1, -4
|
|
||||||
swi r28, r1, 0
|
|
||||||
addi r1, r1, -4
|
|
||||||
swi r29, r1, 0
|
|
||||||
addi r1, r1, -4
|
|
||||||
swi r30, r1, 0
|
|
||||||
addi r1, r1, -4
|
|
||||||
swi r31, r1, 0
|
|
||||||
brlid r15, interrupt_handler
|
brlid r15, interrupt_handler
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
lwi r31, r1, 0
|
addik r1, r1, 124
|
||||||
addi r1, r1, 4
|
lwi r31, r1, -120
|
||||||
lwi r30, r1, 0
|
lwi r30, r1, -116
|
||||||
addi r1, r1, 4
|
lwi r29, r1, -112
|
||||||
lwi r29, r1, 0
|
lwi r28, r1, -108
|
||||||
addi r1, r1, 4
|
lwi r27, r1, -104
|
||||||
lwi r28, r1, 0
|
lwi r26, r1, -100
|
||||||
addi r1, r1, 4
|
lwi r25, r1, -96
|
||||||
lwi r27, r1, 0
|
lwi r24, r1, -92
|
||||||
addi r1, r1, 4
|
lwi r23, r1, -88
|
||||||
lwi r26, r1, 0
|
lwi r22, r1, -84
|
||||||
addi r1, r1, 4
|
lwi r21, r1, -80
|
||||||
lwi r25, r1, 0
|
lwi r20, r1, -76
|
||||||
addi r1, r1, 4
|
lwi r19, r1, -72
|
||||||
lwi r24, r1, 0
|
lwi r18, r1, -68
|
||||||
addi r1, r1, 4
|
lwi r17, r1, -64
|
||||||
lwi r23, r1, 0
|
lwi r16, r1, -60
|
||||||
addi r1, r1, 4
|
lwi r15, r1, -56
|
||||||
lwi r22, r1, 0
|
lwi r14, r1, -52
|
||||||
addi r1, r1, 4
|
lwi r13, r1, -48
|
||||||
lwi r21, r1, 0
|
lwi r12, r1, -44
|
||||||
addi r1, r1, 4
|
lwi r11, r1, -40
|
||||||
lwi r20, r1, 0
|
lwi r10, r1, -36
|
||||||
addi r1, r1, 4
|
lwi r9, r1, -32
|
||||||
lwi r19, r1, 0
|
lwi r8, r1, -28
|
||||||
addi r1, r1, 4
|
lwi r7, r1, -24
|
||||||
lwi r18, r1, 0
|
lwi r6, r1, -20
|
||||||
addi r1, r1, 4
|
lwi r5, r1, -16
|
||||||
lwi r17, r1, 0
|
lwi r4, r1, -12
|
||||||
addi r1, r1, 4
|
lwi r3, r1, -8
|
||||||
lwi r16, r1, 0
|
lwi r2, r1, -4
|
||||||
addi r1, r1, 4
|
|
||||||
lwi r15, r1, 0
|
|
||||||
addi r1, r1, 4
|
|
||||||
lwi r14, r1, 0
|
|
||||||
addi r1, r1, 4
|
|
||||||
lwi r13, r1, 0
|
|
||||||
addi r1, r1, 4
|
|
||||||
lwi r12, r1, 0
|
|
||||||
addi r1, r1, 4
|
|
||||||
lwi r11, r1, 0
|
|
||||||
addi r1, r1, 4
|
|
||||||
lwi r10, r1, 0
|
|
||||||
addi r1, r1, 4
|
|
||||||
lwi r9, r1, 0
|
|
||||||
addi r1, r1, 4
|
|
||||||
lwi r8, r1, 0
|
|
||||||
addi r1, r1, 4
|
|
||||||
lwi r7, r1, 0
|
|
||||||
addi r1, r1, 4
|
|
||||||
lwi r6, r1, 0
|
|
||||||
addi r1, r1, 4
|
|
||||||
lwi r5, r1, 0
|
|
||||||
addi r1, r1, 4
|
|
||||||
lwi r4, r1, 0
|
|
||||||
addi r1, r1, 4
|
|
||||||
lwi r3, r1, 0
|
|
||||||
addi r1, r1, 4
|
|
||||||
lwi r2, r1, 0
|
|
||||||
addi r1, r1, 4
|
|
||||||
|
|
||||||
/* enable_interrupt */
|
/* enable_interrupt */
|
||||||
#ifdef XILINX_USE_MSR_INSTR
|
#ifdef XILINX_USE_MSR_INSTR
|
||||||
|
|
|
@ -60,7 +60,7 @@ void timer_isr (void *arg)
|
||||||
tmr->control = tmr->control | TIMER_INTERRUPT;
|
tmr->control = tmr->control | TIMER_INTERRUPT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void timer_init (void)
|
int timer_init (void)
|
||||||
{
|
{
|
||||||
tmr->loadreg = CONFIG_SYS_TIMER_0_PRELOAD;
|
tmr->loadreg = CONFIG_SYS_TIMER_0_PRELOAD;
|
||||||
tmr->control = TIMER_INTERRUPT | TIMER_RESET;
|
tmr->control = TIMER_INTERRUPT | TIMER_RESET;
|
||||||
|
@ -68,6 +68,7 @@ void timer_init (void)
|
||||||
TIMER_ENABLE | TIMER_ENABLE_INTR | TIMER_RELOAD | TIMER_DOWN_COUNT;
|
TIMER_ENABLE | TIMER_ENABLE_INTR | TIMER_RELOAD | TIMER_DOWN_COUNT;
|
||||||
reset_timer ();
|
reset_timer ();
|
||||||
install_interrupt_handler (CONFIG_SYS_TIMER_0_IRQ, timer_isr, (void *)tmr);
|
install_interrupt_handler (CONFIG_SYS_TIMER_0_IRQ, timer_isr, (void *)tmr);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -29,7 +29,6 @@ SOBJS-y +=
|
||||||
|
|
||||||
COBJS-y += board.o
|
COBJS-y += board.o
|
||||||
COBJS-y += bootm.o
|
COBJS-y += bootm.o
|
||||||
COBJS-y += cache.o
|
|
||||||
COBJS-y += time.o
|
COBJS-y += time.o
|
||||||
|
|
||||||
SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
|
SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include <timestamp.h>
|
#include <timestamp.h>
|
||||||
#include <version.h>
|
#include <version.h>
|
||||||
#include <watchdog.h>
|
#include <watchdog.h>
|
||||||
|
#include <stdio_dev.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
@ -44,6 +45,12 @@ extern int interrupts_init (void);
|
||||||
#if defined(CONFIG_CMD_NET)
|
#if defined(CONFIG_CMD_NET)
|
||||||
extern int eth_init (bd_t * bis);
|
extern int eth_init (bd_t * bis);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_SYS_TIMER_0
|
||||||
|
extern int timer_init (void);
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SYS_FSL_2
|
||||||
|
extern void fsl_init2 (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* All attempts to come up with a "common" initialization sequence
|
* All attempts to come up with a "common" initialization sequence
|
||||||
|
@ -67,6 +74,12 @@ init_fnc_t *init_sequence[] = {
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SYS_INTC_0
|
#ifdef CONFIG_SYS_INTC_0
|
||||||
interrupts_init,
|
interrupts_init,
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SYS_TIMER_0
|
||||||
|
timer_init,
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_SYS_FSL_2
|
||||||
|
fsl_init2,
|
||||||
#endif
|
#endif
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
@ -76,6 +89,7 @@ void board_init (void)
|
||||||
bd_t *bd;
|
bd_t *bd;
|
||||||
init_fnc_t **init_fnc_ptr;
|
init_fnc_t **init_fnc_ptr;
|
||||||
gd = (gd_t *) CONFIG_SYS_GBL_DATA_OFFSET;
|
gd = (gd_t *) CONFIG_SYS_GBL_DATA_OFFSET;
|
||||||
|
char *s;
|
||||||
#if defined(CONFIG_CMD_FLASH)
|
#if defined(CONFIG_CMD_FLASH)
|
||||||
ulong flash_size = 0;
|
ulong flash_size = 0;
|
||||||
#endif
|
#endif
|
||||||
|
@ -104,8 +118,8 @@ void board_init (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
puts ("SDRAM :\n");
|
puts ("SDRAM :\n");
|
||||||
printf ("\t\tIcache:%s\n", icache_status() ? "OK" : "FAIL");
|
printf ("\t\tIcache:%s\n", icache_status() ? "ON" : "OFF");
|
||||||
printf ("\t\tDcache:%s\n", dcache_status() ? "OK" : "FAIL");
|
printf ("\t\tDcache:%s\n", dcache_status() ? "ON" : "OFF");
|
||||||
printf ("\tU-Boot Start:0x%08x\n", TEXT_BASE);
|
printf ("\tU-Boot Start:0x%08x\n", TEXT_BASE);
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_FLASH)
|
#if defined(CONFIG_CMD_FLASH)
|
||||||
|
@ -139,15 +153,22 @@ void board_init (void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* relocate environment function pointers etc. */
|
||||||
|
env_relocate ();
|
||||||
|
|
||||||
|
/* Initialize stdio devices */
|
||||||
|
stdio_init ();
|
||||||
|
|
||||||
|
if ((s = getenv ("loadaddr")) != NULL) {
|
||||||
|
load_addr = simple_strtoul (s, NULL, 16);
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_NET)
|
#if defined(CONFIG_CMD_NET)
|
||||||
/* IP Address */
|
/* IP Address */
|
||||||
bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
|
bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
|
||||||
eth_init (bd);
|
eth_init (bd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* relocate environment function pointers etc. */
|
|
||||||
env_relocate ();
|
|
||||||
|
|
||||||
/* main_loop */
|
/* main_loop */
|
||||||
for (;;) {
|
for (;;) {
|
||||||
WATCHDOG_RESET ();
|
WATCHDOG_RESET ();
|
||||||
|
|
|
@ -35,22 +35,59 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||||
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
|
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
|
||||||
{
|
{
|
||||||
/* First parameter is mapped to $r5 for kernel boot args */
|
/* First parameter is mapped to $r5 for kernel boot args */
|
||||||
void (*theKernel) (char *);
|
void (*theKernel) (char *, ulong, ulong);
|
||||||
char *commandline = getenv ("bootargs");
|
char *commandline = getenv ("bootargs");
|
||||||
|
ulong rd_data_start, rd_data_end;
|
||||||
|
|
||||||
if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
|
if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
theKernel = (void (*)(char *))images->ep;
|
int ret;
|
||||||
|
|
||||||
|
char *of_flat_tree = NULL;
|
||||||
|
#if defined(CONFIG_OF_LIBFDT)
|
||||||
|
ulong of_size = 0;
|
||||||
|
|
||||||
|
/* find flattened device tree */
|
||||||
|
ret = boot_get_fdt (flag, argc, argv, images, &of_flat_tree, &of_size);
|
||||||
|
if (ret)
|
||||||
|
return 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
theKernel = (void (*)(char *, ulong, ulong))images->ep;
|
||||||
|
|
||||||
|
/* find ramdisk */
|
||||||
|
ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_MICROBLAZE,
|
||||||
|
&rd_data_start, &rd_data_end);
|
||||||
|
if (ret)
|
||||||
|
return 1;
|
||||||
|
|
||||||
show_boot_progress (15);
|
show_boot_progress (15);
|
||||||
|
|
||||||
|
if (!(ulong) of_flat_tree)
|
||||||
|
of_flat_tree = (char *)simple_strtoul (argv[3], NULL, 16);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf ("## Transferring control to Linux (at address %08lx) ...\n",
|
printf ("## Transferring control to Linux (at address 0x%08lx) " \
|
||||||
(ulong) theKernel);
|
"ramdisk 0x%08lx, FDT 0x%08lx...\n",
|
||||||
|
(ulong) theKernel, rd_data_start, (ulong) of_flat_tree);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
theKernel (commandline);
|
#ifdef XILINX_USE_DCACHE
|
||||||
|
#ifdef XILINX_DCACHE_BYTE_SIZE
|
||||||
|
flush_cache(0, XILINX_DCACHE_BYTE_SIZE);
|
||||||
|
#else
|
||||||
|
#warning please rebuild BSPs and update configuration
|
||||||
|
flush_cache(0, 32768);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
/*
|
||||||
|
* Linux Kernel Parameters (passing device tree):
|
||||||
|
* r5: pointer to command line
|
||||||
|
* r6: pointer to ramdisk
|
||||||
|
* r7: pointer to the fdt, followed by the board info data
|
||||||
|
*/
|
||||||
|
theKernel (commandline, rd_data_start, (ulong) of_flat_tree);
|
||||||
/* does not return */
|
/* does not return */
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
/*
|
|
||||||
* (C) Copyright 2004 Atmark Techno, Inc.
|
|
||||||
*
|
|
||||||
* Yasushi SHOJI <yashi@atmark-techno.com>
|
|
||||||
*
|
|
||||||
* See file CREDITS for list of people who contributed to this
|
|
||||||
* project.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2 of
|
|
||||||
* the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
||||||
* MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <common.h>
|
|
||||||
|
|
||||||
void flush_cache (ulong addr, ulong size)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < size; i += 4)
|
|
||||||
asm volatile (
|
|
||||||
#ifdef CONFIG_ICACHE
|
|
||||||
"wic %0, r0;"
|
|
||||||
#endif
|
|
||||||
"nop;"
|
|
||||||
#ifdef CONFIG_DCACHE
|
|
||||||
"wdc %0, r0;"
|
|
||||||
#endif
|
|
||||||
"nop;"
|
|
||||||
:
|
|
||||||
: "r" (addr + i)
|
|
||||||
: "memory");
|
|
||||||
}
|
|
|
@ -60,10 +60,9 @@ void fsl_isr2 (void *arg) {
|
||||||
puts("*");
|
puts("*");
|
||||||
}
|
}
|
||||||
|
|
||||||
void fsl_init2 (void) {
|
int fsl_init2 (void) {
|
||||||
puts("fsl_init2\n");
|
puts("fsl_init2\n");
|
||||||
install_interrupt_handler (FSL_INTR_2,\
|
install_interrupt_handler (FSL_INTR_2, fsl_isr2, NULL);
|
||||||
fsl_isr2,\
|
return 0;
|
||||||
NULL);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue