]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - cpu/blackfin/cpu.c
NAND: Subpage shift for ecc_steps equal to 16
[people/ms/u-boot.git] / cpu / blackfin / cpu.c
index 53de5aba67dee2f6e830a16db42dd2eef6d26189..9bb6407fc638a7cce4e900365522f1b88e986512 100644 (file)
 #include <asm/blackfin.h>
 #include <asm/cplb.h>
 #include <asm/mach-common/bits/core.h>
-#include <asm/mach-common/bits/mpu.h>
+#include <asm/mach-common/bits/ebiu.h>
 #include <asm/mach-common/bits/trace.h>
 
 #include "cpu.h"
 #include "serial.h"
 
-void icache_enable(void)
-{
-       bfin_write_IMEM_CONTROL(bfin_read_IMEM_CONTROL() | (IMC | ENICPLB));
-       SSYNC();
-}
-
-void icache_disable(void)
-{
-       bfin_write_IMEM_CONTROL(bfin_read_IMEM_CONTROL() & ~(IMC | ENICPLB));
-       SSYNC();
-}
-
-int icache_status(void)
-{
-       return bfin_read_IMEM_CONTROL() & ENICPLB;
-}
-
-void dcache_enable(void)
-{
-       bfin_write_DMEM_CONTROL(bfin_read_DMEM_CONTROL() | (ACACHE_BCACHE | ENDCPLB | PORT_PREF0));
-       SSYNC();
-}
-
-void dcache_disable(void)
-{
-       bfin_write_DMEM_CONTROL(bfin_read_DMEM_CONTROL() & ~(ACACHE_BCACHE | ENDCPLB | PORT_PREF0));
-       SSYNC();
-}
-
-int dcache_status(void)
-{
-       return bfin_read_DMEM_CONTROL() & ENDCPLB;
-}
+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
@@ -83,6 +53,9 @@ void cpu_init_f(ulong bootflag, ulong loaded_from_ldr)
                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);
@@ -133,9 +106,8 @@ int irq_init(void)
        bfin_write_EVT15(evt_default);
        bfin_write_ILAT(0);
        CSYNC();
-       /* enable all interrupts except for core timer */
-       irq_flags = 0xffffffbf;
+       /* enable hardware error irq */
+       irq_flags = 0x3f;
        local_irq_enable();
-       CSYNC();
        return 0;
 }