2 * U-Boot - boot.c - misc boot helper functions
4 * Copyright (c) 2005-2008 Analog Devices Inc.
6 * (C) Copyright 2000-2004
7 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
9 * Licensed under the GPL-2 or later.
15 #include <asm/blackfin.h>
17 #ifdef SHARED_RESOURCES
18 extern void swap_to(int device_id
);
22 extern void video_stop(void);
25 static char *make_command_line(void)
27 char *dest
= (char *)CONFIG_LINUX_CMDLINE_ADDR
;
28 char *bootargs
= getenv("bootargs");
33 strncpy(dest
, bootargs
, CONFIG_LINUX_CMDLINE_SIZE
);
34 dest
[CONFIG_LINUX_CMDLINE_SIZE
- 1] = 0;
38 extern ulong bfin_poweron_retx
;
40 int do_bootm_linux(int flag
, int argc
, char * const argv
[], bootm_headers_t
*images
)
42 int (*appl
) (char *cmdline
);
45 if (flag
& BOOTM_STATE_OS_PREP
)
47 if ((flag
!= 0) && (flag
!= BOOTM_STATE_OS_GO
))
50 #ifdef SHARED_RESOURCES
55 /* maybe this should be standardized and moved to bootm ... */
59 appl
= (int (*)(char *))images
->ep
;
61 printf("Starting Kernel at = %p\n", appl
);
62 cmdline
= make_command_line();
69 : "p"(appl
), "q0"(cmdline
), [retx
] "d"(bfin_poweron_retx
)