Commit Graph

15 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
d347d572ab Blackfin: do not program voltage regulator on parts that do not have one
Some newer Blackfins (like the BF51x) do not have an on-chip voltage
regulator, so do not attempt to program the memory as if it does.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-03-23 15:14:55 -04:00
Mike Frysinger
0d4f24b70f Blackfin: setup a sane default EBIU_SDBCTL for SDRAM controllers
If the board config does not specify an explicit EBIU_SDBCTL value, set it
up with sane values based on other configuration options.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-03-23 15:14:54 -04:00
Mike Frysinger
3986e981f5 Blackfin: handle reboot anomaly 432
Workaround anomaly 432:
The bfrom_SysControl() firmware function does not clear the SIC_IWR1
register before executing the PLL programming sequence.  Therefore, any
interrupt enabled in the SIC_IWR1 register prior to the call to
bfrom_SysControl() can prematurely terminate the idle sequence required
for the PLL to relock properly. SIC_IWR0 is properly handled.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-03-23 15:14:54 -04:00
Mike Frysinger
7e1d212b6d Blackfin: kill off LDR jump block
The Boot ROM uses EVT1 as the entry point so set that rather than having
to use a tiny jump block in the default EVT1 location.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-03-23 15:14:54 -04:00
Mike Frysinger
e1ffaee728 Blackfin: disable syscontrol code for now
Looks like the initcode updates fell out of order during my merges.  The
patch that really fixes up this code is part of power-on overhaul and so
is too large for merging at this point.  Instead, we can disable the code
as no currently in-tree board depends on it.  The next merge window will
fix things up properly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-21 19:23:20 -05:00
Mike Frysinger
f790ef6ff1 Blackfin: dynamically update UART speed when initializing
Previously, booting over the UART required the baud rate to be known ahead
of time.  Using a bit of tricky simple math, we can calculate the new board
rate based on the old divisors.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
2009-02-05 21:25:35 -05:00
Mike Frysinger
97f265f14f Blackfin: add support for fast SPI reads with Boot ROM
Newer Blackfin boot roms support using the fast SPI read command rather than
just the slow one.  If the functionality is available, then use it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-05 21:25:35 -05:00
Mike Frysinger
67619982bf Blackfin: check for reserved settings in DDR MMRs
Some bits of the DDR MMRs should not be set.  If they do, bad things may
happen (like random failures or hardware destruction).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-05 21:25:35 -05:00
Mike Frysinger
622a8dc095 Blackfin: set default voltage levels for BF538/BF539 parts
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-05 21:25:34 -05:00
Mike Frysinger
09dc6b0bbd Blackfin: use on-chip syscontrol() rom function when available
Newer Blackfin's have an on-chip rom with a syscontrol() function that needs
to be used to properly program the memory and voltage settings as it will
include (possibly critical) factory tested bias values.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-05 21:25:28 -05:00
Mike Frysinger
ee1d2001ea Blackfin: dont check baud if it wont actually get used
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-02 12:24:31 -05:00
Mike Frysinger
4f6a313240 Blackfin: respect CONFIG_CLKIN_HALF
As pointed out by Ivan Koryakovskiy, the initialization code was not
actually respecting the CONFIG_CLKIN_HALF option when configuring the
PLL_CTL register.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-28 13:26:14 -05: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