3 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
4 * Marius Groeger <mgroeger@sysgo.de>
7 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
8 * Alex Zuepke <azu@sysgo.de>
10 * See file CREDITS for list of people who contributed to this
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License as
15 * published by the Free Software Foundation; either version 2 of
16 * the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
36 #include <asm/arch/ixp425.h>
37 #include <asm/system.h>
39 ulong loops_per_jiffy;
41 static void cache_flush(void);
43 #if defined(CONFIG_DISPLAY_CPUINFO)
44 int print_cpuinfo (void)
49 asm ("mrc p15, 0, %0, c0, c0, 0":"=r" (id));
51 puts("CPU: Intel IXP425 at ");
52 switch ((id & 0x000003f0) >> 4) {
54 loops_per_jiffy = 887467;
59 loops_per_jiffy = 666016;
64 loops_per_jiffy = 442901;
70 printf("%d MHz\n", speed);
72 puts("unknown revision\n");
76 #endif /* CONFIG_DISPLAY_CPUINFO */
83 int cleanup_before_linux (void)
86 * this function is called just before we call linux
87 * it prepares the processor for linux
89 * just disable everything that can disturb booting linux
92 disable_interrupts ();
94 /* turn off I-cache */
104 /* flush I/D-cache */
105 static void cache_flush (void)
109 asm ("mcr p15, 0, %0, c7, c5, 0": :"r" (i));
120 #ifdef CONFIG_BOOTCOUNT_LIMIT
122 void bootcount_store (ulong a)
124 volatile ulong *save_addr = (volatile ulong *)(CONFIG_SYS_BOOTCOUNT_ADDR);
127 save_addr[1] = BOOTCOUNT_MAGIC;
130 ulong bootcount_load (void)
132 volatile ulong *save_addr = (volatile ulong *)(CONFIG_SYS_BOOTCOUNT_ADDR);
134 if (save_addr[1] != BOOTCOUNT_MAGIC)
140 #endif /* CONFIG_BOOTCOUNT_LIMIT */
142 int cpu_eth_init(bd_t *bis)
144 #ifdef CONFIG_IXP4XX_NPE