]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sandbox: Split bootm code out into lib/bootm
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Mon, 13 Apr 2015 20:54:20 +0000 (22:54 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:29:05 +0000 (22:29 +0200)
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>
arch/sandbox/cpu/cpu.c
arch/sandbox/lib/Makefile
arch/sandbox/lib/bootm.c [new file with mode: 0644]

index 007ae860346fa32dc88b445c78c8fd4b7a6919e1..f0dafedc254fb5d0ca3973946539babf7a75d267 100644 (file)
@@ -49,18 +49,6 @@ unsigned long __attribute__((no_instrument_function)) timer_get_us(void)
        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)
 {
        return 0;
index 75b135cfc0ef0a254e47a5a2441b99ff6eb17698..96761e27f7a38a80a20176d85ca3c2f2242cc65a 100644 (file)
@@ -9,3 +9,4 @@
 
 obj-y  += interrupts.o
 obj-$(CONFIG_PCI)      += pci_io.o
+obj-$(CONFIG_CMD_BOOTM) += bootm.o
diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c
new file mode 100644 (file)
index 0000000..8ddf4ef
--- /dev/null
@@ -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;
+}