mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-20 22:21:41 +00:00
sandbox: Split bootm code out into lib/bootm
Follow the convention of other architectures and move the platform specific linux bootm code into sandbox/lib/bootm.c. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
85300a9a9d
commit
dd2d29a1e1
3 changed files with 22 additions and 12 deletions
|
@ -49,18 +49,6 @@ unsigned long __attribute__((no_instrument_function)) timer_get_us(void)
|
||||||
return os_get_nsec() / 1000;
|
return os_get_nsec() / 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
|
|
||||||
{
|
|
||||||
if (flag & (BOOTM_STATE_OS_GO | BOOTM_STATE_OS_FAKE_GO)) {
|
|
||||||
bootstage_mark(BOOTSTAGE_ID_RUN_OS);
|
|
||||||
printf("## Transferring control to Linux (at address %08lx)...\n",
|
|
||||||
images->ep);
|
|
||||||
reset_cpu(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int cleanup_before_linux(void)
|
int cleanup_before_linux(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -9,3 +9,4 @@
|
||||||
|
|
||||||
obj-y += interrupts.o
|
obj-y += interrupts.o
|
||||||
obj-$(CONFIG_PCI) += pci_io.o
|
obj-$(CONFIG_PCI) += pci_io.o
|
||||||
|
obj-$(CONFIG_CMD_BOOTM) += bootm.o
|
||||||
|
|
21
arch/sandbox/lib/bootm.c
Normal file
21
arch/sandbox/lib/bootm.c
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2011 The Chromium OS Authors.
|
||||||
|
* SPDX-License-Identifier: GPL-2.0+
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <common.h>
|
||||||
|
#include <asm/io.h>
|
||||||
|
|
||||||
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
|
||||||
|
{
|
||||||
|
if (flag & (BOOTM_STATE_OS_GO | BOOTM_STATE_OS_FAKE_GO)) {
|
||||||
|
bootstage_mark(BOOTSTAGE_ID_RUN_OS);
|
||||||
|
printf("## Transferring control to Linux (at address %08lx)...\n",
|
||||||
|
images->ep);
|
||||||
|
reset_cpu(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue