Blame view
cmd/ide.c
1.34 KB
83d290c56 SPDX: Convert all... |
1 |
// SPDX-License-Identifier: GPL-2.0+ |
c609719b8 Initial revision |
2 |
/* |
34c202c7e common/cmd_ide.c:... |
3 |
* (C) Copyright 2000-2011 |
c609719b8 Initial revision |
4 |
* Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
c609719b8 Initial revision |
5 6 7 8 9 |
*/ /* * IDE support */ |
113bfe48b cmd_ide: add supp... |
10 |
|
c609719b8 Initial revision |
11 |
#include <common.h> |
2a981dc2c dm: block: Adjust... |
12 |
#include <blk.h> |
c609719b8 Initial revision |
13 14 15 16 17 |
#include <config.h> #include <watchdog.h> #include <command.h> #include <image.h> #include <asm/byteorder.h> |
f98984cb1 IDE: - make ide_i... |
18 |
#include <asm/io.h> |
735dd97b1 [PATCH 1_4] Merge... |
19 |
|
c609719b8 Initial revision |
20 21 |
#include <ide.h> #include <ata.h> |
735dd97b1 [PATCH 1_4] Merge... |
22 |
|
2d8d190c8 status_led: Kconf... |
23 |
#ifdef CONFIG_LED_STATUS |
c609719b8 Initial revision |
24 25 |
# include <status_led.h> #endif |
735dd97b1 [PATCH 1_4] Merge... |
26 |
|
c609719b8 Initial revision |
27 |
/* Current I/O Device */ |
584f316f1 cmd: ide: Make th... |
28 |
static int curr_device; |
c609719b8 Initial revision |
29 |
|
ed73508de dm: ide: Remove t... |
30 31 |
int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { |
09ed0d616 dm: ide: Adjust t... |
32 |
if (argc == 2) { |
ed73508de dm: ide: Remove t... |
33 |
if (strncmp(argv[1], "res", 3) == 0) { |
5b8e76c35 powerpc, 8xx: rem... |
34 35 |
puts(" Reset IDE: "); |
ed73508de dm: ide: Remove t... |
36 37 |
ide_init(); return 0; |
ed73508de dm: ide: Remove t... |
38 |
} |
ed73508de dm: ide: Remove t... |
39 |
} |
09ed0d616 dm: ide: Adjust t... |
40 41 |
return blk_common_cmd(argc, argv, IF_TYPE_IDE, &curr_device); |
ed73508de dm: ide: Remove t... |
42 |
} |
c40b29568 * Patch by Rune T... |
43 |
|
ed73508de dm: ide: Remove t... |
44 45 46 47 |
int do_diskboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { return common_diskboot(cmdtp, "ide", argc, argv); } |
c609719b8 Initial revision |
48 |
|
34c202c7e common/cmd_ide.c:... |
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
U_BOOT_CMD(ide, 5, 1, do_ide, "IDE sub-system", "reset - reset IDE controller " "ide info - show available IDE devices " "ide device [dev] - show or set current device " "ide part [dev] - print partition table of one or all IDE devices " "ide read addr blk# cnt " "ide write addr blk# cnt - read/write `cnt'" " blocks starting at block `blk#' " " to/from memory address `addr'"); U_BOOT_CMD(diskboot, 3, 1, do_diskboot, "boot from IDE device", "loadAddr dev:part"); |