summaryrefslogtreecommitdiff
path: root/board/esd/common/cmd_loadpci.c
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2017-06-27 16:49:14 +0200
committerTom Rini <trini@konsulko.com>2017-07-03 17:35:28 -0400
commit98f705c9cefdfdba62c069821bbba10273a0a8ed (patch)
tree48a56e8496a9b6f5bcf523916ace5445489d79c7 /board/esd/common/cmd_loadpci.c
parentd4db3b86a5e090e21db710bedbbe3e50d4c56428 (diff)
powerpc: remove 4xx support
There was for long time no activity in the 4xx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 4xx, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'board/esd/common/cmd_loadpci.c')
-rw-r--r--board/esd/common/cmd_loadpci.c108
1 files changed, 0 insertions, 108 deletions
diff --git a/board/esd/common/cmd_loadpci.c b/board/esd/common/cmd_loadpci.c
deleted file mode 100644
index 9541817d094..00000000000
--- a/board/esd/common/cmd_loadpci.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * (C) Copyright 2005-2008
- * Matthias Fuchs, esd GmbH Germany, matthias.fuchs@esd-electronics.com
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include <common.h>
-#include <command.h>
-#include <console.h>
-#if !defined(CONFIG_440)
-#include <asm/4xx_pci.h>
-#endif
-
-#if defined(CONFIG_CMD_BSP)
-#define ADDRMASK 0xfffff000
-
-/*
- * Command loadpci: wait for signal from host and boot image.
- */
-int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-{
- u32 *ptr = 0;
- int count = 0;
- int count2 = 0;
- char addr[16];
- char str[] = "\\|/-";
- u32 la, ptm1la;
-
-#if defined(CONFIG_440)
- ptm1la = in32r(PCIL0_PTM1LA);
-#else
- ptm1la = in32r(PTM1LA);
-#endif
- while(1) {
- /*
- * Mark sync address
- */
- ptr = (u32 *)ptm1la;
- memset(ptr, 0, 0x20);
-
- *ptr = 0xffffffff;
- puts("\nWaiting for action from pci host -");
-
- /*
- * Wait for host to write the start address
- */
- while (*ptr == 0xffffffff) {
- count++;
- if (!(count % 100)) {
- count2++;
- putc(0x08); /* backspace */
- putc(str[count2 % 4]);
- }
-
- /* Abort if ctrl-c was pressed */
- if (ctrlc()) {
- puts("\nAbort\n");
- return 0;
- }
-
- udelay(1000);
- }
-
- printf("\nGot bootcode %08x: ", *ptr);
- la = ptm1la + (*ptr & ADDRMASK);
- sprintf(addr, "%08x", la);
-
- switch (*ptr & ~ADDRMASK) {
- case 0:
- /*
- * Boot image via bootm
- */
- printf("booting image at addr 0x%s ...\n", addr);
- setenv("loadaddr", addr);
- do_bootm(cmdtp, 0, 0, NULL);
- break;
-
- case 1:
- /*
- * Boot image via "source" command
- */
- printf("executing script at addr 0x%s ...\n", addr);
- source(la, NULL);
- break;
-
- case 2:
- /*
- * Call run_cmd
- */
- printf("running command at addr 0x%s ...\n", addr);
- run_command((char *)la, 0);
- break;
-
- default:
- printf("unhandled boot method\n");
- break;
- }
- }
-}
-
-U_BOOT_CMD(
- loadpci, 1, 1, do_loadpci,
- "Wait for pci bootcmd and boot it",
- ""
-);
-
-#endif