Commit Graph

10 Commits

Author SHA1 Message Date
Mike Frysinger
ad9073211c Blackfin: fix crash when booting from external memory
When testing a u-boot binary that hasn't been booted from the bootrom, we
have to make sure the bootstruct structure has sane storage space.  If we
don't, the initcode will crash when it tries to dereference an invalid
pointer.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-04-02 06:41:56 -04:00
Mike Frysinger
74398b23f9 Blackfin: put memory into self-refresh before/after programming clocks
When initializing the core clocks, stick external memory into self-refresh.
This gains us a few cool things:
 - support suspend-to-RAM with Linux
 - reprogram clocks automatically when doing "go" on u-boot.bin in RAM
 - make sure settings are stable before flashing new version
 - finally fully unify initialize startup code path between LDR/non-LDR

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-03-23 15:14:55 -04:00
Mike Frysinger
b5eba3fafc Blackfin: clarify relocation comment during init
People often ask questions about the init process and when things go
from flash to relocated base, so clarify the comments a bit.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-28 13:26:14 -05:00
Mike Frysinger
95433f6d43 Blackfin: just set SP register directly during init
No need to set the SP register indirectly to the configured value when it
can be set directly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-28 13:26:14 -05:00
Mike Frysinger
dc2bfb0b58 Blackfin: use common memcpy routine during init
Rather than using a local custom memcpy function, just call the existing
optimized Blackfin version.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-28 13:26:14 -05:00
Mike Frysinger
bd33e5c613 Blackfin: small cpu init optimization while setting interrupt mask
Use the sti instruction to set the initial interrupt mask rather than
banging on the core IMASK MMR to save both space and time.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-10-23 05:03:51 -04:00
Mike Frysinger
960922291c Blackfin: set initial stack correctly according to Blackfin ABI
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-10-23 05:03:51 -04:00
Mike Frysinger
70c4c032ea Blackfin: enable support for nested interrupts
During cpu init, make sure we initialize the CEC properly so that
interrupts can fire and be handled while U-Boot is running.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-10-23 05:03:50 -04:00
Jean-Christophe PLAGNIOL-VILLARD
6d0f6bcf33 rename CFG_ macros to CONFIG_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18 21:54:03 +02:00
Mike Frysinger
9171fc8172 Blackfin: unify cpu and boot modes
All of the duplicated code for Blackfin processors and boot modes have been
unified.  After all, the core is the same for all processors, just the
peripheral set differs (which gets handled in the drivers).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-03-30 15:50:19 -04:00