#include <asm/blackfin.h>
#include <asm/cplb.h>
#include <asm/mach-common/bits/core.h>
+#include <asm/mach-common/bits/ebiu.h>
#include <asm/mach-common/bits/trace.h>
#include "cpu.h"
#include "serial.h"
+ulong bfin_poweron_retx;
+
__attribute__ ((__noreturn__))
void cpu_init_f(ulong bootflag, ulong loaded_from_ldr)
{
+ extern char _stext_l1;
+#ifndef CONFIG_BFIN_BOOTROM_USES_EVT1
/* Build a NOP slide over the LDR jump block. Whee! */
- serial_early_puts("NOP Slide\n");
char nops[0xC];
+ serial_early_puts("NOP Slide\n");
memset(nops, 0x00, sizeof(nops));
- extern char _stext_l1;
memcpy(&_stext_l1 - sizeof(nops), nops, sizeof(nops));
+#endif
if (!loaded_from_ldr) {
/* Relocate sections into L1 if the LDR didn't do it -- don't
bfin_write_EBIU_AMGCTL(CONFIG_EBIU_AMGCTL_VAL);
#endif
+ /* Save RETX so we can pass it while booting Linux */
+ bfin_poweron_retx = bootflag;
+
#ifdef CONFIG_DEBUG_DUMP
/* Turn on hardware trace buffer */
bfin_write_TBUFCTL(TBUFPWR | TBUFEN);