Skip to content
Snippets Groups Projects
Commit 96dd0a4c authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

Merge branch 'next' of git://git.denx.de/u-boot-coldfire

parents a43af0f2 c7de810c
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <command.h> #include <command.h>
#include <asm/immap.h> #include <asm/immap.h>
#include <netdev.h> #include <netdev.h>
#include "cpu.h"
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
...@@ -143,6 +144,11 @@ int checkcpu(void) ...@@ -143,6 +144,11 @@ int checkcpu(void)
int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[]) int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[])
{ {
/* Call the board specific reset actions first. */
if(board_reset) {
board_reset();
}
mbar_writeByte(MCF_RCM_RCR, mbar_writeByte(MCF_RCM_RCR,
MCF_RCM_RCR_SOFTRST | MCF_RCM_RCR_FRCRSTOUT); MCF_RCM_RCR_SOFTRST | MCF_RCM_RCR_FRCRSTOUT);
return 0; return 0;
......
/*
* cpu.h
*
* Copyright (c) 2009 Freescale Semiconductor, Inc.
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
#ifndef _CPU_H_
#define _CPU_H_
#include <command.h>
/* Use this to create board specific reset functions */
void board_reset(void) __attribute__((__weak__));
#endif /* _CPU_H_ */
...@@ -204,6 +204,8 @@ int clock_pll(int fsys, int flags) ...@@ -204,6 +204,8 @@ int clock_pll(int fsys, int flags)
fout = ((fref * mfd) / (BUSDIV * 4)); fout = ((fref * mfd) / (BUSDIV * 4));
#endif #endif
/* must not tamper with SDRAMC if running from SDRAM */
#if !defined(CONFIG_MONITOR_IS_IN_RAM)
/* /*
* Check to see if the SDRAM has already been initialized. * Check to see if the SDRAM has already been initialized.
* If it has then the SDRAM needs to be put into self refresh * If it has then the SDRAM needs to be put into self refresh
...@@ -254,6 +256,7 @@ int clock_pll(int fsys, int flags) ...@@ -254,6 +256,7 @@ int clock_pll(int fsys, int flags)
/* wait for DQS logic to relock */ /* wait for DQS logic to relock */
for (i = 0; i < 0x200; i++) ; for (i = 0; i < 0x200; i++) ;
#endif /* !defined(CONFIG_MONITOR_IS_IN_RAM) */
return fout; return fout;
} }
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
addl #60,%sp; /* space for 15 regs */ \ addl #60,%sp; /* space for 15 regs */ \
rte; rte;
#if !defined(CONFIG_MONITOR_IS_IN_RAM)
.text .text
/* /*
* Vector table. This is used for initial platform startup. * Vector table. This is used for initial platform startup.
...@@ -121,6 +122,7 @@ vector192_255: ...@@ -121,6 +122,7 @@ vector192_255:
.long _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT .long _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
.long _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT .long _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
.long _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT .long _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
#endif /* !defined(CONFIG_MONITOR_IS_IN_RAM) */
.text .text
...@@ -130,9 +132,11 @@ _start: ...@@ -130,9 +132,11 @@ _start:
nop nop
move.w #0x2700,%sr /* Mask off Interrupt */ move.w #0x2700,%sr /* Mask off Interrupt */
#if !defined(CONFIG_MONITOR_IS_IN_RAM)
/* Set vector base register at the beginning of the Flash */ /* Set vector base register at the beginning of the Flash */
move.l #CONFIG_SYS_FLASH_BASE, %d0 move.l #CONFIG_SYS_FLASH_BASE, %d0
movec %d0, %VBR movec %d0, %VBR
#endif
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_CTRL), %d0 move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_CTRL), %d0
movec %d0, %RAMBAR1 movec %d0, %RAMBAR1
...@@ -280,7 +284,7 @@ _int_handler: ...@@ -280,7 +284,7 @@ _int_handler:
icache_enable: icache_enable:
move.l #0x01000000, %d0 /* Invalidate cache cmd */ move.l #0x01000000, %d0 /* Invalidate cache cmd */
movec %d0, %CACR /* Invalidate cache */ movec %d0, %CACR /* Invalidate cache */
move.l #(CONFIG_SYS_SDRAM_BASE + 0x1c000), %d0 move.l #(CONFIG_SYS_SDRAM_BASE + 0xc000 + ((CONFIG_SYS_SDRAM_SIZE & 0x1fe0) << 11)), %d0
movec %d0, %ACR0 /* Enable cache */ movec %d0, %ACR0 /* Enable cache */
move.l #0x80000200, %d0 /* Setup cache mask */ move.l #0x80000200, %d0 /* Setup cache mask */
......
#ifndef _ASM_M68K_UNALIGNED_H
#define _ASM_M68K_UNALIGNED_H
#ifdef CONFIG_COLDFIRE
#include <linux/unaligned/be_byteshift.h>
#else
#include <linux/unaligned/access_ok.h>
#endif
#include <linux/unaligned/generic.h>
#define get_unaligned __get_unaligned_be
#define put_unaligned __put_unaligned_be
#endif /* _ASM_M68K_UNALIGNED_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment