Blame view
cmd/ide.c
1.4 KB
c609719b8 Initial revision |
1 |
/* |
34c202c7e common/cmd_ide.c:... |
2 |
* (C) Copyright 2000-2011 |
c609719b8 Initial revision |
3 4 |
* Wolfgang Denk, DENX Software Engineering, wd@denx.de. * |
1a4596601 Add GPL-2.0+ SPDX... |
5 |
* SPDX-License-Identifier: GPL-2.0+ |
c609719b8 Initial revision |
6 7 8 9 10 |
*/ /* * IDE support */ |
113bfe48b cmd_ide: add supp... |
11 |
|
c609719b8 Initial revision |
12 |
#include <common.h> |
2a981dc2c dm: block: Adjust... |
13 |
#include <blk.h> |
c609719b8 Initial revision |
14 15 16 17 18 |
#include <config.h> #include <watchdog.h> #include <command.h> #include <image.h> #include <asm/byteorder.h> |
f98984cb1 IDE: - make ide_i... |
19 |
#include <asm/io.h> |
735dd97b1 [PATCH 1_4] Merge... |
20 |
|
5b8e76c35 powerpc, 8xx: rem... |
21 |
#if defined(CONFIG_IDE_PCMCIA) |
c609719b8 Initial revision |
22 23 |
# include <pcmcia.h> #endif |
735dd97b1 [PATCH 1_4] Merge... |
24 |
|
c609719b8 Initial revision |
25 26 |
#include <ide.h> #include <ata.h> |
735dd97b1 [PATCH 1_4] Merge... |
27 |
|
2d8d190c8 status_led: Kconf... |
28 |
#ifdef CONFIG_LED_STATUS |
c609719b8 Initial revision |
29 30 |
# include <status_led.h> #endif |
735dd97b1 [PATCH 1_4] Merge... |
31 |
|
c609719b8 Initial revision |
32 |
/* Current I/O Device */ |
584f316f1 cmd: ide: Make th... |
33 |
static int curr_device; |
c609719b8 Initial revision |
34 |
|
ed73508de dm: ide: Remove t... |
35 36 |
int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { |
09ed0d616 dm: ide: Adjust t... |
37 |
if (argc == 2) { |
ed73508de dm: ide: Remove t... |
38 |
if (strncmp(argv[1], "res", 3) == 0) { |
5b8e76c35 powerpc, 8xx: rem... |
39 40 |
puts(" Reset IDE: "); |
ed73508de dm: ide: Remove t... |
41 42 |
ide_init(); return 0; |
ed73508de dm: ide: Remove t... |
43 |
} |
ed73508de dm: ide: Remove t... |
44 |
} |
09ed0d616 dm: ide: Adjust t... |
45 46 |
return blk_common_cmd(argc, argv, IF_TYPE_IDE, &curr_device); |
ed73508de dm: ide: Remove t... |
47 |
} |
c40b29568 * Patch by Rune T... |
48 |
|
ed73508de dm: ide: Remove t... |
49 50 51 52 |
int do_diskboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { return common_diskboot(cmdtp, "ide", argc, argv); } |
c609719b8 Initial revision |
53 |
|
34c202c7e common/cmd_ide.c:... |
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
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"); |