Revisión | 9f661504367fce188d7838865f922f7edc5e7743 (tree) |
---|---|
Tiempo | 2014-04-18 03:38:30 |
Autor | Masahiro Yamada <yamada.m@jp.p...> |
Commiter | Tom Rini |
floppy: delete unused files
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
@@ -1,124 +0,0 @@ | ||
1 | -/* | |
2 | - * (C) Copyright 2002 | |
3 | - * Stäubli Faverges - <www.staubli.com> | |
4 | - * Pierre AUBERT p.aubert@staubli.com | |
5 | - * | |
6 | - * SPDX-License-Identifier: GPL-2.0+ | |
7 | - */ | |
8 | - | |
9 | -/* | |
10 | - * Dos floppy support | |
11 | - */ | |
12 | - | |
13 | -#include <common.h> | |
14 | -#include <config.h> | |
15 | -#include <command.h> | |
16 | -#include <fdc.h> | |
17 | - | |
18 | -/*----------------------------------------------------------------------------- | |
19 | - * do_fdosboot -- | |
20 | - *----------------------------------------------------------------------------- | |
21 | - */ | |
22 | -int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | |
23 | -{ | |
24 | - char *name; | |
25 | - char *ep; | |
26 | - int size; | |
27 | - int drive = CONFIG_SYS_FDC_DRIVE_NUMBER; | |
28 | - | |
29 | - /* pre-set load_addr */ | |
30 | - if ((ep = getenv("loadaddr")) != NULL) { | |
31 | - load_addr = simple_strtoul(ep, NULL, 16); | |
32 | - } | |
33 | - | |
34 | - /* pre-set Boot file name */ | |
35 | - if ((name = getenv("bootfile")) == NULL) { | |
36 | - name = "uImage"; | |
37 | - } | |
38 | - | |
39 | - switch (argc) { | |
40 | - case 1: | |
41 | - break; | |
42 | - case 2: | |
43 | - /* only one arg - accept two forms: | |
44 | - * just load address, or just boot file name. | |
45 | - * The latter form must be written "filename" here. | |
46 | - */ | |
47 | - if (argv[1][0] == '"') { /* just boot filename */ | |
48 | - name = argv [1]; | |
49 | - } else { /* load address */ | |
50 | - load_addr = simple_strtoul(argv[1], NULL, 16); | |
51 | - } | |
52 | - break; | |
53 | - case 3: | |
54 | - load_addr = simple_strtoul(argv[1], NULL, 16); | |
55 | - name = argv [2]; | |
56 | - break; | |
57 | - default: | |
58 | - return CMD_RET_USAGE; | |
59 | - } | |
60 | - | |
61 | - /* Init physical layer */ | |
62 | - if (!fdc_fdos_init (drive)) { | |
63 | - return (-1); | |
64 | - } | |
65 | - | |
66 | - /* Open file */ | |
67 | - if (dos_open (name) < 0) { | |
68 | - printf ("Unable to open %s\n", name); | |
69 | - return 1; | |
70 | - } | |
71 | - if ((size = dos_read (load_addr)) < 0) { | |
72 | - printf ("boot error\n"); | |
73 | - return 1; | |
74 | - } | |
75 | - flush_cache (load_addr, size); | |
76 | - | |
77 | - setenv_hex("filesize", size); | |
78 | - | |
79 | - printf("Floppy DOS load complete: %d bytes loaded to 0x%lx\n", | |
80 | - size, load_addr); | |
81 | - | |
82 | - return bootm_maybe_autostart(cmdtp, argv[0]); | |
83 | -} | |
84 | - | |
85 | -/*----------------------------------------------------------------------------- | |
86 | - * do_fdosls -- | |
87 | - *----------------------------------------------------------------------------- | |
88 | - */ | |
89 | -int do_fdosls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | |
90 | -{ | |
91 | - char *path = ""; | |
92 | - int drive = CONFIG_SYS_FDC_DRIVE_NUMBER; | |
93 | - | |
94 | - switch (argc) { | |
95 | - case 1: | |
96 | - break; | |
97 | - case 2: | |
98 | - path = argv [1]; | |
99 | - break; | |
100 | - } | |
101 | - | |
102 | - /* Init physical layer */ | |
103 | - if (!fdc_fdos_init (drive)) { | |
104 | - return (-1); | |
105 | - } | |
106 | - /* Open directory */ | |
107 | - if (dos_open (path) < 0) { | |
108 | - printf ("Unable to open %s\n", path); | |
109 | - return 1; | |
110 | - } | |
111 | - return (dos_dir ()); | |
112 | -} | |
113 | - | |
114 | -U_BOOT_CMD( | |
115 | - fdosboot, 3, 0, do_fdosboot, | |
116 | - "boot from a dos floppy file", | |
117 | - "[loadAddr] [filename]" | |
118 | -); | |
119 | - | |
120 | -U_BOOT_CMD( | |
121 | - fdosls, 2, 0, do_fdosls, | |
122 | - "list files in a directory", | |
123 | - "[directory]" | |
124 | -); |
@@ -1,21 +0,0 @@ | ||
1 | -/* | |
2 | - * (C) Copyright 2002 | |
3 | - * Stäubli Faverges - <www.staubli.com> | |
4 | - * Pierre AUBERT p.aubert@staubli.com | |
5 | - * | |
6 | - * SPDX-License-Identifier: GPL-2.0+ | |
7 | - */ | |
8 | - | |
9 | -#ifndef _FDC_H_ | |
10 | -#define _FDC_H_ | |
11 | - | |
12 | -/* Functions prototype */ | |
13 | -int fdc_fdos_init (int drive); | |
14 | -int fdc_fdos_seek (int where); | |
15 | -int fdc_fdos_read (void *buffer, int len); | |
16 | - | |
17 | -int dos_open(char *name); | |
18 | -int dos_read (ulong addr); | |
19 | -int dos_dir (void); | |
20 | - | |
21 | -#endif |