]>
git.ipfire.org Git - people/ms/u-boot.git/blob - board/cm41xx/cm41xx.c
65eaa942c54c3a03484e50cae6b5143f3bd573ca
3 * Greg Ungerer, OpenGear Inc, <greg.ungerer@opengear.com>
6 * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
9 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
10 * Marius Groeger <mgroeger@sysgo.de>
12 * See file CREDITS for list of people who contributed to this
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License as
17 * published by the Free Software Foundation; either version 2 of
18 * the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32 #include <asm/arch/platform.h>
34 /* ------------------------------------------------------------------------- */
36 #define ks8695_read(a) *((volatile unsigned int *) (KS8695_IO_BASE+(a)))
37 #define ks8695_write(a,b) *((volatile unsigned int *) (KS8695_IO_BASE+(a))) = (b)
39 /* ------------------------------------------------------------------------- */
43 * Miscelaneous platform dependent initialisations
45 int env_flash_cmdline (void)
47 unsigned char *sp
= (unsigned char *) 0x0201c020;
51 /* Check if "erase" push button is depressed */
52 if ((ks8695_read(KS8695_GPIO_DATA
) & 0x8) == 0) {
53 printf("### Entering network recovery mode...\n");
54 setenv("bootargs", "console=ttyAM0,115200 mem=32M initrd=0x400000,8M root=/dev/ram0");
55 setenv("bootcmd", "bootp 0x400000; gofsk 0x400000");
56 setenv("bootdelay", "2");
60 /* Check for flash based kernel boot args to use as default */
61 for (ep
= sp
, len
= 0; ((len
< 1024) && (*ep
!= 0)); ep
++, len
++)
64 if ((len
> 0) && (len
<1024))
65 setenv("bootargs", sp
);
70 int board_late_init (void)
78 DECLARE_GLOBAL_DATA_PTR
;
80 /* arch number of CM41xx */
81 gd
->bd
->bi_arch_number
= 672;
83 /* adress of boot parameters */
84 gd
->bd
->bi_boot_params
= 0x00000100;
86 /* power down all but port 0 on the switch */
87 ks8695_write(KS8695_SWITCH_LPPM12
, 0x00000005);
88 ks8695_write(KS8695_SWITCH_LPPM34
, 0x00050005);
95 DECLARE_GLOBAL_DATA_PTR
;
97 gd
->bd
->bi_dram
[0].start
= PHYS_SDRAM_1
;
98 gd
->bd
->bi_dram
[0].size
= PHYS_SDRAM_1_SIZE
;