[U-Boot] [PATCH] floppy: delete unused files

Masahiro Yamada yamada.m at jp.panasonic.com
Mon Mar 31 06:02:51 CEST 2014


Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
---
 common/cmd_fdos.c | 124 ------------------------------------------------------
 include/fdc.h     |  21 ---------
 2 files changed, 145 deletions(-)
 delete mode 100644 common/cmd_fdos.c
 delete mode 100644 include/fdc.h

diff --git a/common/cmd_fdos.c b/common/cmd_fdos.c
deleted file mode 100644
index 6930325..0000000
--- a/common/cmd_fdos.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * (C) Copyright 2002
- * Stäubli Faverges - <www.staubli.com>
- * Pierre AUBERT  p.aubert at staubli.com
- *
- * SPDX-License-Identifier:	GPL-2.0+
- */
-
-/*
- * Dos floppy support
- */
-
-#include <common.h>
-#include <config.h>
-#include <command.h>
-#include <fdc.h>
-
-/*-----------------------------------------------------------------------------
- * do_fdosboot --
- *-----------------------------------------------------------------------------
- */
-int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-{
-    char *name;
-    char *ep;
-    int size;
-    int drive = CONFIG_SYS_FDC_DRIVE_NUMBER;
-
-    /* pre-set load_addr */
-    if ((ep = getenv("loadaddr")) != NULL) {
-	load_addr = simple_strtoul(ep, NULL, 16);
-    }
-
-    /* pre-set Boot file name */
-    if ((name = getenv("bootfile")) == NULL) {
-	name = "uImage";
-    }
-
-    switch (argc) {
-    case 1:
-	break;
-    case 2:
-	/* only one arg - accept two forms:
-	 * just load address, or just boot file name.
-	 * The latter form must be written "filename" here.
-	 */
-	if (argv[1][0] == '"') {	/* just boot filename */
-	    name = argv [1];
-	} else {			/* load address	*/
-	    load_addr = simple_strtoul(argv[1], NULL, 16);
-	}
-	break;
-    case 3:
-	load_addr = simple_strtoul(argv[1], NULL, 16);
-	name = argv [2];
-	break;
-    default:
-	return CMD_RET_USAGE;
-    }
-
-    /* Init physical layer                                                   */
-    if (!fdc_fdos_init (drive)) {
-	return (-1);
-    }
-
-    /* Open file                                                             */
-    if (dos_open (name) < 0) {
-	printf ("Unable to open %s\n", name);
-	return 1;
-    }
-    if ((size = dos_read (load_addr)) < 0) {
-	printf ("boot error\n");
-	return 1;
-    }
-    flush_cache (load_addr, size);
-
-    setenv_hex("filesize", size);
-
-    printf("Floppy DOS load complete: %d bytes loaded to 0x%lx\n",
-	   size, load_addr);
-
-    return bootm_maybe_autostart(cmdtp, argv[0]);
-}
-
-/*-----------------------------------------------------------------------------
- * do_fdosls --
- *-----------------------------------------------------------------------------
- */
-int do_fdosls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-{
-    char *path = "";
-    int drive = CONFIG_SYS_FDC_DRIVE_NUMBER;
-
-    switch (argc) {
-    case 1:
-	break;
-    case 2:
-	path = argv [1];
-	break;
-    }
-
-    /* Init physical layer                                                   */
-    if (!fdc_fdos_init (drive)) {
-	return (-1);
-    }
-    /* Open directory                                                        */
-    if (dos_open (path) < 0) {
-	printf ("Unable to open %s\n", path);
-	return 1;
-    }
-    return (dos_dir ());
-}
-
-U_BOOT_CMD(
-	fdosboot,	3,	0,	do_fdosboot,
-	"boot from a dos floppy file",
-	"[loadAddr] [filename]"
-);
-
-U_BOOT_CMD(
-	fdosls,	2,	0,	do_fdosls,
-	"list files in a directory",
-	"[directory]"
-);
diff --git a/include/fdc.h b/include/fdc.h
deleted file mode 100644
index 207b0e2..0000000
--- a/include/fdc.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * (C) Copyright 2002
- * Stäubli Faverges - <www.staubli.com>
- * Pierre AUBERT  p.aubert at staubli.com
- *
- * SPDX-License-Identifier:	GPL-2.0+
- */
-
-#ifndef _FDC_H_
-#define _FDC_H_
-
-/* Functions prototype                                                       */
-int fdc_fdos_init (int drive);
-int fdc_fdos_seek (int where);
-int fdc_fdos_read (void *buffer, int len);
-
-int dos_open(char *name);
-int dos_read (ulong addr);
-int dos_dir (void);
-
-#endif
-- 
1.8.3.2



More information about the U-Boot mailing list