2 * U-boot - bf533_linux.c
4 * Copyright (c) 2005-2007 Analog Devices Inc.
6 * (C) Copyright 2000-2004
7 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
9 * See file CREDITS for list of people who contributed to this
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of
15 * the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
28 /* Dummy functions, currently not in Use */
34 #include <asm/byteorder.h>
36 #define LINUX_MAX_ENVS 256
37 #define LINUX_MAX_ARGS 256
39 #define CMD_LINE_ADDR 0xFF900000 /* L1 scratchpad */
41 #ifdef SHARED_RESOURCES
42 extern void swap_to(int device_id
);
45 extern void flush_instruction_cache(void);
46 extern void flush_data_cache(void);
47 static char *make_command_line(void);
49 void do_bootm_linux(cmd_tbl_t
* cmdtp
, int flag
, int argc
, char *argv
[],
50 bootm_headers_t
*images
)
52 int (*appl
) (char *cmdline
);
56 if (!images
->autostart
)
59 #ifdef SHARED_RESOURCES
63 /* find kernel entry point */
64 if (images
->legacy_hdr_valid
) {
65 ep
= image_get_ep (images
->legacy_hdr_os
);
66 #if defined(CONFIG_FIT)
67 } else if (images
->fit_uname_os
) {
68 int ret
= fit_image_get_entry (images
->fit_hdr_os
,
69 images
->fit_noffset_os
, &ep
);
71 puts ("Can't get entry point property!\n");
76 puts ("Could not find kernel entry point!\n");
79 appl
= (int (*)(char *))ep
;
81 printf("Starting Kernel at = %x\n", appl
);
82 cmdline
= make_command_line();
83 if (icache_status()) {
84 flush_instruction_cache();
87 if (dcache_status()) {
96 if (images
->autostart
)
97 do_reset (cmdtp
, flag
, argc
, argv
);
101 char *make_command_line(void)
103 char *dest
= (char *)CMD_LINE_ADDR
;
106 if ((bootargs
= getenv("bootargs")) == NULL
)
109 strncpy(dest
, bootargs
, 0x1000);