diff options
author | Graeme Russ <graeme.russ@gmail.com> | 2008-12-07 10:29:03 +1100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-01-24 01:13:25 +0100 |
commit | ead056bc206f6b7ee6dc98766678b64635ea20b8 (patch) | |
tree | 551cc75ac3dfc3397558b0c17ebc113fcc60222a /cpu/i386/sc520.c | |
parent | 3f5f18d12d32ee0661bf51dfc55752c005230d6e (diff) | |
download | u-boot-imx-ead056bc206f6b7ee6dc98766678b64635ea20b8.zip u-boot-imx-ead056bc206f6b7ee6dc98766678b64635ea20b8.tar.gz u-boot-imx-ead056bc206f6b7ee6dc98766678b64635ea20b8.tar.bz2 |
Added MMCR reset functionality
Reset function specific to AMD SC520 microcontroller - Is more of a
'hard reset' that the triple fault.
Requires CONFIG_SYS_RESET_SC520 to be defined in config
I would have liked to add this to a new file (cpu/i386/sc520/reset.c)
but ld requires that a object file in a library arhive MUST contain
at least one function which does not override a weak function (and is
called from outside the object file) in order for that object file to
be extracted from the archive. This would be the only function on the
new file, and hence, will never get linked in.
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'cpu/i386/sc520.c')
-rw-r--r-- | cpu/i386/sc520.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cpu/i386/sc520.c b/cpu/i386/sc520.c index cb6bc03..50bd8ef 100644 --- a/cpu/i386/sc520.c +++ b/cpu/i386/sc520.c @@ -507,4 +507,14 @@ u8 ssi_rx_byte(void) return read_mmcr_byte(SC520_SSIRCV); } +#ifdef CONFIG_SYS_RESET_SC520 +void reset_cpu(ulong addr) +{ + printf("Resetting using SC520 MMCR\n"); + /* Write a '1' to the SYS_RST of the RESCFG MMCR */ + write_mmcr_word(SC520_RESCFG, 0x0001); + + /* NOTREACHED */ +} +#endif #endif /* CONFIG_SC520 */ |